Interface Handler.Collection
- All Superinterfaces:
 Destroyable, Handler, Handler.Container, Invocable, LifeCycle, Request.Handler
- All Known Implementing Classes:
 ContextHandlerCollection, Handler.Sequence
- Enclosing interface:
 Handler
A Handler.Container that can contain multiple other Handlers.
- See Also:
 
- 
Nested Class Summary
Nested 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 - 
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddHandler(Supplier<Handler> supplier) Adds theHandlersupplied by the givenSupplierto this collection ofHandlers.default voidaddHandler(Handler handler) Adds the givenHandlerto this collection ofHandlers.default booleanremoveHandler(Handler handler) Removes the givenHandlerfrom this collection ofHandlers.default booleanreplaceHandler(Handler oldHandler, Handler newHandler) Replace the givenHandlerto this collection ofHandlers.voidsetHandlers(List<Handler> handlers) Sets the givenHandlers as children of this collection ofHandlers.default voidsetHandlers(Handler... handlers) Similar tosetHandlers(List).Methods inherited from interface Destroyable
destroyMethods inherited from interface Handler.Container
getContainer, getDescendant, getDescendants, getDescendants, getHandlersMethods inherited from interface LifeCycle
addEventListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, start, stopMethods inherited from interface Request.Handler
getInvocationType, handle 
- 
Method Details
- 
addHandler
Adds the given
Handlerto this collection ofHandlers.- Parameters:
 handler- theHandlerto add
 - 
replaceHandler
 - 
removeHandler
Removes the given
Handlerfrom this collection ofHandlers.- Parameters:
 handler- theHandlerto remove- Returns:
 - whether the 
Handlerwas removed 
 - 
addHandler
 - 
setHandlers
Sets the given
Handlers as children of this collection ofHandlers.The list is copied and any subsequent modification to the list does not have any effect on this
Handler.Any existing children
Handleris removed.- Parameters:
 handlers- theHandlerto set as children
 - 
setHandlers
Similar to
setHandlers(List).- Parameters:
 handlers- theHandlerto set as children
 
 -