Package org.eclipse.jetty.http2
Class SessionContainer
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.http2.SessionContainer
- All Implemented Interfaces:
EventListener
,Connection.Listener
,Dumpable
,Graceful
,LifeCycle
- Direct Known Subclasses:
AbstractHTTP2ServerConnectionFactory.HTTP2SessionContainer
@ManagedObject("The container of HTTP/2 sessions")
public class SessionContainer
extends AbstractLifeCycle
implements Connection.Listener, Graceful, Dumpable
A container of HTTP/2 Session
instances.
This container is part of the Jetty component tree, but the session instances are not part of the component tree for performance reasons.
This container ensures that the session instances are dumped as if they were part of the component tree.
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
dump
(Appendable out, String indent) Dump this object (and children) into an Appendable using the provided indent after any new lines.int
getSize()
boolean
void
onClosed
(Connection connection) void
onOpened
(Connection connection) shutdown()
Shutdown the component.toString()
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addEventListener, doStart, doStop, getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, setEventListeners, start, stop
-
Constructor Details
-
SessionContainer
public SessionContainer()
-
-
Method Details
-
onOpened
- Specified by:
onOpened
in interfaceConnection.Listener
-
onClosed
- Specified by:
onClosed
in interfaceConnection.Listener
-
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.
-
getSessions
-
getSize
public int getSize() -
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
-
toString
- Overrides:
toString
in classAbstractLifeCycle
-