java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.http3.internal.HTTP3Session
- All Implemented Interfaces:
Session,ParserListener,org.eclipse.jetty.util.component.Container,org.eclipse.jetty.util.component.Destroyable,org.eclipse.jetty.util.component.Dumpable,org.eclipse.jetty.util.component.Dumpable.DumpableContainer,org.eclipse.jetty.util.component.LifeCycle
public abstract class HTTP3Session
extends org.eclipse.jetty.util.component.ContainerLifeCycle
implements Session, ParserListener
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener, org.eclipse.jetty.util.component.AbstractLifeCycle.StopExceptionNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.ListenerNested 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.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.http3.internal.parser.ParserListener
ParserListener.WrapperNested classes/interfaces inherited from interface org.eclipse.jetty.http3.api.Session
Session.Client, Session.Listener, Session.Server -
Field Summary
Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, STARTED, STARTING, STOPPED, STOPPINGFields inherited from interface org.eclipse.jetty.util.component.Dumpable
KEY -
Constructor Summary
ConstructorsConstructorDescriptionHTTP3Session(org.eclipse.jetty.quic.common.ProtocolSession session, Session.Listener listener) -
Method Summary
Modifier and TypeMethodDescriptionprotected HTTP3StreamcreateStream(org.eclipse.jetty.quic.common.QuicStreamEndPoint endPoint, Consumer<Throwable> fail) voiddump(Appendable out, String indent) longintprotected HTTP3StreamgetOrCreateStream(org.eclipse.jetty.quic.common.QuicStreamEndPoint endPoint) org.eclipse.jetty.quic.common.ProtocolSessionprotected 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.booleanisClosed()protected GoAwayFramenewGoAwayFrame(boolean graceful) protected abstract HTTP3StreamnewHTTP3Stream(org.eclipse.jetty.quic.common.QuicStreamEndPoint endPoint, boolean local) voidCalled when the local peer receives a close initiated by the remote peer.voidvoidonDataAvailable(long streamId) voidonGoAway(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, org.eclipse.jetty.util.Callback callback) abstract voidwriteMessageFrame(long streamId, Frame frame, org.eclipse.jetty.util.Callback callback) Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, doStop, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeansMethods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.component.Container
getCachedBeans, getEventListenersMethods inherited from interface org.eclipse.jetty.util.component.Dumpable
dumpSelfMethods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
Constructor Details
-
HTTP3Session
public HTTP3Session(org.eclipse.jetty.quic.common.ProtocolSession session, Session.Listener listener)
-
-
Method Details
-
getProtocolSession
public org.eclipse.jetty.quic.common.ProtocolSession getProtocolSession() -
getListener
-
onOpen
public void onOpen() -
getLocalSocketAddress
- Specified by:
getLocalSocketAddressin interfaceSession- Returns:
- the local socket address this session is bound to
-
getRemoteSocketAddress
- 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
protected HTTP3Stream createStream(org.eclipse.jetty.quic.common.QuicStreamEndPoint endPoint, Consumer<Throwable> fail) -
getOrCreateStream
-
newHTTP3Stream
protected abstract HTTP3Stream newHTTP3Stream(org.eclipse.jetty.quic.common.QuicStreamEndPoint endPoint, boolean local) -
getStream
-
removeStream
-
writeControlFrame
-
writeMessageFrame
public abstract void writeMessageFrame(long streamId, Frame frame, org.eclipse.jetty.util.Callback callback) -
onPreface
-
onSettings
- Specified by:
onSettingsin interfaceParserListener
-
onHeaders
- Specified by:
onHeadersin interfaceParserListener
-
onData
- Specified by:
onDatain interfaceParserListener
-
onDataAvailable
public void onDataAvailable(long streamId) -
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
- Specified by:
dumpin interfaceorg.eclipse.jetty.util.component.Dumpable- Overrides:
dumpin classorg.eclipse.jetty.util.component.ContainerLifeCycle- Throws:
IOException
-
toString
- Overrides:
toStringin classorg.eclipse.jetty.util.component.AbstractLifeCycle
-