Class ResourceHttpContentFactory
java.lang.Object
org.eclipse.jetty.http.content.ResourceHttpContentFactory
- All Implemented Interfaces:
HttpContent.Factory
@ManagedObject
public class ResourceHttpContentFactory
extends Object
implements HttpContent.Factory
An HttpContent.Factory for transient content (not cached). The HttpContent's created by
this factory are not intended to be cached, so memory limits for individual
HttpOutput streams are enforced.
-
Constructor Summary
ConstructorsConstructorDescriptionResourceHttpContentFactory(Resource baseResource, MimeTypes mimeTypes, ByteBufferPool.Sized sizedBufferPool) -
Method Summary
Modifier and TypeMethodDescriptiongetContent(String pathInContext) Get theHttpContentinstance of a path.protected ResourcetoString()
-
Constructor Details
-
ResourceHttpContentFactory
public ResourceHttpContentFactory(Resource baseResource, MimeTypes mimeTypes, ByteBufferPool.Sized sizedBufferPool)
-
-
Method Details
-
getContent
Description copied from interface:HttpContent.FactoryGet theHttpContentinstance of a path.- Specified by:
getContentin interfaceHttpContent.Factory- Parameters:
pathInContext- The path.- Returns:
- A
HttpContentinstance. - Throws:
IOException- if unable to get content
-
getBaseResource
@ManagedAttribute(value="The Resource used as the root for resolving requested paths", readonly=true) public Resource getBaseResource() -
resolve
-
toString
-