Interface Session.Client

All Superinterfaces:
Session
All Known Implementing Classes:
HTTP3SessionClient
Enclosing interface:
Session

public static interface Session.Client extends Session

The client-side HTTP/3 API representing a connection with a server.

Once a Session has been obtained, it can be used to make HTTP/3 requests:

 Session session = ...;
 HeadersFrame headersFrame = ...;
 session.newRequest(headersFrame, new Stream.Listener()
 {
     @Override
     public void onResponse(Stream stream, HeadersFrame frame)
     {
         // Response headers received.
     }
 });
 
See Also:
  • Method Details

    • newRequest

      Makes a request by creating a HTTP/3 stream and sending the given HEADERS frame.

      Parameters:
      frame - the HEADERS frame containing the HTTP request headers
      listener - the listener that gets notified of stream events
      Returns:
      a CompletableFuture that is notified of the stream creation