|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--de.oio.bugkilla.protocol.CommandInterpreter
A class waiting for incomming commads from a given InputStream to send these commands
to its
given Commandable object. The CommandInterpreter is an instance of a Thread
object. The only task is to wait on the given InputStream for receiving commands. There
are three possible commands this class is able to interprete:
start, stop and off.
Respectively of the sended command, is has to inform the given Commandable.
| Field Summary |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
CommandInterpreter(java.io.InputStream in,
Commandable slave)
Creates a new CommandInterpreter object to receive commands from the given InputStream and send these commands to the given Commandable object. |
|
| Method Summary | |
java.io.BufferedReader |
getIn()
Returns the BufferedReader wrapping the given InputStream. |
boolean |
isOn()
Returns true while calling off. |
void |
printVerifyedCommand(java.lang.String command)
Prints the verifyed command out |
void |
run()
Calls Commandable methods respectively of the send command. |
void |
setIn(java.io.BufferedReader in)
Sets the Reader for wrapping the given InputStream. |
void |
setOn(boolean on)
Sets the on. |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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 |
| Constructor Detail |
public CommandInterpreter(java.io.InputStream in,
Commandable slave)
in - - an InputStream sending the commandsslave - - a Commandable object receiving the incomming commands| Method Detail |
public void run()
startRecording from
the Commandable interface.startRecordingTestStep from
the Commandable interfacestopRecording from the
Commandable interface.stop from the Commandable interface.
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void printVerifyedCommand(java.lang.String command)
command - String which represents users commandpublic java.io.BufferedReader getIn()
public void setIn(java.io.BufferedReader in)
in - The Reader to set.public boolean isOn()
public void setOn(boolean on)
on - The on to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||