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.

  • 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>
    Get a list of descendants of the passed type.
     

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

    destroy, 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)
      Get a list of descendants of the passed type. The default implementation is not memory efficient and should be overridden.
      Type Parameters:
      T - the type of Handler
      Parameters:
      type - the type of 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 Handler
      Parameters:
      type - the type of 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 Handler
      Parameters:
      handler - the child Handler
      type - the type of Handler
      Returns:
      the Handler.Container of the given type, parent of the given Handler