|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--shell.Command
Runtime command is a base class that all apps must extend to work inside Freelance. It provides basic functionality for the apps including and output stream and switch handling.
TerminalThread| Field Summary | |
java.io.Reader |
in
|
java.io.PrintStream |
out
|
| Constructor Summary | |
Command()
|
|
| Method Summary | |
void |
addActiveSwitch(java.lang.Object obj)
Functionality will need to be provided in child classes. |
void |
addSwitch(java.lang.String key,
Switch value)
|
void |
addThreadListener(ThreadListener threadListener)
|
boolean |
containsSwitch(java.lang.String key)
|
protected abstract void |
doRun()
|
boolean |
equals(Executable executable)
|
boolean |
equals(java.lang.String executableName)
|
boolean |
getActive()
Provides external access to the active boolean. |
int |
getId()
|
Lock |
getLock()
|
java.lang.String |
getName()
|
java.io.PrintStream |
getOutStream()
|
java.io.Reader |
getReader()
|
Switch |
getSwitch(java.lang.String key)
|
boolean |
isPipeable()
Not all apps will be able to accept data from a piped inputstream. |
boolean |
lock()
|
void |
processSwitches(java.util.Vector args)
This method takes in a Vector of a broken up command line. |
void |
removeThreadListener(ThreadListener threadListener)
|
void |
run()
|
void |
setActive(boolean active)
Provides external access to the active boolean. |
void |
setArgs(java.util.Vector args,
int threadId)
|
void |
setArgs(java.util.Vector args,
int threadId,
java.io.PrintStream out)
|
void |
setId(int id)
|
void |
setIncomming(boolean income)
|
void |
setInputStream(java.io.InputStream inStream)
|
void |
setLock(Lock lock)
|
void |
setOutputStream(java.io.OutputStream outStream)
|
void |
setOutStream(java.io.PrintStream o)
|
boolean |
stillIncomming()
|
void |
unlock()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface shell.Executable |
setArgs, setArgs |
| Field Detail |
public java.io.PrintStream out
public java.io.Reader in
| Constructor Detail |
public Command()
| Method Detail |
public void setId(int id)
setId in interface Executablepublic int getId()
getId in interface Executablepublic boolean isPipeable()
isPipeable in interface ExecutablePipepublic void setActive(boolean active)
setActive in interface Executableactive - - To set the state of the RuntimeCommand.public boolean getActive()
getActive in interface Executablepublic void setLock(Lock lock)
setLock in interface Executablepublic Lock getLock()
public boolean lock()
lock in interface Executablepublic void unlock()
unlock in interface Executablepublic java.io.Reader getReader()
getReader in interface Executablepublic void setInputStream(java.io.InputStream inStream)
setInputStream in interface Executablepublic java.io.PrintStream getOutStream()
getOutStream in interface Executablepublic void setOutStream(java.io.PrintStream o)
setOutStream in interface Executablepublic void setOutputStream(java.io.OutputStream outStream)
setOutputStream in interface Executable
public void setArgs(java.util.Vector args,
int threadId)
public void setArgs(java.util.Vector args,
int threadId,
java.io.PrintStream out)
public void addSwitch(java.lang.String key,
Switch value)
addSwitch in interface Executablepublic Switch getSwitch(java.lang.String key)
getSwitch in interface Executablepublic boolean containsSwitch(java.lang.String key)
containsSwitch in interface Executablepublic java.lang.String getName()
getName in interface Executablepublic boolean stillIncomming()
stillIncomming in interface Executablepublic void setIncomming(boolean income)
setIncomming in interface Executablepublic void addActiveSwitch(java.lang.Object obj)
addActiveSwitch in interface Executableobj - - Object to add to activeSwitches ArrayList.
public void processSwitches(java.util.Vector args)
throws java.io.IOException
processSwitches in interface Executableargs - - A vector of arguments to process
java.io.IOExceptionpublic void addThreadListener(ThreadListener threadListener)
addThreadListener in interface Executablepublic void removeThreadListener(ThreadListener threadListener)
removeThreadListener in interface Executable
protected abstract void doRun()
throws java.lang.Exception
java.lang.Exceptionpublic final void run()
run in interface Executablepublic boolean equals(Executable executable)
equals in interface Executablepublic boolean equals(java.lang.String executableName)
equals in interface Executable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||