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
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe client-side HTTP/3 API representing a connection with a server.static interfaceASession.Listeneris the passive counterpart of aSessionand receives events happening on an HTTP/3 connection.static interfaceThe server-side HTTP/3 API representing a connection with a client. -
Method Summary
Modifier and TypeMethodDescriptiondefault SocketAddressdefault SocketAddressdefault 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
CompletableFuturethat gets notified when the frame has been sent
-