public class BioUdpSession extends AbstractIoSession
IoSession
for BioUdpServer
IoSession.SessionState
config, idleChecker, secured, state
SSL_HELPER
Constructor and Description |
---|
BioUdpSession(SocketAddress remoteAddress,
BioUdpServer service,
IdleChecker idleChecker) |
Modifier and Type | Method and Description |
---|---|
IoFuture<Void> |
close(boolean immediately)
Closes this session immediately or after all queued write requests are flushed.
|
WriteRequest |
enqueueWriteRequest(WriteRequest writeRequest)
Internal method for enqueue write request after filter chain processing
|
IoSessionConfig |
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 |
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.
|
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
public BioUdpSession(SocketAddress remoteAddress, BioUdpServer service, IdleChecker idleChecker)
public SocketAddress getRemoteAddress()
public SocketAddress getLocalAddress()
public IoFuture<Void> close(boolean immediately)
IoFuture
if you want to wait for the session actually closed. Once this method has
been called, no incoming request will be accepted.immediately
- true
to close this session immediately. false
to close this session after all
queued write requests are flushed.IoFuture
that will contains the session's statepublic void suspendRead()
public void suspendWrite()
public void resumeRead()
public void resumeWrite()
public boolean isReadSuspended()
true
if suspendedpublic boolean isWriteSuspended()
true
if suspendedpublic IoSessionConfig getConfig()
public WriteRequest enqueueWriteRequest(WriteRequest writeRequest)
writeRequest
- the message to put in the write requestCopyright © 2009–2013 Apache MINA Project. All rights reserved.