Class JsrSessionTracker
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.websocket.jsr356.JsrSessionTracker
-
- All Implemented Interfaces:
Dumpable,LifeCycle,JsrSessionListener
public class JsrSessionTracker extends AbstractLifeCycle implements JsrSessionListener, Dumpable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
-
Constructor Summary
Constructors Constructor Description JsrSessionTracker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoStop()voiddump(java.lang.Appendable out, java.lang.String indent)Dump this object (and children) into an Appendable using the provided indent after any new lines.intgetNumSessions()java.util.Set<javax.websocket.Session>getSessions()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, toString
-
-
-
-
Method Detail
-
getSessions
public java.util.Set<javax.websocket.Session> getSessions()
-
onSessionOpened
public void onSessionOpened(JsrSession session)
- Specified by:
onSessionOpenedin interfaceJsrSessionListener
-
onSessionClosed
public void onSessionClosed(JsrSession session)
- Specified by:
onSessionClosedin interfaceJsrSessionListener
-
doStop
protected void doStop() throws java.lang.Exception- Overrides:
doStopin classAbstractLifeCycle- Throws:
java.lang.Exception
-
getNumSessions
@ManagedAttribute("Total number of active WebSocket Sessions") public int getNumSessions()
-
dump
public void dump(java.lang.Appendable out, java.lang.String indent) throws java.io.IOExceptionDescription copied from interface:DumpableDump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.
-
-