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
FieldsFields 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doStop()
void
dump
(Appendable out, String indent) int
Set
<javax.websocket.Session> void
onSessionClosed
(JsrSession session) void
onSessionOpened
(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, 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
-
sessions
-
-
Constructor Details
-
JsrSessionTracker
public JsrSessionTracker()
-
-
Method Details
-
getSessions
-
onSessionOpened
- Specified by:
onSessionOpened
in interfaceJsrSessionListener
-
onSessionClosed
- Specified by:
onSessionClosed
in interfaceJsrSessionListener
-
doStop
- Overrides:
doStop
in classorg.eclipse.jetty.util.component.AbstractLifeCycle
- Throws:
Exception
-
getNumSessions
@ManagedAttribute("Total number of active WebSocket Sessions") public int getNumSessions() -
dump
- Specified by:
dump
in interfaceorg.eclipse.jetty.util.component.Dumpable
- Throws:
IOException
-