Class HTTP3Session
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.http3.HTTP3Session
- All Implemented Interfaces:
Session, ParserListener, Container, Destroyable, Dumpable, Dumpable.DumpableContainer, LifeCycle
- Direct Known Subclasses:
HTTP3SessionClient
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopExceptionNested classes/interfaces inherited from interface Container
Container.InheritedListener, Container.ListenerNested classes/interfaces inherited from interface Dumpable
Dumpable.DumpableContainerNested classes/interfaces inherited from interface LifeCycle
LifeCycle.ListenerNested classes/interfaces inherited from interface ParserListener
ParserListener.WrapperNested classes/interfaces inherited from interface Session
Session.Client, Session.Listener, Session.Server -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected HTTP3StreamcreateStream(QuicStreamEndPoint endPoint, Consumer<Throwable> fail) voiddump(Appendable out, String indent) Dump this object (and children) into an Appendable using the provided indent after any new lines.longGet the local socket address this session is bound to.intprotected HTTP3StreamgetOrCreateStream(QuicStreamEndPoint endPoint) Get the remote socket address this session is connected to.protected HTTP3StreamgetStream(long streamId) longgoAway(boolean graceful) Initiates the shutdown of this session by sending a GOAWAY frame to the other peer.voidinwardClose(long error, String reason) Called when a an external event wants to initiate the close of this session locally, for example a close at the network level (due to e.g. stopping a component) or a timeout.booleanisClosed()protected GoAwayFramenewGoAwayFrame(boolean graceful) protected abstract HTTP3StreamnewHTTP3Stream(QuicStreamEndPoint endPoint, boolean local) voidCalled when the local peer receives a close initiated by the remote peer.voidvoidonGoAway(GoAwayFrame frame) voidonHeaders(long streamId, HeadersFrame frame, boolean wasBlocked) booleanvoidonOpen()voidonSessionFailure(long error, String reason, Throwable failure) voidonSettings(SettingsFrame frame) voidonStreamFailure(long streamId, long error, Throwable failure) voidremoveStream(HTTP3Stream stream, Throwable failure) voidsetStreamIdleTimeout(long streamIdleTimeout) shutdown()toString()abstract voidwriteControlFrame(Frame frame, Callback callback) abstract voidwriteMessageFrame(long streamId, Frame frame, Callback callback) Methods inherited from class ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, doStop, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, installBean, installBean, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeansMethods inherited from class AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stopMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Container
getCachedBeans, getEventListenersMethods inherited from interface Dumpable.DumpableContainer
isDumpable
-
Constructor Details
-
HTTP3Session
-
-
Method Details
-
getProtocolSession
-
getListener
-
onOpen
public void onOpen() -
getLocalSocketAddress
Description copied from interface:SessionGet the local socket address this session is bound to.- Specified by:
getLocalSocketAddressin interfaceSession- Returns:
- the local socket address this session is bound to
-
getRemoteSocketAddress
Description copied from interface:SessionGet the remote socket address this session is connected to.- Specified by:
getRemoteSocketAddressin interfaceSession- Returns:
- the remote socket address this session is connected to
-
getStreams
- Specified by:
getStreamsin interfaceSession- Returns:
- a snapshot of all the streams currently belonging to this session
-
getMaxLocalStreams
public int getMaxLocalStreams() -
goAway
Description copied from interface:SessionInitiates the shutdown of this session by sending a GOAWAY frame to the other peer.
- Specified by:
goAwayin interfaceSession- Parameters:
graceful- whether the shutdown should be graceful- Returns:
- the
CompletableFuturethat gets notified when the frame has been sent
-
newGoAwayFrame
-
shutdown
-
getIdleTimeout
public long getIdleTimeout() -
getStreamIdleTimeout
public long getStreamIdleTimeout() -
setStreamIdleTimeout
public void setStreamIdleTimeout(long streamIdleTimeout) -
createStream
-
getOrCreateStream
-
newHTTP3Stream
-
getStream
-
removeStream
-
writeControlFrame
-
writeMessageFrame
-
onPreface
-
onSettings
- Specified by:
onSettingsin interfaceParserListener
-
onHeaders
- Specified by:
onHeadersin interfaceParserListener
-
onData
- Specified by:
onDatain interfaceParserListener
-
onGoAway
- Specified by:
onGoAwayin interfaceParserListener
-
onIdleTimeout
public boolean onIdleTimeout() -
inwardClose
Called when a an external event wants to initiate the close of this session locally, for example a close at the network level (due to e.g. stopping a component) or a timeout.
The correspondent passive event, where it's the remote peer that initiates the close, is delivered via
onClose(long, String).- Parameters:
error- the close errorreason- the close reason- See Also:
-
onClose
Called when the local peer receives a close initiated by the remote peer.
The correspondent active event, where it's the local peer that initiates the close, it's delivered via
inwardClose(long, String).- Parameters:
error- the close errorreason- the close reason
-
onStreamFailure
- Specified by:
onStreamFailurein interfaceParserListener
-
onSessionFailure
- Specified by:
onSessionFailurein interfaceParserListener
-
isClosed
public boolean isClosed() -
dump
Description 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.- Specified by:
dumpin interfaceDumpable- Overrides:
dumpin classContainerLifeCycle- 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:
toStringin classAbstractLifeCycle
-