|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--mqwfes.Console
class that provides communication with user via command line interface.
Prints out messages and accepts simple commands.
The thread waits for user input, reads a commandline, parses it and compares it to
known commands. If a commandline matches to one of the known commands, it executes the
function that is assigned to the command.
Field Summary |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
Console()
Creates new console |
Method Summary | |
static java.lang.String |
leadingZero(int source)
converts an Integer to String with leading zero if smaller than 10 |
static void |
msgout(java.lang.String message)
prints out console messages with no sender |
void |
run()
instructions that are executed when thread is started mostly in infinite while-loop to keep thread alive |
static void |
warn(java.lang.String who,
java.lang.String message)
prints out warnings and writes them to log |
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 |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Console()
Method Detail |
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public static void msgout(java.lang.String message)
message
- is message to consolepublic static void warn(java.lang.String who, java.lang.String message)
who
- is sender of console messagemessage
- message to print outpublic static java.lang.String leadingZero(int source)
source
- the source number to be converted
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |