public class SocketCommandInterpreter
extends java.lang.Thread
CommandInterpreter
Constructor and Description |
---|
SocketCommandInterpreter(int port)
Creates a command interpreter at the given port.
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String name,
CommandInterface command)
Adds the given command to the command list.
|
static void |
main(java.lang.String[] args) |
void |
run() |
void |
setStopAcceptConnections()
Stops this SocketCommandInterpreter from accepting connections.
|
void |
setTrace(boolean trace)
Sets the trace mode of the command interpreter.
|
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, yield
public SocketCommandInterpreter(int port)
port
- the port to create the command interpreterpublic void add(java.lang.String name, CommandInterface command)
name
- the name of the command.command
- the command to be executed.public final void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void setStopAcceptConnections()
public void setTrace(boolean trace)
trace
- true if tracing.public static void main(java.lang.String[] args)