|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
utilities.controlmessage.ControlMessageListener
public class ControlMessageListener
A thread that runs and listens for ControlMessages on a given port. When a message is received it is sent to a ControlMessageReceiver that is specified in the constructor.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected java.net.Socket |
clientSocket
|
protected java.io.DataInputStream |
in
|
protected int |
listenPort
|
protected java.net.ServerSocket |
listenSocket
|
protected Logger |
logger
|
protected ControlMessageReceiver |
parent
|
protected boolean |
running
|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
ControlMessageListener(int listenPort,
ControlMessageReceiver parent)
|
|
ControlMessageListener(int listenPort,
ControlMessageReceiver parent,
Logger logger)
|
|
| Method Summary | |
|---|---|
void |
halt()
Stops this object from running and closes it down cleanly |
void |
run()
Provides the main thread operation. |
| 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.net.ServerSocket listenSocket
protected java.net.Socket clientSocket
protected java.io.DataInputStream in
protected int listenPort
protected ControlMessageReceiver parent
protected Logger logger
protected boolean running
| Constructor Detail |
|---|
public ControlMessageListener(int listenPort,
ControlMessageReceiver parent,
Logger logger)
listenPort - The port number to listen on.parent - The object that created this Listener.
public ControlMessageListener(int listenPort,
ControlMessageReceiver parent)
listenPort - The port number to listen on.parent - The object that created this Listener.| Method Detail |
|---|
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void halt()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||