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.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) intvoidonSessionClosed(WebSocketSession session) voidonSessionCreated(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, 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, dumpSelfMethods inherited from interface WebSocketSessionListener
onSessionOpened
-
Field Details
-
sessions
-
-
Constructor Details
-
SessionTracker
public SessionTracker()
-
-
Method Details
-
getSessions
-
onSessionCreated
- Specified by:
onSessionCreatedin interfaceWebSocketSessionListener
-
onSessionClosed
- Specified by:
onSessionClosedin interfaceWebSocketSessionListener
-
doStop
-
getNumSessions
@ManagedAttribute("Total number of active WebSocket Sessions") public int getNumSessions() -
dump
- Specified by:
dumpin interfaceorg.eclipse.jetty.util.component.Dumpable- Throws:
IOException
-