|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.khelekore.rnio.impl.AcceptingServer
public class AcceptingServer
A basic server for rnio.
This server will create a MultiSelectorNioHandler
using a
BasicStatisticsHolder
and the ExecutorService you pass.
When you start this server it will begin to listen for socket connections
on the specified InetAddress and port and hand off new socket connections
to the AcceptorListener
Constructor Summary | |
---|---|
AcceptingServer(InetAddress addr,
int port,
AcceptorListener listener,
ExecutorService es,
int selectorThreads,
Long defaultTimeout)
Create a new server using the parameters given. |
Method Summary | |
---|---|
NioHandler |
getNioHandler()
Get the NioHandler in use by this server. |
void |
shutdown()
Shutdown the NioHandler. |
void |
start()
Start the NioHandler and register to accept new socket connections. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AcceptingServer(InetAddress addr, int port, AcceptorListener listener, ExecutorService es, int selectorThreads, Long defaultTimeout) throws IOException
addr
- the InetAddress to bind to, may be null for wildcard addressport
- the port number to bind tolistener
- the client that will handle the accepted socketses
- the ExecutorService to use for the NioHandlerselectorThreads
- the number of threads that the NioHandler will usedefaultTimeout
- the default timeout value for the NioHandler
IOException
Method Detail |
---|
public void start() throws IOException
IOException
public void shutdown()
public NioHandler getNioHandler()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |