public static class AbstractNetIoTest.ServerMainThread
extends java.lang.Thread
| Modifier and Type | Field and Description |
|---|---|
private boolean |
ready
Stores if this thread is ready for accepting connections.
|
private java.net.ServerSocket |
serverSocket
Stores the underlying server socket.
|
| Constructor and Description |
|---|
ServerMainThread() |
| Modifier and Type | Method and Description |
|---|---|
protected AbstractNetIoTest.ServerWorkThread |
createThread(java.net.Socket serverSocket)
Factory method for creating a worker thread.
|
void |
run()
Executes the thread, i.e. waits for incoming connections.
|
void |
setSocket(java.net.ServerSocket serverSocket)
Assigns the server socket.
|
activeCount, checkAccess, clone, 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, yieldprivate java.net.ServerSocket serverSocket
private boolean ready
public void setSocket(java.net.ServerSocket serverSocket)
serverSocket - the socket used for accepting connectionspublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadprotected AbstractNetIoTest.ServerWorkThread createThread(java.net.Socket serverSocket)
serverSocket - the socket to work on