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.AbstractLifeCycleListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
org.eclipse.jetty.util.component.Dumpable.DumpableContainerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.Listener -
Field Summary
FieldsFields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPINGFields inherited from interface org.eclipse.jetty.util.component.Dumpable
KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoStop()voiddump(Appendable out, String indent) intSet<javax.websocket.Session> voidonSessionClosed(JsrSession session) voidonSessionOpened(JsrSession session) 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, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.component.Dumpable
dump, dumpSelf
-
Field Details
-
sessions
-
-
Constructor Details
-
JsrSessionTracker
public JsrSessionTracker()
-
-
Method Details
-
getSessions
-
onSessionOpened
- Specified by:
onSessionOpenedin interfaceJsrSessionListener
-
onSessionClosed
- Specified by:
onSessionClosedin interfaceJsrSessionListener
-
doStop
-
getNumSessions
@ManagedAttribute("Total number of active WebSocket Sessions") public int getNumSessions() -
dump
- Specified by:
dumpin interfaceorg.eclipse.jetty.util.component.Dumpable- Throws:
IOException
-