|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--EASE.Agents.Engine.InstantiatedAgent
Field Summary | |
private java.util.Vector |
listeners
|
protected java.util.Hashtable |
params
|
protected InstantiatedAgent |
parent
|
private double |
parentPriority
|
protected boolean |
paused
|
protected Engine |
sensingEngine
|
protected InstantiatedSM |
sm
|
protected GenericAgent |
template
|
private boolean |
userFailEnded
|
private boolean |
userSuccessEnded
|
Constructor Summary | |
InstantiatedAgent(GenericAgent template,
java.util.Hashtable params,
InstantiatedAgent parent)
|
Method Summary | |
void |
addListener(AgentListener listener)
|
abstract void |
endContract()
This function is called when the agent that contracted this agent calls to end the contract. |
abstract boolean |
execute()
This function is called by the layer controller allowing the agent to do any required execution. |
boolean |
failing()
This method is called to see whether the agent is failing. |
java.lang.String |
getName()
Get the name of the agent. |
java.util.Hashtable |
getParams()
Get the params of the agent |
InstantiatedAgent |
getParent()
Get the parent of this agent. |
java.lang.String |
getState()
Get the name of the current state of the agent |
protected void |
notifyAllChangeListeners()
|
void |
notifyChange()
|
boolean |
paused()
This method is called to see whether the agent is paused. |
double |
priority()
Called to get the priority of the agent. |
java.lang.StringBuffer |
priorityTrace()
Get a priority calculation trace |
boolean |
succeeded()
This method is called to see whether the agent is in a success state. |
abstract boolean |
terminate()
This method is called to see if the agent is still alive. |
java.lang.String |
toString()
For display purposes. |
java.lang.StringBuffer |
transitionTrace()
|
void |
userEndContract(boolean success)
This function is called when the agent contract is broken by the user. |
void |
userPause(boolean pause)
This function is called when the user pauses the agent. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private boolean userFailEnded
private boolean userSuccessEnded
protected boolean paused
protected Engine sensingEngine
private java.util.Vector listeners
private double parentPriority
protected InstantiatedAgent parent
protected java.util.Hashtable params
protected GenericAgent template
protected InstantiatedSM sm
Constructor Detail |
public InstantiatedAgent(GenericAgent template, java.util.Hashtable params, InstantiatedAgent parent)
Method Detail |
public abstract boolean execute()
public abstract void endContract()
public abstract boolean terminate()
Returns false if still alive.
public void userEndContract(boolean success)
The parameter is used to indicate whether success or fail should be propogated up.
public void userPause(boolean pause)
public boolean failing()
public boolean succeeded()
public boolean paused()
public double priority()
public InstantiatedAgent getParent()
public java.lang.String getName()
public java.lang.String toString()
public java.lang.String getState()
public java.util.Hashtable getParams()
public java.lang.StringBuffer priorityTrace()
public java.lang.StringBuffer transitionTrace()
public void notifyChange()
public void addListener(AgentListener listener)
protected void notifyAllChangeListeners()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |