Package org.eclipse.jetty.server
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.server.Handler
Handler.Abstract, Handler.AbstractContainer, Handler.Collection, Handler.Container, Handler.Sequence, Handler.Singleton, Handler.WrapperNested classes/interfaces inherited from interface org.eclipse.jetty.util.thread.Invocable
Invocable.Callable, Invocable.InvocationType, Invocable.ReadyTask, Invocable.TaskNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.server.Request.Handler
Request.Handler.AbortException -
Field Summary
Fields inherited from interface org.eclipse.jetty.util.thread.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 org.eclipse.jetty.util.component.Destroyable
destroyMethods inherited from interface org.eclipse.jetty.server.Handler.Container
getContainer, getDescendant, getDescendants, getDescendants, getHandlersMethods inherited from interface org.eclipse.jetty.util.component.LifeCycle
addEventListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, start, stopMethods inherited from interface org.eclipse.jetty.server.Request.Handler
getInvocationType, handle
-
Method Details
-
addHandler
Adds the given
Handlerto this collection ofHandlers.- Parameters:
handler- theHandlerto add
-
replaceHandler
Replace the given
Handlerto this collection ofHandlers.- Parameters:
oldHandler- theHandlerto replacenewHandler- theHandlerto add- Returns:
trueiff the oldHandler is replaced with the newHandler.
-
removeHandler
Removes the given
Handlerfrom this collection ofHandlers.- Parameters:
handler- theHandlerto remove- Returns:
- whether the
Handlerwas removed
-
addHandler
Adds the
Handlersupplied by the givenSupplierto this collection ofHandlers.- Parameters:
supplier- theHandlersupplier
-
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
-