Modifier and Type | Field and Description |
---|---|
java.util.Stack<Command> |
comhist |
long |
commandid |
static int |
GODPORT |
static boolean |
VERBOSE |
Constructor and Description |
---|
GOD(java.lang.String ip) |
Modifier and Type | Method and Description |
---|---|
void |
addCommandToRunning(ProtocolZero com) |
void |
addEventListener(CommandTerminationListener comlist)
Adds a command termination listener to the Quagent.
|
void |
addEventListener(GODEventListener godlist) |
void |
execute(Command com)
Executes command and blocks until server returns termination response.
|
GODEventListener |
getEventListener() |
java.util.List<ProtocolZero> |
getRunningList() |
java.io.Writer |
getWriter()
Returns the entity's socket writer.
|
long |
incrementCommandID() |
boolean |
isQuagent() |
void |
notifyCommandTerminationListener(Command com) |
void |
removeCommandFromRunning(ProtocolZero com) |
void |
start(Command com)
Sends command to server to execute, and returns.
|
void |
waitForTerminate(Command com)
Blocks until com has terminated.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public static int GODPORT
public long commandid
public java.util.Stack<Command> comhist
public static boolean VERBOSE
public GOD(java.lang.String ip) throws java.net.UnknownHostException, java.io.IOException
java.net.UnknownHostException
java.io.IOException
public void execute(Command com)
Entity
public void start(Command com)
Entity
public void waitForTerminate(Command com)
Entity
waitForTerminate
in interface Entity
com
- Command to block on.public java.util.List<ProtocolZero> getRunningList()
getRunningList
in interface Entity
public java.io.Writer getWriter()
Entity
public long incrementCommandID()
incrementCommandID
in interface Entity
public void removeCommandFromRunning(ProtocolZero com)
removeCommandFromRunning
in interface Entity
public void addCommandToRunning(ProtocolZero com)
addCommandToRunning
in interface Entity
public void notifyCommandTerminationListener(Command com)
notifyCommandTerminationListener
in interface Entity
public void addEventListener(CommandTerminationListener comlist)
Entity
addEventListener
in interface Entity
comlist
- CommandTermiantionListener to attachpublic void addEventListener(GODEventListener godlist)
addEventListener
in interface GODEntity
public GODEventListener getEventListener()
getEventListener
in interface GODEntity