Package org.eclipse.jetty.server.handler
Class AbstractHandlerContainer
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.server.handler.AbstractHandler
org.eclipse.jetty.server.handler.AbstractHandlerContainer
- All Implemented Interfaces:
Handler
,HandlerContainer
,Container
,Destroyable
,Dumpable
,Dumpable.DumpableContainer
,LifeCycle
- Direct Known Subclasses:
HandlerCollection
,HandlerWrapper
,HotSwapHandler
Abstract Handler Container.
This is the base class for handlers that may contain other handlers.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.server.handler.AbstractHandler
AbstractHandler.ErrorDispatchHandler
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopException
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.Listener
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
expandChildren
(List<Handler> list, Class<?> byClass) protected void
expandHandler
(Handler handler, List<Handler> list, Class<?> byClass) static <T extends HandlerContainer>
TfindContainerOf
(HandlerContainer root, Class<T> type, Handler handler) <T extends Handler>
TgetChildHandlerByClass
(Class<T> byclass) Handler[]
Handler[]
getChildHandlersByClass
(Class<?> byclass) void
Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandler
destroy, doError, doStart, doStop, getServer, handle
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeans
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.util.component.Container
getCachedBeans, getEventListeners
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
Methods inherited from interface org.eclipse.jetty.server.HandlerContainer
getHandlers
Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle
addEventListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, start, stop
-
Constructor Details
-
AbstractHandlerContainer
public AbstractHandlerContainer()
-
-
Method Details
-
getChildHandlers
- Specified by:
getChildHandlers
in interfaceHandlerContainer
- Returns:
- array of all handlers contained by this handler and it's children
-
getChildHandlersByClass
- Specified by:
getChildHandlersByClass
in interfaceHandlerContainer
- Parameters:
byclass
- the child handler class to get- Returns:
- array of all handlers contained by this handler and it's children of the passed type.
-
getChildHandlerByClass
- Specified by:
getChildHandlerByClass
in interfaceHandlerContainer
- Type Parameters:
T
- the type of handler- Parameters:
byclass
- the child handler class to get- Returns:
- first handler of all handlers contained by this handler and it's children of the passed type.
-
expandChildren
-
expandHandler
-
findContainerOf
public static <T extends HandlerContainer> T findContainerOf(HandlerContainer root, Class<T> type, Handler handler) -
setServer
- Specified by:
setServer
in interfaceHandler
- Overrides:
setServer
in classAbstractHandler
-