Class JsrSessionTracker

java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.websocket.jsr356.JsrSessionTracker
All Implemented Interfaces:
org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.component.LifeCycle, JsrSessionListener

public class JsrSessionTracker extends org.eclipse.jetty.util.component.AbstractLifeCycle implements JsrSessionListener, org.eclipse.jetty.util.component.Dumpable
  • Nested Class Summary

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

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

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

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

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

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

    Fields
    Modifier and Type
    Field
    Description
    private final Set<JsrSession>
     

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

    FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING

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

    KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    void
    dump(Appendable out, String indent)
     
    int
     
    Set<javax.websocket.Session>
     
    void
     
    void
     

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

    addLifeCycleListener, doStart, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop, toString

    Methods inherited from class java.lang.Object

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

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

    dump, dumpSelf
  • Field Details

  • Constructor Details

    • JsrSessionTracker

      public JsrSessionTracker()
  • Method Details

    • getSessions

      public Set<javax.websocket.Session> getSessions()
    • onSessionOpened

      public void onSessionOpened(JsrSession session)
      Specified by:
      onSessionOpened in interface JsrSessionListener
    • onSessionClosed

      public void onSessionClosed(JsrSession session)
      Specified by:
      onSessionClosed in interface JsrSessionListener
    • doStop

      protected void doStop() throws Exception
      Overrides:
      doStop in class org.eclipse.jetty.util.component.AbstractLifeCycle
      Throws:
      Exception
    • getNumSessions

      @ManagedAttribute("Total number of active WebSocket Sessions") public int getNumSessions()
    • dump

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