| Modifier and Type | Method and Description |
|---|---|
| public CloseFuture | Returns: The generatedCloseFuturetrue to close this session immediately. The pending write requests will simply be
discarded. false to close this session after all queued write requests are flushed.Redeclares org. Closes this session immediately or after all queued write requests are flushed. |
| public SocketAddress | Returns: The service address through which this session was accepted -null if session was initiated by
this peer instead of being accepted
|
| public Object | Returns: null if there is no attribute with the specified keythe key of the attribute key)Returns the value of the user-defined attribute of this session. |
| public long | Returns: a unique identifier for this session. Every session has its own ID which is different from any other.
|
| public IoService | |
| public Object | Returns: The old value of the attribute -null if not found.The key of the attribute we want to remove key)Removes a user-defined attribute with the specified key. |
| public void | |
| public Object | Returns: The old value of the attribute -null if it is new.the key of the attribute key, Object the value of the attribute value)Sets a user-defined attribute. |
| public Object | Returns: The old value of the attribute -null if not found.The key of the attribute we want to set key, Object The value we want to set value)Sets a user defined attribute if the attribute with the specified key is not set yet. |
| public void | |
| public void | |
| public IoWriteFuture | Returns: AnIoWriteFuture that can be used to check when the packet has actually been sentthe buffer send buffer)Note the buffer must not be touched until the returned write future is completed. Write a packet on the socket. |
| close | back to summary |
|---|---|
| public CloseFuture close(boolean immediately) Redeclares org. Closes this session immediately or after all queued write requests are flushed. This operation is asynchronous.
Wait for the returned
| |
| getAcceptanceAddress | back to summary |
|---|---|
public SocketAddress getAcceptanceAddress()
| |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(Object key) Returns the value of the user-defined attribute of this session. | |
| getId | back to summary |
|---|---|
public long getId()
| |
| getService | back to summary |
|---|---|
| public IoService getService() | |
| removeAttribute | back to summary |
|---|---|
| public Object removeAttribute(Object key) Removes a user-defined attribute with the specified key. | |
| resumeRead | back to summary |
|---|---|
| public void resumeRead() Resume read operations on this session. | |
| setAttribute | back to summary |
|---|---|
| public Object setAttribute(Object key, Object value) Sets a user-defined attribute. | |
| setAttributeIfAbsent | back to summary |
|---|---|
| public Object setAttributeIfAbsent(Object key, Object value) Sets a user defined attribute if the attribute with the specified key is not set yet. This method is same with the following code except that the operation is performed atomically.
| |
| shutdownOutputStream | back to summary |
|---|---|
| public void shutdownOutputStream() throws IOException Handle received EOF.
| |
| suspendRead | back to summary |
|---|---|
| public void suspendRead() Suspend read operations on this session. If the session usage includes a graceful shutdown with messages being exchanged, the caller needs to take care of resuming reading the input in order to actually be able to carry on the conversation with the peer. | |
| writeBuffer | back to summary |
|---|---|
| public IoWriteFuture writeBuffer(Buffer buffer) throws IOException Write a packet on the socket. Multiple writes can be issued concurrently and will be queued.
| |