Class AbstractHandlerContainer
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.ee8.nested.AbstractHandler
org.eclipse.jetty.ee8.nested.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 AbstractHandler
AbstractHandler.ErrorDispatchHandlerNested 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 LifeCycle
LifeCycle.Listener -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexpandChildren(List<Handler> list, Class<?> byClass) protected voidexpandHandler(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) voidMethods 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 HandlerContainer
getHandlersMethods inherited from interface LifeCycle
addEventListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, start, stop
-
Constructor Details
-
AbstractHandlerContainer
public AbstractHandlerContainer()
-
-
Method Details
-
getChildHandlers
- Specified by:
getChildHandlersin interfaceHandlerContainer- Returns:
- array of all handlers contained by this handler and it's children
-
getChildHandlersByClass
- Specified by:
getChildHandlersByClassin 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:
getChildHandlerByClassin 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:
setServerin interfaceHandler- Overrides:
setServerin classAbstractHandler
-