Class SessionContainer

java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.quic.common.SessionContainer
All Implemented Interfaces:
EventListener, Session.Listener, Dumpable, Graceful, LifeCycle

public class SessionContainer extends AbstractLifeCycle implements EventListener, Session.Listener, Graceful, Dumpable

A container that tracks Session instances.

  • Constructor Details

    • SessionContainer

      public SessionContainer()
  • Method Details

    • onOpen

      public void onOpen(Session session)
      Description copied from interface: Session.Listener

      Callback method invoked when a new session is opened.

      Specified by:
      onOpen in interface Session.Listener
      Parameters:
      session - the QUIC session
    • onDisconnect

      public void onDisconnect(Session session)
      Description copied from interface: Session.Listener

      Callback method invoked when the session has been disconnected.

      Specified by:
      onDisconnect in interface Session.Listener
      Parameters:
      session - the QUIC session
    • shutdown

      public CompletableFuture<Void> shutdown()
      Description copied from interface: Graceful
      Shutdown the component. When this method returns, the component should not accept any new load.
      Specified by:
      shutdown in interface Graceful
      Returns:
      A future that is completed once all load on the component is completed
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface Graceful
      Returns:
      True if Graceful.shutdown() has been called.
    • isEmpty

      public boolean isEmpty()
    • dump

      public String dump()
      Specified by:
      dump in interface Dumpable
    • dump

      public void dump(Appendable out, String indent) throws IOException
      Description copied from interface: Dumpable
      Dump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.
      Specified by:
      dump in interface Dumpable
      Parameters:
      out - The appendable to dump to
      indent - The indent to apply after any new lines.
      Throws:
      IOException - if unable to write to Appendable
    • toString

      public String toString()
      Overrides:
      toString in class AbstractLifeCycle