protected class ParameterServer.ParameterHandler extends Handler
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
private BufferedReader |
buffIn
The buffered reader wrapped around the socket's input stream.
|
private BufferedWriter |
buffOut
The print writer wrapped around the socket's output stream.
|
private boolean |
cancel
Becomes true if the protocol should be terminated.
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Modifier | Constructor and Description |
|---|---|
protected |
ParameterHandler(ErrorProcessing spawn,
Socket client,
ThreadGroup group,
String name)
Constructs a new parameter-request handler.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Indicates that the protocol submission should be terminated.
|
void |
init()
Wrapps buffered readers/writers around the generic socket streams.
|
protected void |
runProtocol()
The main method of the parameter server protocol.
|
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 BufferedReader buffIn
private BufferedWriter buffOut
private boolean cancel
protected ParameterHandler(ErrorProcessing spawn, Socket client, ThreadGroup group, String name)
Handler.spawn - A reference to the spawning receiver server.client - The client-connection socket.group - The thread group this command handler should run in.name - The name of the handler thread.public void init()
protected void runProtocol()
ParameterServer.set.SocketParameter.getAscii() method.SocketParameter.NOTDEFINED is writtn.runProtocol in class Handlerpublic void cancel()