Uses of Class
org.apache.mina.transport.socket.nio.NioSession
-
Packages that use NioSession Package Description org.apache.mina.transport.socket.nio Socket (TCP/IP) and Datagram (UDP/IP) support based on Java NIO (New I/O) API. -
-
Uses of NioSession in org.apache.mina.transport.socket.nio
Fields in org.apache.mina.transport.socket.nio with type parameters of type NioSession Modifier and Type Field Description protected IoProcessor<NioSession>
NioSession. processor
The NioSession processorMethods in org.apache.mina.transport.socket.nio that return NioSession Modifier and Type Method Description protected NioSession
NioSocketAcceptor. accept(IoProcessor<NioSession> processor, ServerSocketChannel handle)
Accept a client connection for a server socket and return a newIoSession
associated with the givenIoProcessor
protected NioSession
NioDatagramAcceptor. newSession(IoProcessor<NioSession> processor, DatagramChannel handle, SocketAddress remoteAddress)
protected NioSession
NioDatagramConnector. newSession(IoProcessor<NioSession> processor, DatagramChannel handle)
Create a newIoSession
from a connected socket client handle.protected NioSession
NioSocketConnector. newSession(IoProcessor<NioSession> processor, SocketChannel handle)
Create a newIoSession
from a connected socket client handle.Methods in org.apache.mina.transport.socket.nio that return types with arguments of type NioSession Modifier and Type Method Description protected Iterator<NioSession>
NioProcessor. allSessions()
IoProcessor<NioSession>
NioSession. getProcessor()
protected Iterator<NioSession>
NioProcessor. selectedSessions()
Methods in org.apache.mina.transport.socket.nio with parameters of type NioSession Modifier and Type Method Description void
NioDatagramAcceptor. add(NioSession session)
Adds the specifiedsession
to the I/O processor so that the I/O processor starts to perform any I/O operations related with thesession
.protected void
NioProcessor. destroy(NioSession session)
void
NioDatagramAcceptor. flush(NioSession session)
Flushes the internal write request queue of the specifiedsession
.protected SessionState
NioProcessor. getState(NioSession session)
Get the state of a session (One of OPENING, OPEN, CLOSING)protected void
NioProcessor. init(NioSession session)
protected boolean
NioProcessor. isInterestedInRead(NioSession session)
protected boolean
NioProcessor. isInterestedInWrite(NioSession session)
protected boolean
NioProcessor. isReadable(NioSession session)
protected boolean
NioProcessor. isWritable(NioSession session)
protected int
NioProcessor. read(NioSession session, IoBuffer buf)
void
NioDatagramAcceptor. remove(NioSession session)
Removes and closes the specifiedsession
from the I/O processor so that the I/O processor closes the connection associated with thesession
and releases any other related resources.protected int
NioDatagramAcceptor. send(NioSession session, IoBuffer buffer, SocketAddress remoteAddress)
protected void
NioProcessor. setInterestedInRead(NioSession session, boolean isInterested)
Set the session to be informed when a read event should be processedprotected void
NioDatagramAcceptor. setInterestedInWrite(NioSession session, boolean isInterested)
protected void
NioProcessor. setInterestedInWrite(NioSession session, boolean isInterested)
Set the session to be informed when a write event should be processedprotected int
NioProcessor. transferFile(NioSession session, FileRegion region, int length)
void
NioDatagramAcceptor. updateTrafficControl(NioSession session)
Controls the traffic of the specifiedsession
depending of theIoSession.isReadSuspended()
andIoSession.isWriteSuspended()
flagsvoid
NioDatagramAcceptor. write(NioSession session, WriteRequest writeRequest)
Writes the WriteRequest for the specifiedsession
.protected int
NioProcessor. write(NioSession session, IoBuffer buf, int length)
Method parameters in org.apache.mina.transport.socket.nio with type arguments of type NioSession Modifier and Type Method Description protected NioSession
NioSocketAcceptor. accept(IoProcessor<NioSession> processor, ServerSocketChannel handle)
Accept a client connection for a server socket and return a newIoSession
associated with the givenIoProcessor
protected NioSession
NioDatagramAcceptor. newSession(IoProcessor<NioSession> processor, DatagramChannel handle, SocketAddress remoteAddress)
protected NioSession
NioDatagramConnector. newSession(IoProcessor<NioSession> processor, DatagramChannel handle)
Create a newIoSession
from a connected socket client handle.protected NioSession
NioSocketConnector. newSession(IoProcessor<NioSession> processor, SocketChannel handle)
Create a newIoSession
from a connected socket client handle.Constructor parameters in org.apache.mina.transport.socket.nio with type arguments of type NioSession Constructor Description NioDatagramConnector(Class<? extends IoProcessor<NioSession>> processorClass)
Constructor forNioDatagramConnector
with default configuration with default configuration which will use a built-in thread pool executor to manage the default number of processor instances.NioDatagramConnector(Class<? extends IoProcessor<NioSession>> processorClass, int processorCount)
Constructor forNioDatagramConnector
with default configuration which will use a built-in thread pool executor to manage the given number of processor instances.NioDatagramConnector(IoProcessor<NioSession> processor)
Creates a new instance.NioSession(IoProcessor<NioSession> processor, IoService service, Channel channel)
Creates a new instance of NioSession, with its associated IoProcessor.NioSocketAcceptor(Executor executor, IoProcessor<NioSession> processor)
Constructor forNioSocketAcceptor
with a givenExecutor
for handling connection events and a givenIoProcessor
for handling I/O events, useful for sharing the same processor and executor over multipleIoService
of the same type.NioSocketAcceptor(IoProcessor<NioSession> processor)
Constructor forNioSocketAcceptor
with default configuration but a specificIoProcessor
, useful for sharing the same processor over multipleIoService
of the same type.NioSocketConnector(Class<? extends IoProcessor<NioSession>> processorClass)
Constructor forNioSocketConnector
with default configuration with default configuration which will use a built-in thread pool executor to manage the default number of processor instances.NioSocketConnector(Class<? extends IoProcessor<NioSession>> processorClass, int processorCount)
Constructor forNioSocketConnector
with default configuration which will use a built-in thread pool executor to manage the given number of processor instances.NioSocketConnector(Executor executor, IoProcessor<NioSession> processor)
Constructor forNioSocketConnector
with a givenExecutor
for handling connection events and a givenIoProcessor
for handling I/O events, useful for sharing the same processor and executor over multipleIoService
of the same type.NioSocketConnector(IoProcessor<NioSession> processor)
Constructor forNioSocketConnector
with default configuration but a specificIoProcessor
, useful for sharing the same processor over multipleIoService
of the same type.
-