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 Handler
s.
-
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.Wrapper
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.thread.Invocable
Invocable.Callable, Invocable.InvocationType, Invocable.ReadyTask, Invocable.Task
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
Nested 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 void
addHandler
(Supplier<Handler> supplier) Adds theHandler
supplied by the givenSupplier
to this collection ofHandler
s.default void
addHandler
(Handler handler) Adds the givenHandler
to this collection ofHandler
s.default boolean
removeHandler
(Handler handler) Removes the givenHandler
from this collection ofHandler
s.void
setHandlers
(List<Handler> handlers) Sets the givenHandler
s as children of this collection ofHandler
s.default void
setHandlers
(Handler... handlers) Similar tosetHandlers(List)
.Methods inherited from interface org.eclipse.jetty.util.component.Destroyable
destroy
Methods inherited from interface org.eclipse.jetty.server.Handler.Container
getContainer, getDescendant, getDescendants, getDescendants, getHandlers
Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle
addEventListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, start, stop
Methods inherited from interface org.eclipse.jetty.server.Request.Handler
getInvocationType, handle
-
Method Details
-
addHandler
Adds the given
Handler
to this collection ofHandler
s.- Parameters:
handler
- theHandler
to add
-
removeHandler
Removes the given
Handler
from this collection ofHandler
s.- Parameters:
handler
- theHandler
to remove- Returns:
- whether the
Handler
was removed
-
addHandler
Adds the
Handler
supplied by the givenSupplier
to this collection ofHandler
s.- Parameters:
supplier
- theHandler
supplier
-
setHandlers
Sets the given
Handler
s as children of this collection ofHandler
s.The list is copied and any subsequent modification to the list does not have any effect on this
Handler
.Any existing children
Handler
is removed.- Parameters:
handlers
- theHandler
to set as children
-
setHandlers
Similar to
setHandlers(List)
.- Parameters:
handlers
- theHandler
to set as children
-