Interface Handler.Container

All Superinterfaces:
org.eclipse.jetty.util.component.Destroyable, Handler, org.eclipse.jetty.util.thread.Invocable, org.eclipse.jetty.util.component.LifeCycle, Request.Handler
All Known Subinterfaces:
Handler.Collection, Handler.Singleton, HandlerContainer
All Known Implementing Classes:
AbstractHandlerContainer, BufferedResponseHandler, ConnectHandler, ContextHandler, ContextHandlerCollection, DebugHandler, DelayedHandler, EventsHandler, GracefulHandler, GzipHandler, Handler.AbstractContainer, Handler.Sequence, Handler.Wrapper, HotSwapHandler, IdleTimeoutHandler, InetAccessHandler, LatencyRecordingHandler, MovedContextHandler, PathMappingsHandler, ProxiedRequestHandler, ResourceHandler, ResourceHandler.ResourceContext, SecuredRedirectHandler, Server, ShutdownHandler, SizeLimitHandler, StatisticsHandler, StatisticsHandler.MinimumDataRateHandler, ThreadLimitHandler, TryPathsHandler
Enclosing interface:
Handler

public static interface Handler.Container extends Handler

A Handler that contains one or more other Handlers.

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.Wrapper

    Nested 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.Task

    Nested 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 Type
    Method
    Description
    default <T extends Handler.Container>
    T
    getContainer(Handler handler, Class<T> type)
     
    default <T extends Handler>
    T
     
    default List<Handler>
     
    default <T extends Handler>
    List<T>
     
     

    Methods inherited from interface org.eclipse.jetty.util.component.Destroyable

    destroy

    Methods inherited from interface org.eclipse.jetty.server.Handler

    getServer, setServer

    Methods inherited from interface org.eclipse.jetty.util.thread.Invocable

    getInvocationType

    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

    handle
  • Method Details

    • getHandlers

      @ManagedAttribute("The direct children Handlers of this container") List<Handler> getHandlers()
      Returns:
      an immutable collection of Handlers directly contained by this Handler.
    • getDescendants

      default List<Handler> getDescendants()
      Returns:
      an immutable collection of Handlers descendants of this Handler.
    • getDescendants

      default <T extends Handler> List<T> getDescendants(Class<T> type)
      Type Parameters:
      T - the type of the descendant Handler
      Parameters:
      type - the class of the descendant Handler
      Returns:
      an immutable collection of Handlers of the given type, descendants of this Handler
    • getDescendant

      default <T extends Handler> T getDescendant(Class<T> type)
      Type Parameters:
      T - the type of the descendantHandler
      Parameters:
      type - the class of the descendant Handler
      Returns:
      the first Handler of the given type, descendants of this Handler, or null if no such Handler exist
    • getContainer

      default <T extends Handler.Container> T getContainer(Handler handler, Class<T> type)
      Type Parameters:
      T - the type of the container Handler
      Parameters:
      handler - the descendant Handler
      type - the class of the container Handler
      Returns:
      the Handler.Container descendant of this Handler that is the ancestor of the given Handler