dsto.dfc.test
Class ProtocolServer
java.lang.Object
java.lang.Thread
dsto.dfc.test.ProtocolServer
- All Implemented Interfaces:
- Runnable
public class ProtocolServer
- extends Thread
Runs a server on a socket that accepts messages and responds appropriately
with the use of an AbstractProtocol
instance.
- Version:
- $Revision$
- Author:
- WeberD
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 |
port
protected int port
running
protected boolean running
lock
protected Object lock
protocol
protected AbstractProtocol protocol
spawnedThreads
protected List spawnedThreads
serverSocket
protected ServerSocket serverSocket
shuttingDown
protected boolean shuttingDown
autoNewline
protected boolean autoNewline
ProtocolServer
public ProtocolServer(int aPort,
AbstractProtocol aProtocol)
setAutoNewline
public void setAutoNewline(boolean value)
startServer
public void startServer()
stopServer
public void stopServer()
throws IOException
- Throws:
IOException
run
public void run()
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
Copyright © 2008 Commonwealth of Australia