public interface IoSession extends Closeable
| Modifier and Type | Method and Description |
|---|---|
CloseFuture |
close(boolean immediately)
Closes this session immediately or after all queued write requests
are flushed.
|
java.lang.Object |
getAttribute(java.lang.Object key)
Returns the value of the user-defined attribute of this session.
|
long |
getId()
Returns a unique identifier for this session.
|
java.net.SocketAddress |
getLocalAddress()
Returns the socket address of local machine which is associated with this
session.
|
java.net.SocketAddress |
getRemoteAddress()
Returns the socket address of remote peer.
|
IoService |
getService()
Returns the IoService that created this session.
|
java.lang.Object |
setAttribute(java.lang.Object key,
java.lang.Object value)
Sets a user-defined attribute.
|
IoWriteFuture |
write(Buffer buffer)
Write a packet on the socket.
|
long getId()
java.lang.Object getAttribute(java.lang.Object key)
key - the key of the attributejava.lang.Object setAttribute(java.lang.Object key,
java.lang.Object value)
key - the key of the attributevalue - the value of the attributejava.net.SocketAddress getRemoteAddress()
java.net.SocketAddress getLocalAddress()
IoWriteFuture write(Buffer buffer)
CloseFuture close(boolean immediately)
CloseFuture if you want to wait for the session actually closed.IoService getService()
Copyright © 2008-2014 The Apache Software Foundation. All Rights Reserved.