<p>A {@link Session} represents the client-side endpoint of a HTTP/2 connection to a single origin server.</p> <p>Once a {@link Session} has been obtained, it can be used to open HTTP/2 streams:</p> <pre> Session session = ...; HeadersFrame frame = ...; Promise<Stream> promise = ... session.newStream(frame, promise, new Stream.Listener.Adapter() { void onHeaders(Stream stream, HeadersFrame frame) { // Reply received } }); </pre> <p>A {@link Session} is the active part of the endpoint, and by calling its API applications can generate events on the connection; conversely {@link Session.Listener} is the passive part of the endpoint, and has callbacks that are invoked when events happen on the connection.</p>