org.apache.mina.transport.socket.nio
Class SocketAcceptor
- IoAcceptor, IoService
public class SocketAcceptor
SocketAcceptor()- Create an acceptor with a single processing thread using a NewThreadExecutor
|
SocketAcceptor(int processorCount, Executor executor)- Create an acceptor with the desired number of processing threads
|
SocketAcceptor
public SocketAcceptor()
Create an acceptor with a single processing thread using a NewThreadExecutor
SocketAcceptor
public SocketAcceptor(int processorCount,
Executor executor) Create an acceptor with the desired number of processing threads
processorCount - Number of processing threadsexecutor - Executor to use for launching threads
bind
public void bind(SocketAddress address,
IoHandler handler,
IoServiceConfig config)
throws IOException Binds to the specified address and handles incoming connections with the specified
handler. Backlog value is configured to the value of backlog property.
- bind in interface IoAcceptor
setDefaultConfig
public void setDefaultConfig(SocketAcceptorConfig defaultConfig)
Sets the config this acceptor will use by default.
defaultConfig - the default config.