class NioSocketSession extends NioSession
IoSession for socket transport (TCP/IP).| Modifier and Type | Class and Description |
|---|---|
private class |
NioSocketSession.SessionConfigImpl |
| Modifier and Type | Field and Description |
|---|---|
(package private) static TransportMetadata |
METADATA |
channel, key, processorconfig| Constructor and Description |
|---|
NioSocketSession(IoService service,
IoProcessor<NioSession> processor,
java.nio.channels.SocketChannel channel)
Creates a new instance of NioSocketSession.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) java.nio.channels.SocketChannel |
getChannel() |
SocketSessionConfig |
getConfig() |
java.net.InetSocketAddress |
getLocalAddress()
Returns the socket address of local machine which is associated with this
session.
|
java.net.InetSocketAddress |
getRemoteAddress()
Returns the socket address of remote peer.
|
java.net.InetSocketAddress |
getServiceAddress()
Returns the socket address of the
IoService listens to to manage
this session. |
private java.net.Socket |
getSocket() |
TransportMetadata |
getTransportMetadata() |
boolean |
isSecured() |
getFilterChain, getProcessor, getSelectionKey, setSelectionKeyclose, close, containsAttribute, decreaseReadBufferSize, decreaseScheduledBytesAndMessages, equals, getAttachment, getAttribute, getAttribute, getAttributeKeys, getAttributeMap, getBothIdleCount, getCloseFuture, getCreationTime, getCurrentWriteMessage, getCurrentWriteRequest, getHandler, getId, getIdleCount, getLastBothIdleTime, getLastIdleTime, getLastIoTime, getLastReaderIdleTime, getLastReadTime, getLastWriterIdleTime, getLastWriteTime, getReadBytes, getReadBytesThroughput, getReaderIdleCount, getReadMessages, getReadMessagesThroughput, getScheduledWriteBytes, getScheduledWriteMessages, getService, getWriteRequestQueue, getWriterIdleCount, getWrittenBytes, getWrittenBytesThroughput, getWrittenMessages, getWrittenMessagesThroughput, hashCode, increaseIdleCount, increaseReadBufferSize, increaseReadBytes, increaseReadMessages, increaseScheduledWriteBytes, increaseScheduledWriteMessages, increaseWrittenBytes, increaseWrittenMessages, isBothIdle, isClosing, isConnected, isIdle, isReaderIdle, isReadSuspended, isScheduledForFlush, isWriterIdle, isWriteSuspended, notifyIdleness, notifyIdleSession, offerClosedReadFuture, offerFailedReadFuture, offerReadFuture, read, removeAttribute, removeAttribute, replaceAttribute, resumeRead, resumeWrite, scheduledForFlush, setAttachment, setAttribute, setAttribute, setAttributeIfAbsent, setAttributeIfAbsent, setAttributeMap, setCurrentWriteRequest, setScheduledForFlush, setScheduledWriteBytes, setScheduledWriteMessages, setWriteRequestQueue, suspendRead, suspendWrite, toString, unscheduledForFlush, updateThroughput, write, writestatic final TransportMetadata METADATA
public NioSocketSession(IoService service, IoProcessor<NioSession> processor, java.nio.channels.SocketChannel channel)
service - the associated IoServiceprocessor - the associated IoProcessorch - the used channelprivate java.net.Socket getSocket()
public TransportMetadata getTransportMetadata()
TransportMetadata that this session runs on.public SocketSessionConfig getConfig()
getConfig in interface IoSessiongetConfig in class AbstractIoSessionjava.nio.channels.SocketChannel getChannel()
getChannel in class NioSessionIoSessionpublic java.net.InetSocketAddress getRemoteAddress()
public java.net.InetSocketAddress getLocalAddress()
public java.net.InetSocketAddress getServiceAddress()
AbstractIoSessionIoService listens to to manage
this session. If this session is managed by IoAcceptor, it
returns the SocketAddress which is specified as a parameter of
IoAcceptor.bind(). If this session is managed by
IoConnector, this method returns the same address with
that of IoSession.getRemoteAddress().getServiceAddress in interface IoSessiongetServiceAddress in class AbstractIoSessionpublic final boolean isSecured()
isSecured in interface IoSessionisSecured in class AbstractIoSessiontrue if the session has started and initialized a SslEngine,
false if the session is not yet secured (the handshake is not completed)
or if SSL is not set for this session, or if SSL is not even an option.