Class SessionTracker
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.websocket.jakarta.common.SessionTracker
- All Implemented Interfaces:
Dumpable
,Graceful
,LifeCycle
,JakartaWebSocketSessionListener
public class SessionTracker
extends AbstractLifeCycle
implements JakartaWebSocketSessionListener, Graceful, Dumpable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopException
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.Graceful
Graceful.Shutdown, Graceful.ThrowingRunnable
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doStart()
Method to override to start the lifecycleprotected void
doStop()
Method to override to stop the lifecyclevoid
dump
(Appendable out, String indent) Dump this object (and children) into an Appendable using the provided indent after any new lines.int
Set<jakarta.websocket.Session>
boolean
void
void
shutdown()
Shutdown the component.Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addEventListener, getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, setEventListeners, 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.websocket.jakarta.common.JakartaWebSocketSessionListener
onJakartaWebSocketSessionCreated
-
Constructor Details
-
SessionTracker
public SessionTracker()
-
-
Method Details
-
getSessions
-
onJakartaWebSocketSessionOpened
- Specified by:
onJakartaWebSocketSessionOpened
in interfaceJakartaWebSocketSessionListener
-
onJakartaWebSocketSessionClosed
- Specified by:
onJakartaWebSocketSessionClosed
in interfaceJakartaWebSocketSessionListener
-
doStart
Description copied from class:AbstractLifeCycle
Method to override to start the lifecycle- Overrides:
doStart
in classAbstractLifeCycle
- Throws:
AbstractLifeCycle.StopException
- If thrown, the lifecycle will immediately be stopped.Exception
- If there was a problem starting. Will cause a transition to FAILED state
-
doStop
Description copied from class:AbstractLifeCycle
Method to override to stop the lifecycle- Overrides:
doStop
in classAbstractLifeCycle
- Throws:
Exception
- If there was a problem stopping. Will cause a transition to FAILED state
-
shutdown
Description copied from interface:Graceful
Shutdown the component. When this method returns, the component should not accept any new load. -
isShutdown
public boolean isShutdown()- Specified by:
isShutdown
in interfaceGraceful
- Returns:
- True if
Graceful.shutdown()
has been called.
-
getNumSessions
-
dump
Description copied from interface:Dumpable
Dump 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.- Specified by:
dump
in interfaceDumpable
- Parameters:
out
- The appendable to dump toindent
- The indent to apply after any new lines.- Throws:
IOException
- if unable to write to Appendable
-