|
||||||||||
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 Executable
public int getId()
getId
in interface Executable
public boolean isPipeable()
isPipeable
in interface Executable
Pipe
public void setActive(boolean active)
setActive
in interface Executable
active
- - To set the state of the RuntimeCommand.public boolean getActive()
getActive
in interface Executable
public void setLock(Lock lock)
setLock
in interface Executable
public Lock getLock()
public boolean lock()
lock
in interface Executable
public void unlock()
unlock
in interface Executable
public java.io.Reader getReader()
getReader
in interface Executable
public void setInputStream(java.io.InputStream inStream)
setInputStream
in interface Executable
public java.io.PrintStream getOutStream()
getOutStream
in interface Executable
public void setOutStream(java.io.PrintStream o)
setOutStream
in interface Executable
public 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 Executable
public Switch getSwitch(java.lang.String key)
getSwitch
in interface Executable
public boolean containsSwitch(java.lang.String key)
containsSwitch
in interface Executable
public java.lang.String getName()
getName
in interface Executable
public boolean stillIncomming()
stillIncomming
in interface Executable
public void setIncomming(boolean income)
setIncomming
in interface Executable
public void addActiveSwitch(java.lang.Object obj)
addActiveSwitch
in interface Executable
obj
- - Object to add to activeSwitches ArrayList.public void processSwitches(java.util.Vector args) throws java.io.IOException
processSwitches
in interface Executable
args
- - A vector of arguments to process
java.io.IOException
public void addThreadListener(ThreadListener threadListener)
addThreadListener
in interface Executable
public void removeThreadListener(ThreadListener threadListener)
removeThreadListener
in interface Executable
protected abstract void doRun() throws java.lang.Exception
java.lang.Exception
public final void run()
run
in interface Executable
public boolean equals(Executable executable)
equals
in interface Executable
public 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 |