A Connection implementation that receives and sends datagram packets via its associated DatagramChannelEndPoint.
The received bytes are peeked to obtain the QUIC connection ID; each QUIC connection ID has an associated
QuicSession, and the received bytes are then passed to the QuicSession for processing.
On the receive side, one QuicConnection fans-out to multiple QuicSessions.
On the send side, many QuicSessions fan-in to one QuicConnection.
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final ByteBufferPool | |
| private final AtomicBoolean | |
| private final Callback | |
| private final QuicConnection. | |
| private final List | |
| private static final Logger | |
| private int | |
| private final Scheduler | |
| private final ConcurrentMap | |
| private final AdaptiveExecutionStrategy | |
| private boolean | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| protected | QuicConnection(Executor executor, Scheduler scheduler, ByteBufferPool bufferPool, EndPoint endPoint)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | addEventListener(EventListener listener)
Overrides org. Implements org. Adds a listener of connection events. |
| public void | close()
Overrides org. Implements org. Performs a logical close of this connection. |
| protected abstract QuicSession | |
| public void | fillInterested()
Overrides org. Utility method to be called to register read interest. |
| public ByteBufferPool | |
| public DatagramChannelEndPoint | |
| public int | |
| public Collection | |
| public Scheduler | |
| public boolean | |
| public boolean | |
| public void | onClose(Throwable cause)
Overrides org. Implements org. Callback method invoked when this connection is closed. |
| protected void | |
| public void | onFillable()
Implements abstract org. Callback method invoked when the endpoint is ready to be read. |
| public abstract boolean | onIdleExpired(TimeoutException timeoutException)
Redeclares org. Overrides org. Callback method invoked upon an idle timeout event. |
| public void | onOpen()
Overrides org. Implements org. Callback method invoked when this connection is opened. |
| public void | |
| private Runnable | |
| private Runnable | |
| public void | removeEventListener(EventListener listener)
Overrides org. Implements org. Removes a listener of connection events. |
| public void | |
| public void | |
| public void | |
| public void |
| bufferPool | back to summary |
|---|---|
| private final ByteBufferPool bufferPool | |
| closed | back to summary |
|---|---|
| private final AtomicBoolean closed | |
| fillableCallback | back to summary |
|---|---|
| private final Callback fillableCallback | |
| flusher | back to summary |
|---|---|
| private final QuicConnection. | |
| listeners | back to summary |
|---|---|
| private final List<QuicSession. | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| outputBufferSize | back to summary |
|---|---|
| private int outputBufferSize | |
| scheduler | back to summary |
|---|---|
| private final Scheduler scheduler | |
| sessions | back to summary |
|---|---|
| private final ConcurrentMap<QuicheConnectionId, QuicSession> sessions | |
| strategy | back to summary |
|---|---|
| private final AdaptiveExecutionStrategy strategy | |
| useInputDirectByteBuffers | back to summary |
|---|---|
| private boolean useInputDirectByteBuffers | |
| useOutputDirectByteBuffers | back to summary |
|---|---|
| private boolean useOutputDirectByteBuffers | |
| QuicConnection | back to summary |
|---|---|
| protected QuicConnection(Executor executor, Scheduler scheduler, ByteBufferPool bufferPool, EndPoint endPoint) | |
| addEventListener | back to summary |
|---|---|
| public void addEventListener(EventListener listener) Overrides org. Implements org. Doc from org. Adds a listener of connection events.
| |
| close | back to summary |
|---|---|
| public void close() Overrides org. Implements org. Doc from org. Performs a logical close of this connection. For simple connections, this may just mean to delegate the close to the associated
| |
| createSession | back to summary |
|---|---|
| protected abstract QuicSession createSession(SocketAddress remoteAddress, ByteBuffer cipherBuffer) throws IOException | |
| fillInterested | back to summary |
|---|---|
| public void fillInterested() Overrides org. Doc from org. Utility method to be called to register read interest. After a call to this method,
| |
| getByteBufferPool | back to summary |
|---|---|
| public ByteBufferPool getByteBufferPool() | |
| getEndPoint | back to summary |
|---|---|
| public DatagramChannelEndPoint getEndPoint() Overrides org. Implements org.
| |
| getOutputBufferSize | back to summary |
|---|---|
| public int getOutputBufferSize() | |
| getQuicSessions | back to summary |
|---|---|
| public Collection | |
| getScheduler | back to summary |
|---|---|
| public Scheduler getScheduler() | |
| isUseInputDirectByteBuffers | back to summary |
|---|---|
| public boolean isUseInputDirectByteBuffers() | |
| isUseOutputDirectByteBuffers | back to summary |
|---|---|
| public boolean isUseOutputDirectByteBuffers() | |
| onClose | back to summary |
|---|---|
| public void onClose(Throwable cause) Overrides org. Implements org. Doc from org. Callback method invoked when this connection is closed. Creators of the connection implementation are responsible for calling this method.
| |
| onFailure | back to summary |
|---|---|
| protected void onFailure(Throwable failure) | |
| onFillable | back to summary |
|---|---|
| public void onFillable() Implements abstract org. Doc from org. Callback method invoked when the endpoint is ready to be read.
| |
| onIdleExpired | back to summary |
|---|---|
| public abstract boolean onIdleExpired(TimeoutException timeoutException) Redeclares org. Overrides org. Doc from org. Callback method invoked upon an idle timeout event. Implementations of this method may return true to indicate that the idle timeout handling should proceed normally, typically failing the EndPoint and causing it to be closed. When false is returned, the handling of the idle timeout event is halted immediately and the EndPoint left in the state it was before the idle timeout event.
| |
| onOpen | back to summary |
|---|---|
| public void onOpen() Overrides org. Implements org. Doc from org. Callback method invoked when this connection is opened. Creators of the connection implementation are responsible for calling this method.
| |
| outwardClose | back to summary |
|---|---|
| public void outwardClose(QuicSession session, Throwable failure) | |
| process | back to summary |
|---|---|
| private Runnable process(QuicSession session, SocketAddress remoteAddress, ByteBuffer cipherBuffer) | |
| receiveAndProcess | back to summary |
|---|---|
| private Runnable receiveAndProcess() | |
| removeEventListener | back to summary |
|---|---|
| public void removeEventListener(EventListener listener) Overrides org. Implements org. Doc from org. Removes a listener of connection events.
| |
| setOutputBufferSize | back to summary |
|---|---|
| public void setOutputBufferSize(int outputBufferSize) | |
| setUseInputDirectByteBuffers | back to summary |
|---|---|
| public void setUseInputDirectByteBuffers(boolean useInputDirectByteBuffers) | |
| setUseOutputDirectByteBuffers | back to summary |
|---|---|
| public void setUseOutputDirectByteBuffers(boolean useOutputDirectByteBuffers) | |
| write | back to summary |
|---|---|
| public void write(Callback callback, SocketAddress remoteAddress, ByteBuffer... buffers) | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | failed(Throwable x)
Overrides default org. Callback invoked when the operation fails. |
| public Invocable. | |
| public void | succeeded()
Overrides default org. Callback invoked when the operation completes. |
| FillableCallback | back to summary |
|---|---|
| private FillableCallback() | |
| failed | back to summary |
|---|---|
| public void failed(Throwable x) Overrides default org. Doc from org. Callback invoked when the operation fails.
| |
| getInvocationType | back to summary |
|---|---|
| public Invocable. Overrides default org.
| |
| succeeded | back to summary |
|---|---|
| public void succeeded() Overrides default org. Doc from org. Callback invoked when the operation completes.
| |
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private QuicConnection. | |
| private final AutoLock | |
| private final ArrayDeque |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | failed(Throwable x)
Overrides org. Overrides default org. Method to invoke when the asynchronous sub-task fails, or to fail the overall asynchronous task and therefore terminate the iteration. |
| public Invocable. | |
| public void | |
| protected void | onCompleteFailure(Throwable cause)
Overrides org. Invoked when the overall task has completed with a failure. |
| 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. |
| entry | back to summary |
|---|---|
| private QuicConnection. | |
| lock | back to summary |
|---|---|
| private final AutoLock lock | |
| queue | back to summary |
|---|---|
| private final ArrayDeque<QuicConnection. | |
| Flusher | back to summary |
|---|---|
| private Flusher() | |
| failed | back to summary |
|---|---|
| public void failed(Throwable x) Overrides org. Overrides default org. Doc from org. Method to invoke when the asynchronous sub-task fails, or to fail the overall asynchronous task and therefore terminate the iteration.
Subclasses that override this method must always remember
to call
Eventually,
| |
| getInvocationType | back to summary |
|---|---|
| public Invocable. Overrides default org.
| |
| offer | back to summary |
|---|---|
| public void offer(Callback callback, SocketAddress address, ByteBuffer[] buffers) | |
| onCompleteFailure | back to summary |
|---|---|
| protected void onCompleteFailure(Throwable cause) Overrides org. Doc from org. Invoked when the overall task has completed with a failure.
| |
| 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
| |
| Modifier and Type | Field and Description |
|---|---|
| private final SocketAddress | |
| private final ByteBuffer[] | |
| private final Callback |
| Access | Constructor and Description |
|---|---|
| private |
| address | back to summary |
|---|---|
| private final SocketAddress address | |
| buffers | back to summary |
|---|---|
| private final ByteBuffer[] buffers | |
| callback | back to summary |
|---|---|
| private final Callback callback | |
| Entry | back to summary |
|---|---|
| private Entry(Callback callback, SocketAddress address, ByteBuffer[] buffers) | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Runnable | produce()
Implements org. Produces a task to be executed. |
| QuicProducer | back to summary |
|---|---|
| private QuicProducer() | |
| produce | back to summary |
|---|---|
| public Runnable produce() Implements org. Doc from org. Produces a task to be executed.
| |