ikrs.util
Class AbstractCommandLine<C extends Command>

java.lang.Object
  extended by java.lang.Thread
      extended by ikrs.util.AbstractCommandLine<C>
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
YuccaLine

public class AbstractCommandLine<C extends Command>
extends java.lang.Thread


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AbstractCommandLine(CommandFactory<C> factory)
           
AbstractCommandLine(CommandFactory<C> factory, java.lang.String prompt)
           
 
Method Summary
 CommandFactory<C> getCommandFactory()
          Get the command factory for this command line.
 void interrupt()
           
static void main(java.lang.String[] argv)
           
 void run()
           
 void runCommandLine()
          This method should be used to start the listening process.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, 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
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractCommandLine

public AbstractCommandLine(CommandFactory<C> factory)

AbstractCommandLine

public AbstractCommandLine(CommandFactory<C> factory,
                           java.lang.String prompt)
Method Detail

getCommandFactory

public CommandFactory<C> getCommandFactory()
Get the command factory for this command line.

Returns:
The command factory for this command line.

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

runCommandLine

public void runCommandLine()
                    throws java.io.IOException
This method should be used to start the listening process. The method will block.

Throws:
java.io.IOException

interrupt

public void interrupt()
Overrides:
interrupt in class java.lang.Thread

main

public static void main(java.lang.String[] argv)