class NioDatagramSession extends NioSession
IoSession for datagram transport (UDP/IP).| Modifier and Type | Field and Description |
|---|---|
private java.net.InetSocketAddress |
localAddress |
(package private) static TransportMetadata |
METADATA |
private java.net.InetSocketAddress |
remoteAddress |
channel, key, processorconfig| Constructor and Description |
|---|
NioDatagramSession(IoService service,
java.nio.channels.DatagramChannel channel,
IoProcessor<NioSession> processor)
Creates a new connector-side session instance.
|
NioDatagramSession(IoService service,
java.nio.channels.DatagramChannel channel,
IoProcessor<NioSession> processor,
java.net.SocketAddress remoteAddress)
Creates a new acceptor-side session instance.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) java.nio.channels.DatagramChannel |
getChannel() |
DatagramSessionConfig |
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. |
TransportMetadata |
getTransportMetadata() |
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, isSecured, 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
private final java.net.InetSocketAddress localAddress
private final java.net.InetSocketAddress remoteAddress
NioDatagramSession(IoService service, java.nio.channels.DatagramChannel channel, IoProcessor<NioSession> processor, java.net.SocketAddress remoteAddress)
NioDatagramSession(IoService service, java.nio.channels.DatagramChannel channel, IoProcessor<NioSession> processor)
public DatagramSessionConfig getConfig()
getConfig in interface IoSessiongetConfig in class AbstractIoSessionjava.nio.channels.DatagramChannel getChannel()
getChannel in class NioSessionIoSessionpublic TransportMetadata getTransportMetadata()
TransportMetadata that this session runs on.public java.net.InetSocketAddress getRemoteAddress()
IoSessionpublic java.net.InetSocketAddress getLocalAddress()
IoSessionpublic 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 AbstractIoSession