Interface Handler.Container

All Superinterfaces:
Destroyable, Handler, Invocable, LifeCycle, Request.Handler
All Known Subinterfaces:
Handler.Collection, Handler.Singleton, HandlerContainer
All Known Implementing Classes:
AbstractHandlerContainer, BufferedResponseHandler, ConditionalHandler, ConditionalHandler.Abstract, ConditionalHandler.DontHandle, ConditionalHandler.ElseNext, ConditionalHandler.Reject, ConditionalHandler.SkipNext, ConnectHandler, ConstraintSecurityHandler, ContextHandler, ContextHandlerCollection, CrossOriginHandler, DebugHandler, DelayedHandler, EagerFormHandler, EventsHandler, GracefulHandler, GzipHandler, Handler.AbstractContainer, Handler.Sequence, Handler.Wrapper, HotSwapHandler, HttpSpiContextHandler, IdleTimeoutHandler, InetAccessHandler, LatencyRecordingHandler, MovedContextHandler, PathMappingsHandler, QoSHandler, ResourceHandler, ResourceHandler.ResourceContext, RewriteHandler, SecuredRedirectHandler, SecurityHandler, SecurityHandler.PathMapped, Server, ServletContextHandler, ServletHandler, SessionHandler, SessionHandler, ShutdownHandler, SizeLimitHandler, StateTrackingHandler, StatisticsHandler, StatisticsHandler.MinimumDataRateHandler, ThreadLimitHandler, TryPathsHandler, WebAppContext, WebSocketUpgradeHandler, WebSocketUpgradeHandler
Enclosing interface:
Handler

@ManagedObject public static interface Handler.Container extends Handler

A Handler that contains one or more other Handlers.

See Also:
  • Method Details

    • getHandlers

      @ManagedAttribute(value="The direct children Handlers of this Container", readonly=true) 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