Interface Session

All Known Subinterfaces:
Session.Client, Session.Server
All Known Implementing Classes:
HTTP3Session, HTTP3SessionClient, HTTP3SessionServer

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:
  • Method Details

    • getLocalSocketAddress

      default SocketAddress getLocalSocketAddress()
      the local socket address this session is bound to
    • getRemoteSocketAddress

      default SocketAddress getRemoteSocketAddress()
      the remote socket address this session is connected to
    • getStreams

      default Collection<Stream> getStreams()
      a snapshot of all the streams currently belonging to this session
    • goAway

      default CompletableFuture<Void> goAway(boolean graceful)

      Initiates the shutdown of this session by sending a GOAWAY frame to the other peer.

      graceful - whether the shutdown should be graceful
      the CompletableFuture that gets notified when the frame has been sent