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 Details

    • ResourceHttpContentFactory

      public ResourceHttpContentFactory(org.eclipse.jetty.util.resource.Resource baseResource, MimeTypes mimeTypes, org.eclipse.jetty.io.ByteBufferPool.Sized sizedBufferPool)
  • Method Details

    • getContent

      public HttpContent getContent(String pathInContext) throws IOException
      Description copied from interface: HttpContent.Factory
      Get the HttpContent instance of a path.
      Specified by:
      getContent in interface HttpContent.Factory
      Parameters:
      pathInContext - The path.
      Returns:
      A HttpContent instance.
      Throws:
      IOException - if unable to get content
    • getBaseResource

      @ManagedAttribute(value="The Resource used as the root for resolving requested paths", readonly=true) public org.eclipse.jetty.util.resource.Resource getBaseResource()
    • resolve

      protected org.eclipse.jetty.util.resource.Resource resolve(String pathInContext)
    • toString

      public String toString()
      Overrides:
      toString in class Object