- All Superinterfaces:
org.eclipse.jetty.util.component.Destroyable,Handler,Handler.Container,org.eclipse.jetty.util.thread.Invocable,org.eclipse.jetty.util.component.LifeCycle,Request.Handler
- All Known Implementing Classes:
BufferedResponseHandler,ConnectHandler,ContextHandler,DebugHandler,DelayedHandler,EventsHandler,GracefulHandler,GzipHandler,Handler.Wrapper,HotSwapHandler,IdleTimeoutHandler,InetAccessHandler,LatencyRecordingHandler,MovedContextHandler,ProxiedRequestHandler,ResourceHandler,ResourceHandler.ResourceContext,SecuredRedirectHandler,Server,ShutdownHandler,SizeLimitHandler,StatisticsHandler,StatisticsHandler.MinimumDataRateHandler,ThreadLimitHandler,TryPathsHandler
- Enclosing interface:
Handler
A Handler.Container that can contain a single other Handler.
This is "singleton" in the sense of Collections.singleton(Object) and not
in the sense of the singleton pattern of a single instance per JVM.
- See Also:
-
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
org.eclipse.jetty.util.thread.Invocable.Callable, org.eclipse.jetty.util.thread.Invocable.InvocationType, org.eclipse.jetty.util.thread.Invocable.ReadyTask, org.eclipse.jetty.util.thread.Invocable.TaskNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.Listener -
Field Summary
Fields inherited from interface org.eclipse.jetty.util.thread.Invocable
__nonBlocking, NOOP -
Method Summary
Modifier and TypeMethodDescriptiondefault Handler.SingletongetTail()default voidinsertHandler(Handler.Singleton handler) default voidsetHandler(Supplier<Handler> supplier) Set the nested handler from a supplier.voidsetHandler(Handler handler) Set the nested handler.static HandlerupdateHandler(Handler.Singleton wrapper, Handler handler) Utility method to: Check the server state and invocation type Check for handler loops Set the server on the handler Update the beans on if the Nests is aContainerLifeCycleMethods inherited from interface org.eclipse.jetty.server.Handler.Container
getContainer, getDescendant, getDescendants, getDescendantsMethods inherited from interface org.eclipse.jetty.util.thread.Invocable
getInvocationTypeMethods 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
handle
-
Method Details
-
getHandler
Handler getHandler() -
setHandler
Set the nested handler. Implementations should check for loops, set the server and update anyContainerLifeCyclebeans, all of which can be done by using the utility methodupdateHandler(Singleton, Handler)- Parameters:
handler- The handler to set.
-
setHandler
Set the nested handler from a supplier. This allows for Handler type conversion.- Parameters:
supplier- A supplier of a Handler.
-
getHandlers
- Specified by:
getHandlersin interfaceHandler.Container- Returns:
- an immutable collection of
Handlers directly contained by thisHandler.
-
insertHandler
-
getTail
- Returns:
- The tail
Handler.Singletonof a chain ofHandler.Singletons
-
updateHandler
Utility method to:- Check the server state and invocation type
- Check for handler loops
- Set the server on the handler
- Update the beans on if the Nests is a
ContainerLifeCycle
- Parameters:
wrapper- The Nested implementation to updatehandler- The handle to set- Returns:
- The set handler.
-