public class NioUdpSession extends AbstractNioSession implements SelectorListener
IoSession.SessionState
channel
config, idleChecker, secured, state
SSL_HELPER
Modifier and Type | Method and Description |
---|---|
protected void |
channelClose()
Close the inner socket channel
|
protected ByteBuffer |
convertToDirectBuffer(WriteRequest writeRequest,
boolean createNew)
Copy the HeapBuffer into a DirectBuffer, if needed.
|
void |
flushWriteQueue() |
UdpSessionConfig |
getConfig()
Gets the session configuration, it where the idle timeout are set and other transport specific configuration.
|
SocketAddress |
getLocalAddress()
Gets the local address of the local peer.
|
SocketAddress |
getRemoteAddress()
Returns the socket address of remote peer.
|
boolean |
isReadSuspended()
Is read operation is suspended for this session.
|
boolean |
isWriteSuspended()
Is write operation is suspended for this session.
|
void |
ready(boolean accept,
boolean connect,
boolean read,
ByteBuffer readBuffer,
boolean write) |
void |
resumeRead()
Resumes read operations for this session.
|
void |
resumeWrite()
Resumes write operations for this session.
|
void |
suspendRead()
Suspends read operations for this session.
|
void |
suspendWrite()
Suspends write operations for this session.
|
protected int |
writeDirect(Object message)
Writes the message immediately.
|
close, enqueueWriteRequest, getWriteQueue, isRegisteredForWrite, processWrite, setNotRegisteredForWrite
callReadNextFilter, callWriteNextFilter, changeState, getAttribute, getAttribute, getAttributeKeys, getCreationTime, getId, getLastIoTime, getLastReadTime, getLastWriteTime, getReadBytes, getService, getWrittenBytes, incrementWrittenBytes, initSecure, isClosed, isClosing, isConnected, isConnectedSecured, isCreated, isSecured, isSecuring, processException, processMessageReceived, processMessageSent, processMessageWriting, processSessionClosed, processSessionIdle, processSessionOpen, removeAttribute, setAttribute, setSecured, toString, write, writeWithFuture
protected void channelClose()
channelClose
in class AbstractNioSession
public void flushWriteQueue()
flushWriteQueue
in class AbstractNioSession
public SocketAddress getRemoteAddress()
getRemoteAddress
in interface IoSession
public SocketAddress getLocalAddress()
getLocalAddress
in interface IoSession
public void suspendRead()
suspendRead
in interface IoSession
public void suspendWrite()
suspendWrite
in interface IoSession
public void resumeRead()
resumeRead
in interface IoSession
public void resumeWrite()
resumeWrite
in interface IoSession
public boolean isReadSuspended()
isReadSuspended
in interface IoSession
true
if suspendedpublic boolean isWriteSuspended()
isWriteSuspended
in interface IoSession
true
if suspendedpublic UdpSessionConfig getConfig()
protected int writeDirect(Object message)
writeDirect
in class AbstractNioSession
message
- the message to writeprotected ByteBuffer convertToDirectBuffer(WriteRequest writeRequest, boolean createNew)
convertToDirectBuffer
in class AbstractNioSession
writeRequest
- The request containing the HeapBuffercreateNew
- A flag to force the creation of a DirectBufferpublic void ready(boolean accept, boolean connect, boolean read, ByteBuffer readBuffer, boolean write)
ready
in interface SelectorListener
Copyright © 2009–2013 Apache MINA Project. All rights reserved.