| Modifier and Type | Field and Description |
|---|---|
| private final AtomicBoolean | |
| private final Queue | |
| private final AtomicReference | |
| private final AtomicReference | |
| private final NamedEndpoint | |
| private final IOSession | |
| private final Decorator | |
| private final ConcurrentMap | |
| private final IOSessionListener | |
| private final AtomicReference |
| Access | Constructor and Description |
|---|---|
| pack-priv | InternalDataChannel(final IOSession ioSession, final NamedEndpoint initialEndpoint, final Decorator<IOSession> ioSessionDecorator, final IOSessionListener sessionListener, final Queue<InternalDataChannel> closedSessions)
|
| Modifier and Type | Method and Description |
|---|---|
| public ByteChannel | channel()
Implements org. |
| public void | clearEvent(final int
I/O event type. op)Implements org. |
| public void | close()
Implements org. |
| public void | close(final CloseMode
How to close the receiver. closeMode)Implements org. |
| pack-priv void | |
| public void | |
| private IOEventHandler | |
| public int | getEventMask()
Implements org. |
| public IOEventHandler | getHandler()
Implements org. |
| public String | |
| public NamedEndpoint | |
| public long | getLastEventTime()
Implements abstract org. Implements org. |
| public long | getLastReadTime()
Implements org. |
| public long | getLastWriteTime()
Implements org. |
| public SocketAddress | getLocalAddress()
Implements org. |
| public Lock | getLock()
Implements org. |
| public SocketAddress | getRemoteAddress()
Implements org. |
| public Timeout | getSocketTimeout()
Implements org. |
| public IOSession. | getStatus()
Implements org.
|
| pack-priv Timeout | |
| public TlsDetails | getTlsDetails()
Implements org. |
| public boolean | hasCommands()
Implements org. |
| public boolean | |
| pack-priv void | onException(final Exception cause)
Implements abstract org. |
| pack-priv void | onIOEvent(final int readyOps)
Implements abstract org. |
| pack-priv void | onTimeout(final Timeout timeout)
Implements abstract org. |
| pack-priv void | |
| pack-priv void | |
| public Command | poll()
Implements org. Command from the command queue if available.
|
| public int | read(final ByteBuffer
The buffer into which bytes are to be transferred dst)Implements java. |
| public void | registerProtocol(final String
the application protocol ID protocolId, final ProtocolUpgradeHandler the upgrade handler. upgradeHandler)Overrides default org. |
| public void | setEvent(final int
I/O event type. op)Implements org. |
| public void | setEventMask(final int
new I/O event mask. ops)Implements org. |
| public void | setSocketTimeout(final Timeout
socket timeout. timeout)Implements org. |
| public void | startTls(final SSLContext
SSL context to be used for this session. sslContext, final NamedEndpoint optional endpoint details for outgoing client side connections. endpoint, final SSLBufferMode SSL buffer management mode. sslBufferMode, final SSLSessionInitializer SSL session initialization callback. initializer, final SSLSessionVerifier SSL session verification callback. verifier, final Timeout the timeout to use while performing the TLS handshake; may be handshakeTimeout)null.Implements org. |
| public void | startTls(final SSLContext
SSL context to be used for this session. sslContext, final NamedEndpoint optional endpoint details for outgoing client side connections. endpoint, final SSLBufferMode SSL buffer management mode. sslBufferMode, final SSLSessionInitializer SSL session initialization callback. initializer, final SSLSessionVerifier SSL session verification callback. verifier, final Timeout the timeout to use while performing the TLS handshake; may be handshakeTimeout, final FutureCallback<TransportSecurityLayer> callback)null.Overrides default org. |
| public void | switchProtocol(final String
the application protocol ID protocolId, final FutureCallback<ProtocolIOSession> the result callback callback)Overrides default org. |
| public String | |
| public void | updateReadTime()
Implements org. |
| public void | updateWriteTime()
Implements org. |
| public void | upgrade(final IOEventHandler handler)
Implements org. |
| public int | write(final ByteBuffer
The buffer from which bytes are to be retrieved src)Implements java. |
| closed | back to summary |
|---|---|
| private final AtomicBoolean closed | |
| closedSessions | back to summary |
|---|---|
| private final Queue<InternalDataChannel> closedSessions | |
| currentSessionRef | back to summary |
|---|---|
| private final AtomicReference<IOSession> currentSessionRef | |
| eventHandlerRef | back to summary |
|---|---|
| private final AtomicReference<IOEventHandler> eventHandlerRef | |
| initialEndpoint | back to summary |
|---|---|
| private final NamedEndpoint initialEndpoint | |
| ioSession | back to summary |
|---|---|
| private final IOSession ioSession | |
| ioSessionDecorator | back to summary |
|---|---|
| private final Decorator<IOSession> ioSessionDecorator | |
| protocolUpgradeHandlerMap | back to summary |
|---|---|
| private final ConcurrentMap<String, ProtocolUpgradeHandler> protocolUpgradeHandlerMap | |
| sessionListener | back to summary |
|---|---|
| private final IOSessionListener sessionListener | |
| tlsSessionRef | back to summary |
|---|---|
| private final AtomicReference<SSLIOSession> tlsSessionRef | |
| InternalDataChannel | back to summary |
|---|---|
| pack-priv InternalDataChannel(final IOSession ioSession, final NamedEndpoint initialEndpoint, final Decorator<IOSession> ioSessionDecorator, final IOSessionListener sessionListener, final Queue<InternalDataChannel> closedSessions) | |
| channel | back to summary |
|---|---|
| public ByteChannel channel() Implements org. Doc from org. Returns the underlying I/O channel associated with this session.
| |
| clearEvent | back to summary |
|---|---|
| public void clearEvent(final int op) Implements org. Doc from org. Clears interest in a particular I/O event type by updating the event mask associated with the session.
| |
| close | back to summary |
|---|---|
| public void close() Implements org. Doc from org. Terminates the session gracefully and closes the underlying I/O channel. This method ensures that session termination handshake, such as the one used by the SSL/TLS protocol, is correctly carried out.
| |
| close | back to summary |
|---|---|
| public void close(final CloseMode closeMode) Implements org. Doc from org. Closes this process or endpoint and releases any system resources associated with it. If the endpoint or the process is already closed then invoking this method has no effect. | |
| disconnected | back to summary |
|---|---|
| pack-priv void disconnected() | |
| enqueue | back to summary |
|---|---|
| public void enqueue(final Command command, final Command. Implements org. Doc from org. Inserts
| |
| ensureHandler | back to summary |
|---|---|
| private IOEventHandler ensureHandler(final IOSession session) | |
| getEventMask | back to summary |
|---|---|
| public int getEventMask() Implements org. Doc from org. Returns mask of I/O evens this session declared interest in.
| |
| getHandler | back to summary |
|---|---|
| public IOEventHandler getHandler() Implements org. Doc from org. Returns event handler associated with the session.
| |
| getId | back to summary |
|---|---|
| public String getId() Implements org.
| |
| getInitialEndpoint | back to summary |
|---|---|
| public NamedEndpoint getInitialEndpoint() Implements org.
| |
| getLastEventTime | back to summary |
|---|---|
| public long getLastEventTime() Implements abstract org. Implements org. Doc from org. Returns timestamp of the last I/O event including socket timeout reset.
| |
| getLastReadTime | back to summary |
|---|---|
| public long getLastReadTime() Implements org. Doc from org. Returns timestamp of the last read event.
| |
| getLastWriteTime | back to summary |
|---|---|
| public long getLastWriteTime() Implements org. Doc from org. Returns timestamp of the last write event.
| |
| getLocalAddress | back to summary |
|---|---|
| public SocketAddress getLocalAddress() Implements org. Doc from org. Returns local address.
| |
| getLock | back to summary |
|---|---|
| public Lock getLock() Implements org. Doc from org. Returns session lock that should be used by I/O event handlers to synchronize access to the session.
| |
| getRemoteAddress | back to summary |
|---|---|
| public SocketAddress getRemoteAddress() Implements org. Doc from org. Returns address of the remote peer.
| |
| getSocketTimeout | back to summary |
|---|---|
| public Timeout getSocketTimeout() Implements org. Doc from org. Returns value of the socket timeout in milliseconds. The value of
| |
| getStatus | back to summary |
|---|---|
| public IOSession. Implements org. Doc from org. Returns status of the session:
| |
| getTimeout | back to summary |
|---|---|
| pack-priv Timeout getTimeout() Implements abstract org.
| |
| getTlsDetails | back to summary |
|---|---|
| public TlsDetails getTlsDetails() Implements org. Doc from org. Returns details of a fully established TLS session.
| |
| hasCommands | back to summary |
|---|---|
| public boolean hasCommands() Implements org. Doc from org. Tests if there enqueued commands pending execution.
| |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() Implements java. Doc from java. Tells whether or not this channel is open.
| |
| onException | back to summary |
|---|---|
| pack-priv void onException(final Exception cause) Implements abstract org.
| |
| onIOEvent | back to summary |
|---|---|
| pack-priv void onIOEvent(final int readyOps) throws IOException Implements abstract org.
| |
| onTimeout | back to summary |
|---|---|
| pack-priv void onTimeout(final Timeout timeout) throws IOException Implements abstract org.
| |
| onTLSSessionEnd | back to summary |
|---|---|
| pack-priv void onTLSSessionEnd(final SSLIOSession sslSession) | |
| onTLSSessionStart | back to summary |
|---|---|
| pack-priv void onTLSSessionStart(final SSLIOSession sslSession) | |
| poll | back to summary |
|---|---|
| public Command poll() Implements org. Doc from org. Removes first
| |
| read | back to summary |
|---|---|
| public int read(final ByteBuffer dst) throws IOException Implements java. Doc from java. Reads a sequence of bytes from this channel into the given buffer. An attempt is made to read up to r bytes from the channel,
where r is the number of bytes remaining in the buffer, that is,
Suppose that a byte sequence of length n is read, where
A read operation might not fill the buffer, and in fact it might not read any bytes at all. Whether or not it does so depends upon the nature and state of the channel. A socket channel in non-blocking mode, for example, cannot read any more bytes than are immediately available from the socket's input buffer; similarly, a file channel cannot read any more bytes than remain in the file. It is guaranteed, however, that if a channel is in blocking mode and there is at least one byte remaining in the buffer then this method will block until at least one byte is read. This method may be invoked at any time. If another thread has already initiated a read operation upon this channel, however, then an invocation of this method will block until the first operation is complete.
| |
| registerProtocol | back to summary |
|---|---|
| public void registerProtocol(final String protocolId, final ProtocolUpgradeHandler upgradeHandler) Overrides default org. Doc from org. Registers protocol upgrade handler with the given application protocol ID.
| |
| setEvent | back to summary |
|---|---|
| public void setEvent(final int op) Implements org. Doc from org. Declares interest in a particular I/O event type by updating the event mask associated with the session.
| |
| setEventMask | back to summary |
|---|---|
| public void setEventMask(final int ops) Implements org. Doc from org. Declares interest in I/O event notifications by setting the event mask associated with the session
| |
| setSocketTimeout | back to summary |
|---|---|
| public void setSocketTimeout(final Timeout timeout) Implements org. Doc from org. Sets value of the socket timeout in milliseconds. The value of
Please note this operation may affect the last event time. | |
| startTls | back to summary |
|---|---|
| public void startTls(final SSLContext sslContext, final NamedEndpoint endpoint, final SSLBufferMode sslBufferMode, final SSLSessionInitializer initializer, final SSLSessionVerifier verifier, final Timeout handshakeTimeout) Implements org. Doc from org. Starts TLS session over an existing network connection with the given SSL context.
| |
| startTls | back to summary |
|---|---|
| public void startTls(final SSLContext sslContext, final NamedEndpoint endpoint, final SSLBufferMode sslBufferMode, final SSLSessionInitializer initializer, final SSLSessionVerifier verifier, final Timeout handshakeTimeout, final FutureCallback<TransportSecurityLayer> callback) Overrides default org. Doc from org. Starts TLS session over an existing network connection with the given SSL context.
| |
| switchProtocol | back to summary |
|---|---|
| public void switchProtocol(final String protocolId, final FutureCallback<ProtocolIOSession> callback) Overrides default org. Doc from org. Switches this I/O session to the application protocol with the given ID.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| updateReadTime | back to summary |
|---|---|
| public void updateReadTime() Implements org. Doc from org. Updates the timestamp of the last read event
| |
| updateWriteTime | back to summary |
|---|---|
| public void updateWriteTime() Implements org. Doc from org. Updates the timestamp of the last write event
| |
| upgrade | back to summary |
|---|---|
| public void upgrade(final IOEventHandler handler) Implements org. Doc from org. Upgrades event handler associated with the session.
| |
| write | back to summary |
|---|---|
| public int write(final ByteBuffer src) throws IOException Implements java. Doc from java. Writes a sequence of bytes to this channel from the given buffer. An attempt is made to write up to r bytes to the channel,
where r is the number of bytes remaining in the buffer, that is,
Suppose that a byte sequence of length n is written, where
Unless otherwise specified, a write operation will return only after writing all of the r requested bytes. Some types of channels, depending upon their state, may write only some of the bytes or possibly none at all. A socket channel in non-blocking mode, for example, cannot write any more bytes than are free in the socket's output buffer. This method may be invoked at any time. If another thread has already initiated a write operation upon this channel, however, then an invocation of this method will block until the first operation is complete.
| |