Class SessionTracker
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.websocket.common.SessionTracker
- All Implemented Interfaces:
org.eclipse.jetty.util.component.Dumpable
,org.eclipse.jetty.util.component.LifeCycle
,WebSocketSessionListener
public class SessionTracker
extends org.eclipse.jetty.util.component.AbstractLifeCycle
implements WebSocketSessionListener, 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
void
onSessionClosed
(WebSocketSession session) void
onSessionCreated
(WebSocketSession 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
Methods inherited from interface org.eclipse.jetty.websocket.common.WebSocketSessionListener
onSessionOpened
-
Field Details
-
sessions
-
-
Constructor Details
-
SessionTracker
public SessionTracker()
-
-
Method Details
-
getSessions
-
onSessionCreated
- Specified by:
onSessionCreated
in interfaceWebSocketSessionListener
-
onSessionClosed
- Specified by:
onSessionClosed
in interfaceWebSocketSessionListener
-
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
-