| Modifier and Type | Field and Description |
|---|---|
| private final Logger | |
| private final IOSession | |
| private final Logger |
| Access | Constructor and Description |
|---|---|
| public |
| 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. |
| public void | |
| private static String | |
| public int | getEventMask()
Implements org. |
| public IOEventHandler | getHandler()
Implements org. |
| public String | |
| public long | getLastEventTime()
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.
|
| public boolean | hasCommands()
Implements org. |
| public boolean | |
| private 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 | 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 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. |
| log | back to summary |
|---|---|
| private final Logger log | |
| session | back to summary |
|---|---|
| private final IOSession session | |
| wireLog | back to summary |
|---|---|
| private final Logger wireLog | |
| LoggingIOSession | back to summary |
|---|---|
| public LoggingIOSession(final IOSession session, final Logger log, final Logger wireLog) | |
| 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. | |
| enqueue | back to summary |
|---|---|
| public void enqueue(final Command command, final Command. Implements org. Doc from org. Inserts
| |
| formatOps | back to summary |
|---|---|
| private static String formatOps(final int ops) | |
| 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.
| |
| getLastEventTime | back to summary |
|---|---|
| public long getLastEventTime() 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:
| |
| 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.
| |
| logData | back to summary |
|---|---|
| private void logData(final ByteBuffer data, final String prefix) throws IOException | |
| 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.
| |
| 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. | |
| 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.
| |