net.sf.borg.common
Class SocketServer
java.lang.Object
java.lang.Thread
net.sf.borg.common.SocketServer
- All Implemented Interfaces:
- Runnable
public class SocketServer
- extends Thread
SocketServer is a thread that listens on a socket and starts a thread for
each incoming connection. Each connection thread calls back to the SocketHandler
to process each incoming message
Constructor Summary |
SocketServer(int port,
SocketHandler handler)
Create a ServerSocket to listen for connections on; start the thread. |
Method Summary |
void |
run()
|
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
listen_socket
protected ServerSocket listen_socket
SocketServer
public SocketServer(int port,
SocketHandler handler)
- Create a ServerSocket to listen for connections on; start the thread.
- Parameters:
port
- the porthandler
- the handler to call back with messages
run
public void run()
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
Generated September 24 2010 by mbb using Apache Ant version 1.7.1 compiled on June 27 2008 and Java version 1.6.0_20 from Sun Microsystems Inc. on Linux i386 2.6.24-28-generic