Package org.eclipse.jetty.http3.api
Interface Session
- All Known Subinterfaces:
Session.Client
,Session.Server
public interface Session
The low-level HTTP/3 API representing a connection with a remote peer.
A Session
is the active part of the connection, and by calling its APIs
applications can generate events on the connection.
Conversely, Session.Listener
is the passive part of the connection,
and has callback methods that are invoked when events happen on the connection.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
The client-side HTTP/3 API representing a connection with a server.static interface
ASession.Listener
is the passive counterpart of aSession
and receives events happening on an HTTP/3 connection.static interface
The server-side HTTP/3 API representing a connection with a client. -
Method Summary
Modifier and TypeMethodDescriptiondefault SocketAddress
default SocketAddress
default Collection<Stream>
default CompletableFuture<Void>
goAway
(boolean graceful) Initiates the shutdown of this session by sending a GOAWAY frame to the other peer.
-
Method Details
-
getLocalSocketAddress
- Returns:
- the local socket address this session is bound to
-
getRemoteSocketAddress
- Returns:
- the remote socket address this session is connected to
-
getStreams
- Returns:
- a snapshot of all the streams currently belonging to this session
-
goAway
Initiates the shutdown of this session by sending a GOAWAY frame to the other peer.
- Parameters:
graceful
- whether the shutdown should be graceful- Returns:
- the
CompletableFuture
that gets notified when the frame has been sent
-