Represents a logical connection with a remote peer, identified by a QUIC connection ID.
Each QuicSession maintains a number of QUIC streams, identified by their QUIC stream ID;
Each QUIC stream is wrapped in an EndPoint, namely QuicStreamEndPoint.
Bytes received from a QuicConnection in process(SocketAddress, ByteBuffer)
are passed to Quiche for processing; in turn, Quiche produces a list of QUIC stream IDs that
have pending I/O events, either read-ready or write-ready.
On the receive side, a QuicSession fans-out to multiple QuicStreamEndPoints.
On the send side, many QuicStreamEndPoints fan-in to a QuicSession.
ProtocolSession
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| public static interface | QuicSession.
A listener for |
| Modifier and Type | Field and Description |
|---|---|
| private final ByteBufferPool | |
| private final QuicConnection | |
| private final ConcurrentMap | |
| private final Executor | |
| private final QuicSession. | |
| private long | |
| private final AtomicLong[] | |
| private static final Logger | |
| private volatile ProtocolSession | |
| private final QuicheConnection | |
| private QuicheConnectionId | |
| private SocketAddress | |
| private final Scheduler |
| Access | Constructor and Description |
|---|---|
| protected | QuicSession(Executor executor, Scheduler scheduler, ByteBufferPool byteBufferPool, QuicheConnection quicheConnection, QuicConnection connection, SocketAddress remoteAddress)
|
| Modifier and Type | Method and Description |
|---|---|
| protected abstract ProtocolSession | |
| protected void | doStart()
Overrides org. Starts the managed lifecycle beans in the order they were added. |
| protected void | doStop()
Overrides org. Stops the managed lifecycle beans in the reverse order they were added. |
| public void | dump(Appendable out, String indent)
Overrides org. Implements org. Dump this object (and children) into an Appendable using the provided indent after any new lines. |
| public int | |
| private void | |
| public int | |
| public void | |
| public ByteBufferPool | |
| public QuicheConnectionId | |
| public Executor | |
| public long | |
| public SocketAddress | |
| public int | |
| public String | |
| public QuicStreamEndPoint | |
| public ProtocolSession | |
| public QuicConnection | |
| public Collection | |
| pack-priv List | |
| public SocketAddress | |
| public CloseInfo | |
| public Scheduler | |
| pack-priv QuicStreamEndPoint | |
| public long | |
| public long | |
| pack-priv List | |
| public void | |
| public boolean | |
| public boolean | |
| public abstract Connection | |
| private QuicStreamEndPoint | |
| public long | |
| private void | |
| private void | |
| public void | |
| public boolean | |
| public void | |
| protected Runnable | |
| public Runnable | |
| public void | |
| public void | |
| public void | |
| public CompletableFuture | |
| public void | |
| public void | |
| public String | toString()
Overrides org. Returns a string representation of the object. |
| byteBufferPool | back to summary |
|---|---|
| private final ByteBufferPool byteBufferPool | |
| connection | back to summary |
|---|---|
| private final QuicConnection connection | |
| endPoints | back to summary |
|---|---|
| private final ConcurrentMap<Long, QuicStreamEndPoint> endPoints | |
| executor | back to summary |
|---|---|
| private final Executor executor | |
| flusher | back to summary |
|---|---|
| private final QuicSession. | |
| idleTimeout | back to summary |
|---|---|
| private long idleTimeout | |
| ids | back to summary |
|---|---|
| private final AtomicLong[] ids | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG Hides org. | |
| protocolSession | back to summary |
|---|---|
| private volatile ProtocolSession protocolSession | |
| quicheConnection | back to summary |
|---|---|
| private final QuicheConnection quicheConnection | |
| quicheConnectionId | back to summary |
|---|---|
| private QuicheConnectionId quicheConnectionId | |
| remoteAddress | back to summary |
|---|---|
| private SocketAddress remoteAddress | |
| scheduler | back to summary |
|---|---|
| private final Scheduler scheduler | |
| QuicSession | back to summary |
|---|---|
| protected QuicSession(Executor executor, Scheduler scheduler, ByteBufferPool byteBufferPool, QuicheConnection quicheConnection, QuicConnection connection, SocketAddress remoteAddress) | |
| createProtocolSession | back to summary |
|---|---|
| protected abstract ProtocolSession createProtocolSession() | |
| doStart | back to summary |
|---|---|
| protected void doStart() throws Exception Overrides org. Doc from org. Starts the managed lifecycle beans in the order they were added.
| |
| doStop | back to summary |
|---|---|
| protected void doStop() throws Exception Overrides org. Doc from org. Stops the managed lifecycle beans in the reverse order they were added.
| |
| dump | back to summary |
|---|---|
| public void dump(Appendable out, String indent) throws IOException Overrides org. Implements org. Doc from org. Dump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.
| |
| fill | back to summary |
|---|---|
| public int fill(long streamId, ByteBuffer buffer) throws IOException | |
| finishOutwardClose | back to summary |
|---|---|
| private void finishOutwardClose(Throwable failure) | |
| flush | back to summary |
|---|---|
| public int flush(long streamId, ByteBuffer buffer, boolean last) throws IOException | |
| flush | back to summary |
|---|---|
| public void flush() | |
| getByteBufferPool | back to summary |
|---|---|
| public ByteBufferPool getByteBufferPool() | |
| getConnectionId | back to summary |
|---|---|
| public QuicheConnectionId getConnectionId() | |
| getExecutor | back to summary |
|---|---|
| public Executor getExecutor() | |
| getIdleTimeout | back to summary |
|---|---|
| public long getIdleTimeout() | |
| getLocalAddress | back to summary |
|---|---|
| public SocketAddress getLocalAddress() | |
| getMaxLocalStreams | back to summary |
|---|---|
| public int getMaxLocalStreams() | |
| getNegotiatedProtocol | back to summary |
|---|---|
| public String getNegotiatedProtocol() | |
| getOrCreateStreamEndPoint | back to summary |
|---|---|
| public QuicStreamEndPoint getOrCreateStreamEndPoint(long streamId, Consumer<QuicStreamEndPoint> consumer) | |
| getProtocolSession | back to summary |
|---|---|
| public ProtocolSession getProtocolSession() | |
| getQuicConnection | back to summary |
|---|---|
| public QuicConnection getQuicConnection() | |
| getQuicStreamEndPoints | back to summary |
|---|---|
| public Collection | |
| getReadableStreamIds | back to summary |
|---|---|
| pack-priv List | |
| getRemoteAddress | back to summary |
|---|---|
| public SocketAddress getRemoteAddress() | |
| getRemoteCloseInfo | back to summary |
|---|---|
| public CloseInfo getRemoteCloseInfo() | |
| getScheduler | back to summary |
|---|---|
| public Scheduler getScheduler() | |
| getStreamEndPoint | back to summary |
|---|---|
| pack-priv QuicStreamEndPoint getStreamEndPoint(long streamId) | |
| getWindowCapacity | back to summary |
|---|---|
| public long getWindowCapacity() | |
| getWindowCapacity | back to summary |
|---|---|
| public long getWindowCapacity(long streamId) throws IOException | |
| getWritableStreamIds | back to summary |
|---|---|
| pack-priv List | |
| inwardClose | back to summary |
|---|---|
| public void inwardClose(long error, String reason) | |
| isConnectionEstablished | back to summary |
|---|---|
| public boolean isConnectionEstablished() | |
| isFinished | back to summary |
|---|---|
| public boolean isFinished(long streamId) | |
| newConnection | back to summary |
|---|---|
| public abstract Connection newConnection(QuicStreamEndPoint endPoint) | |
| newQuicStreamEndPoint | back to summary |
|---|---|
| private QuicStreamEndPoint newQuicStreamEndPoint(long streamId) | |
| newStreamId | back to summary |
|---|---|
public long newStreamId(StreamType streamType)
| |
| notifyClosed | back to summary |
|---|---|
| private void notifyClosed(QuicSession. | |
| notifyOpened | back to summary |
|---|---|
| private void notifyOpened(QuicSession. | |
| onFailure | back to summary |
|---|---|
| public void onFailure(Throwable failure) | |
| onIdleTimeout | back to summary |
|---|---|
| public boolean onIdleTimeout() | |
| outwardClose | back to summary |
|---|---|
| public void outwardClose(long error, String reason) | |
| pollTask | back to summary |
|---|---|
| protected Runnable pollTask() | |
| process | back to summary |
|---|---|
| public Runnable process(SocketAddress remoteAddress, ByteBuffer cipherBufferIn) throws IOException | |
| remove | back to summary |
|---|---|
| public void remove(QuicStreamEndPoint endPoint, Throwable failure) | |
| setConnectionId | back to summary |
|---|---|
| public void setConnectionId(QuicheConnectionId quicheConnectionId) | |
| setIdleTimeout | back to summary |
|---|---|
| public void setIdleTimeout(long idleTimeout) | |
| shutdown | back to summary |
|---|---|
| public CompletableFuture | |
| shutdownInput | back to summary |
|---|---|
| public void shutdownInput(long streamId, long error) throws IOException | |
| shutdownOutput | back to summary |
|---|---|
| public void shutdownOutput(long streamId, long error) throws IOException | |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Modifier and Type | Field and Description |
|---|---|
| private RetainableByteBuffer | |
| private final CyclicTimeout |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public Invocable. | |
| protected void | onCompleteFailure(Throwable failure)
Overrides org. Invoked when the overall task has completed with a failure. |
| protected void | onCompleteSuccess()
Overrides org. Invoked when the overall task has completed successfully. |
| protected IteratingCallback. | process()
Implements abstract org. Method called by |
| public void | succeeded()
Overrides org. Overrides default org. Method to invoke when the asynchronous sub-task succeeds. |
| cipherBuffer | back to summary |
|---|---|
| private RetainableByteBuffer cipherBuffer | |
| timeout | back to summary |
|---|---|
| private final CyclicTimeout timeout | |
| Flusher | back to summary |
|---|---|
| public Flusher(Scheduler scheduler) | |
| finish | back to summary |
|---|---|
| private void finish(Throwable failure) | |
| getInvocationType | back to summary |
|---|---|
| public Invocable. Overrides default org.
| |
| onCompleteFailure | back to summary |
|---|---|
| protected void onCompleteFailure(Throwable failure) Overrides org. Doc from org. Invoked when the overall task has completed with a failure.
| |
| onCompleteSuccess | back to summary |
|---|---|
| protected void onCompleteSuccess() Overrides org. Doc from org. Invoked when the overall task has completed successfully.
| |
| process | back to summary |
|---|---|
| protected IteratingCallback. Implements abstract org. Doc from org. Method called by Implementations must initiate the asynchronous execution of the sub-task (if any) and return an appropriate action:
| |
| succeeded | back to summary |
|---|---|
| public void succeeded() Overrides org. Overrides default org. Doc from org. Method to invoke when the asynchronous sub-task succeeds.
Subclasses that override this method must always remember
to call
| |
A listener for QuicSession events.
| Modifier and Type | Method and Description |
|---|---|
| public default void | |
| public default void |
| onClosed | back to summary |
|---|---|
| public default void onClosed(QuicSession session) Callback method invoked when a
| |
| onOpened | back to summary |
|---|---|
| public default void onOpened(QuicSession session) Callback method invoked when a
| |