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
,Container
,Destroyable
,Dumpable
,Dumpable.DumpableContainer
,LifeCycle
- Direct Known Subclasses:
HTTP3SessionClient
-
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.Container
Container.InheritedListener, Container.Listener
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer, Dumpable.DumpAppendable
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
Nested classes/interfaces inherited from interface org.eclipse.jetty.http3.api.Session
Session.Client, Session.Listener, Session.Server
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionHTTP3Session
(Scheduler scheduler, ProtocolSession session, Session.Listener listener) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close
(long error, String reason, Promise.Invocable<Session> promise) Called when 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.protected HTTP3Stream
createStream
(StreamEndPoint endPoint) void
dump
(Appendable out, String indent) Dump this object (and children) into an Appendable using the provided indent after any new lines.long
Get the local socket address this session is bound to.long
Get the remote socket address this session is connected to.protected HTTP3Stream
getStream
(long streamId) long
void
goAway
(boolean graceful, Promise.Invocable<Session> promise) Initiates the shutdown of this session by sending a GOAWAY frame to the other peer.boolean
isClosed()
protected GoAwayFrame
newGoAwayFrame
(boolean graceful) protected abstract HTTP3Stream
newHTTP3Stream
(StreamEndPoint endPoint, boolean local) void
Called when the local peer receives a close initiated by the remote peer.protected void
protected void
onGoAway
(GoAwayFrame frame) protected void
onHeaders
(long streamId, HeadersFrame frame, boolean wasBlocked) boolean
onIdleTimeout
(TimeoutException timeout) void
onOpen()
void
onSessionFailure
(long error, String reason, Throwable failure) protected void
onSettings
(SettingsFrame frame) void
onStreamFailure
(long streamId, long error, Throwable failure) void
setStreamIdleTimeout
(long streamIdleTimeout) shutdown()
toString()
abstract void
writeControlFrame
(Frame frame, Callback callback) abstract void
writeMessageFrame
(StreamEndPoint streamEndPoint, Frame frame, 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, installBean, installBean, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeans
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.util.component.Container
getCachedBeans, getEventListeners
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
Constructor Details
-
HTTP3Session
-
-
Method Details
-
getProtocolSession
-
getListener
-
getParserListener
-
onOpen
public void onOpen() -
getLocalSocketAddress
Description copied from interface:Session
Get the local socket address this session is bound to.- Specified by:
getLocalSocketAddress
in interfaceSession
- Returns:
- the local socket address this session is bound to
-
getRemoteSocketAddress
Description copied from interface:Session
Get the remote socket address this session is connected to.- Specified by:
getRemoteSocketAddress
in interfaceSession
- Returns:
- the remote socket address this session is connected to
-
getStreams
- Specified by:
getStreams
in interfaceSession
- Returns:
- a snapshot of all the streams currently belonging to this session
-
getMaxLocalStreams
public long getMaxLocalStreams() -
goAway
Description copied from interface:Session
Initiates the shutdown of this session by sending a GOAWAY frame to the other peer.
- Specified by:
goAway
in interfaceSession
- Parameters:
graceful
- whether the shutdown should be gracefulpromise
- thePromise.Invocable
that 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
-
newHTTP3Stream
-
getStream
-
writeControlFrame
-
writeMessageFrame
public abstract void writeMessageFrame(StreamEndPoint streamEndPoint, Frame frame, Callback callback) -
onPreface
-
onHeaders
-
onData
-
onSettings
-
onGoAway
-
onStreamFailure
-
onSessionFailure
-
onIdleTimeout
-
close
Called when 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 reasonpromise
- thePromise.Invocable
that gets notified when the close is complete- 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
close(long, String, Promise.Invocable)
.- Parameters:
error
- the close errorreason
- the close reason
-
isClosed
public boolean isClosed() -
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
- Overrides:
dump
in 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:
toString
in classAbstractLifeCycle
-