Interface Session

All Known Subinterfaces:
ISession
All Known Implementing Classes:
HTTP2ClientSession, HTTP2ServerSession, HTTP2Session

public interface Session

A Session represents the client-side endpoint of an HTTP/2 connection to a single origin server.

Once a Session has been obtained, it can be used to open HTTP/2 streams:

 Session session = ...;
 HeadersFrame frame = ...;
 Promise<Stream> promise = ...
 session.newStream(frame, promise, new Stream.Listener.Adapter()
 {
     public void onHeaders(Stream stream, HeadersFrame frame)
     {
         // Reply received
     }
 });
 

A Session is the active part of the endpoint, and by calling its API applications can generate events on the connection; conversely Session.Listener is the passive part of the endpoint, and has callbacks that are invoked when events happen on the connection.

See Also: