Class VirtualHttpContentFactory
java.lang.Object
org.eclipse.jetty.http.content.VirtualHttpContentFactory
- All Implemented Interfaces:
HttpContent.Factory
An
HttpContent.Factory
implementation which takes a Resource and fakes this resource as
an entry in every directory. If any request is made for this resources file name, and it is not
already present in that directory then the resource contained in this factory will be served instead.-
Constructor Summary
ConstructorsConstructorDescriptionVirtualHttpContentFactory
(HttpContent.Factory factory, Resource resource, String contentType, ByteBufferPool.Sized sizedBufferPool) -
Method Summary
Modifier and TypeMethodDescriptiongetContent
(String path) Get theHttpContent
instance of a path.protected boolean
matchResource
(String path) toString()
-
Constructor Details
-
VirtualHttpContentFactory
public VirtualHttpContentFactory(HttpContent.Factory factory, Resource resource, String contentType, ByteBufferPool.Sized sizedBufferPool)
-
-
Method Details
-
getResource
- Returns:
- Returns the stylesheet as a Resource.
-
getContent
Description copied from interface:HttpContent.Factory
Get theHttpContent
instance of a path.- Specified by:
getContent
in interfaceHttpContent.Factory
- Parameters:
path
- The path.- Returns:
- A
HttpContent
instance. - Throws:
IOException
- if unable to get content
-
matchResource
-
toString
-