Class SessionContainer

java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.http2.SessionContainer
All Implemented Interfaces:
EventListener, org.eclipse.jetty.io.Connection.Listener, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.component.Graceful, org.eclipse.jetty.util.component.LifeCycle

@ManagedObject("The container of HTTP/2 sessions") public class SessionContainer extends org.eclipse.jetty.util.component.AbstractLifeCycle implements org.eclipse.jetty.io.Connection.Listener, org.eclipse.jetty.util.component.Graceful, org.eclipse.jetty.util.component.Dumpable

A container of HTTP/2 Session instances.

This container is part of the Jetty component tree, but the session instances are not part of the component tree for performance reasons.

This container ensures that the session instances are dumped as if they were part of the component tree.

  • Nested Class Summary

    Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener, org.eclipse.jetty.util.component.AbstractLifeCycle.StopException

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable

    org.eclipse.jetty.util.component.Dumpable.DumpableContainer, org.eclipse.jetty.util.component.Dumpable.DumpAppendable

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Graceful

    org.eclipse.jetty.util.component.Graceful.Shutdown, org.eclipse.jetty.util.component.Graceful.ThrowingRunnable

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

    org.eclipse.jetty.util.component.LifeCycle.Listener
  • Field Summary

    Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    FAILED, STARTED, STARTING, STOPPED, STOPPING

    Fields inherited from interface org.eclipse.jetty.util.component.Dumpable

    LEGEND
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    dump(Appendable out, String indent)
     
     
    int
     
    boolean
     
    void
    onClosed(org.eclipse.jetty.io.Connection connection)
     
    void
    onOpened(org.eclipse.jetty.io.Connection connection)
     
     
     

    Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    addEventListener, doStart, doStop, getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, setEventListeners, start, stop

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

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

    dump, dumpSelf
  • Constructor Details

    • SessionContainer

      public SessionContainer()
  • Method Details

    • onOpened

      public void onOpened(org.eclipse.jetty.io.Connection connection)
      Specified by:
      onOpened in interface org.eclipse.jetty.io.Connection.Listener
    • onClosed

      public void onClosed(org.eclipse.jetty.io.Connection connection)
      Specified by:
      onClosed in interface org.eclipse.jetty.io.Connection.Listener
    • shutdown

      public CompletableFuture<Void> shutdown()
      Specified by:
      shutdown in interface org.eclipse.jetty.util.component.Graceful
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface org.eclipse.jetty.util.component.Graceful
    • getSessions

      public Set<Session> getSessions()
    • getSize

      @ManagedAttribute("The number of HTTP/2 sessions in this container") public int getSize()
    • dump

      public void dump(Appendable out, String indent) throws IOException
      Specified by:
      dump in interface org.eclipse.jetty.util.component.Dumpable
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class org.eclipse.jetty.util.component.AbstractLifeCycle