net.i2p.router.client
Class ClientListenerRunner
java.lang.Object
net.i2p.router.client.ClientListenerRunner
- All Implemented Interfaces:
- java.lang.Runnable
public class ClientListenerRunner
- extends java.lang.Object
- implements java.lang.Runnable
Listen for connections on the specified port, and toss them onto the client manager's
set of connections once they are established.
- Author:
- jrandom
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BIND_ALL_INTERFACES
public static final java.lang.String BIND_ALL_INTERFACES
- See Also:
- Constant Field Values
ClientListenerRunner
public ClientListenerRunner(RouterContext context,
ClientManager manager,
int port)
setPort
public void setPort(int port)
getPort
public int getPort()
runServer
public void runServer()
- Start up the socket listener, listens for connections, and
fires those connections off via
runConnection
.
This only returns if the socket cannot be opened or there is a catastrophic
failure.
runConnection
protected void runConnection(java.net.Socket socket)
throws java.io.IOException
- Handle the connection by passing it off to a
ClientConnectionRunner
- Throws:
java.io.IOException
stopListening
public void stopListening()
run
public void run()
- Specified by:
run
in interface java.lang.Runnable