Class ClientQuicConnection
- All Implemented Interfaces:
Closeable, AutoCloseable, Connection, Invocable
The client specific implementation of QuicConnection.
For each ClientConnector.connect(SocketAddress, Map) operation,
a new DatagramChannelEndPoint is created with an associated
ClientQuicConnection.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Connection
Connection.Listener, Connection.UpgradeFrom, Connection.UpgradeToNested classes/interfaces inherited from interface Invocable
Invocable.Callable, Invocable.InvocationType, Invocable.ReadyTask, Invocable.Task -
Field Summary
Fields inherited from interface Invocable
__nonBlocking, NOOP -
Constructor Summary
ConstructorsConstructorDescriptionClientQuicConnection(ClientConnector connector, EndPoint endPoint, Map<String, Object> context) -
Method Summary
Modifier and TypeMethodDescriptionprotected QuicSessioncreateSession(SocketAddress remoteAddress, ByteBuffer cipherBuffer) protected voidvoidCallback method invoked when the endpoint is ready to be read.booleanonIdleExpired(TimeoutException timeoutException) Callback method invoked upon an idle timeout event.voidonOpen()Callback method invoked when this connection is opened.voidoutwardClose(QuicSession session, Throwable failure) protected Runnableprocess(QuicSession session, SocketAddress remoteAddress, ByteBuffer cipherBuffer) Methods inherited from class QuicConnection
addEventListener, close, fillInterested, getByteBufferPool, getOutputBufferSize, getQuicSessions, getScheduler, isUseInputDirectByteBuffers, isUseOutputDirectByteBuffers, onClose, removeEventListener, setOutputBufferSize, setUseInputDirectByteBuffers, setUseOutputDirectByteBuffers, writeMethods inherited from class AbstractConnection
failedCallback, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, getInvocationType, getMessagesIn, getMessagesOut, isFillInterested, onFillInterestedFailed, onReadTimeout, setInputBufferSize, toConnectionString, toString, tryFillInterested
-
Constructor Details
-
ClientQuicConnection
public ClientQuicConnection(ClientConnector connector, EndPoint endPoint, Map<String, Object> context)
-
-
Method Details
-
onOpen
public void onOpen()Description copied from interface:ConnectionCallback method invoked when this connection is opened.
Creators of the connection implementation are responsible for calling this method.
- Specified by:
onOpenin interfaceConnection- Overrides:
onOpenin classQuicConnection
-
onFillable
public void onFillable()Description copied from class:AbstractConnectionCallback method invoked when the endpoint is ready to be read.
- Overrides:
onFillablein classQuicConnection- See Also:
-
createSession
protected QuicSession createSession(SocketAddress remoteAddress, ByteBuffer cipherBuffer) throws IOException - Specified by:
createSessionin classQuicConnection- Throws:
IOException
-
getLocalInetSocketAddress
- Specified by:
getLocalInetSocketAddressin classQuicConnection
-
process
protected Runnable process(QuicSession session, SocketAddress remoteAddress, ByteBuffer cipherBuffer) - Overrides:
processin classQuicConnection
-
onFailure
- Overrides:
onFailurein classQuicConnection
-
onIdleExpired
Description copied from interface:ConnectionCallback 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.
- Specified by:
onIdleExpiredin interfaceConnection- Specified by:
onIdleExpiredin classQuicConnection- Returns:
- true to let the EndPoint handle the idle timeout, false to tell the EndPoint to halt the handling of the idle timeout.
-
outwardClose
- Overrides:
outwardClosein classQuicConnection
-