Class PreCompressedHttpContentFactory
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.http.content.PreCompressedHttpContentFactory
- All Implemented Interfaces:
HttpContent.Factory, Container, Destroyable, Dumpable, Dumpable.DumpableContainer, LifeCycle
@ManagedObject
public class PreCompressedHttpContentFactory
extends ContainerLifeCycle
implements HttpContent.Factory
This
HttpContent.Factory populates the HttpContent.getPreCompressedContentFormats() field for any
HttpContent fetched through this factory.-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopExceptionNested classes/interfaces inherited from interface Container
Container.InheritedListener, Container.ListenerNested classes/interfaces inherited from interface Dumpable
Dumpable.DumpableContainer, Dumpable.DumpAppendableNested classes/interfaces inherited from interface LifeCycle
LifeCycle.Listener -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionPreCompressedHttpContentFactory(HttpContent.Factory factory, List<CompressedContentFormat> preCompressedFormats) PreCompressedHttpContentFactory(HttpContent.Factory factory, CompressedContentFormat[] preCompressedFormats) -
Method Summary
Modifier and TypeMethodDescriptiongetContent(String pathInContext) Get theHttpContentinstance of a path.toString()Methods inherited from class ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, addManaged, contains, destroy, doStart, doStop, dump, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, installBean, installBean, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeansMethods inherited from class AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stopMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Container
getCachedBeans, getEventListenersMethods inherited from interface Dumpable.DumpableContainer
isDumpable
-
Constructor Details
-
PreCompressedHttpContentFactory
public PreCompressedHttpContentFactory(HttpContent.Factory factory, CompressedContentFormat[] preCompressedFormats) -
PreCompressedHttpContentFactory
public PreCompressedHttpContentFactory(HttpContent.Factory factory, List<CompressedContentFormat> preCompressedFormats)
-
-
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
-
getPreCompressedContentFormats
@ManagedAttribute(value="Supported pre-compressed file extensions", readonly=true) public List<String> getPreCompressedContentFormats() -
toString
- Overrides:
toStringin classAbstractLifeCycle
-