Class Handler.Abstract
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.server.Handler.Abstract
- All Implemented Interfaces:
Handler, Request.Handler, Container, Destroyable, Dumpable, Dumpable.DumpableContainer, LifeCycle, Invocable
- Direct Known Subclasses:
AbstractHandler, DefaultHandler, Handler.Abstract.NonBlocking, Handler.AbstractContainer, ProxyHandler, ServletToHandlerDocs.RequestAPIs, ServletToHandlerDocs.RequestContentAPIsByteBuffer, ServletToHandlerDocs.RequestContentAPIsFormFields, ServletToHandlerDocs.RequestContentAPIsInputStream, ServletToHandlerDocs.RequestContentAPIsMultiPart, ServletToHandlerDocs.RequestContentAPIsSource, ServletToHandlerDocs.RequestContentAPIsString, ServletToHandlerDocs.ResponseAPIs, ServletToHandlerDocs.ResponseContentAPIEcho, ServletToHandlerDocs.ResponseContentAPIFlush, ServletToHandlerDocs.ResponseContentAPIsExplicit, ServletToHandlerDocs.ResponseContentAPISimpleContent, ServletToHandlerDocs.ResponseContentAPIsImplicit, ServletToHandlerDocs.ResponseContentAPIsImplicitWithStatus, ServletToHandlerDocs.ResponseContentAPIString, ServletToHandlerDocs.ResponseContentAPITrailers
- Enclosing interface:
Handler
@ManagedObject
public abstract static class Handler.Abstract
extends ContainerLifeCycle
implements Handler
An abstract implementation of Handler that is a ContainerLifeCycle.
The Invocable.InvocationType is by default Invocable.InvocationType.BLOCKING unless the
NonBlocking variant is used or a specific Invocable.InvocationType is passed to
the constructor.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn abstractHandlerwith aInvocable.InvocationType.NON_BLOCKINGinvocation type.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.DumpableContainerNested classes/interfaces inherited from interface Handler
Handler.Abstract, Handler.AbstractContainer, Handler.Collection, Handler.Container, Handler.Sequence, Handler.Singleton, Handler.WrapperNested classes/interfaces inherited from interface Invocable
Invocable.Callable, Invocable.InvocationType, Invocable.ReadyTask, Invocable.TaskNested classes/interfaces inherited from interface LifeCycle
LifeCycle.ListenerNested classes/interfaces inherited from interface Request.Handler
Request.Handler.AbortException -
Field Summary
Fields inherited from interface Invocable
__nonBlocking, NOOP -
Constructor Summary
ConstructorsConstructorDescriptionAbstract()Creates aHandlerwith invocation typeInvocable.InvocationType.BLOCKING.Creates aHandlerwith the given invocation type. -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Destroys the managed Destroyable beans in the reverse order they were added.protected voiddoStart()Starts the managed lifecycle beans in the order they were added.protected voiddoStop()Stops the managed lifecycle beans in the reverse order they were added.voidSet theServerto associate to thisHandler.Methods inherited from class ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, 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, stop, toStringMethods 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
isDumpableMethods inherited from interface LifeCycle
addEventListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, start, stopMethods inherited from interface Request.Handler
handle
-
Constructor Details
-
Abstract
public Abstract()Creates a
Handlerwith invocation typeInvocable.InvocationType.BLOCKING. -
Abstract
Creates a
Handlerwith the given invocation type.- Parameters:
type- theInvocable.InvocationTypeof thisHandler- See Also:
-
-
Method Details
-
getServer
-
setServer
-
getInvocationType
- Specified by:
getInvocationTypein interfaceInvocable- Specified by:
getInvocationTypein interfaceRequest.Handler- Returns:
- The InvocationType of this object
-
doStart
Description copied from class:ContainerLifeCycleStarts the managed lifecycle beans in the order they were added.- Overrides:
doStartin classContainerLifeCycle- Throws:
Exception- If there was a problem starting. Will cause a transition to FAILED state
-
doStop
Description copied from class:ContainerLifeCycleStops the managed lifecycle beans in the reverse order they were added.- Overrides:
doStopin classContainerLifeCycle- Throws:
Exception- If there was a problem stopping. Will cause a transition to FAILED state
-
destroy
public void destroy()Description copied from class:ContainerLifeCycleDestroys the managed Destroyable beans in the reverse order they were added.- Specified by:
destroyin interfaceDestroyable- Overrides:
destroyin classContainerLifeCycle
-