|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ciagent.CIAgentTimer
The CIAgentTimer
allows autonomous behavior of an agent through
timed method calls.
Constructor Summary | |
CIAgentTimer(CIAgent agent)
Creates a timer, specifying the agent that owns the timer. |
Method Summary | |
int |
getAsyncTime()
Retrieves the asynchronous interval time (in milliseconds). |
int |
getSleepTime()
Retrieves the sleep time (in milliseconds). |
void |
quitTimer()
Indicates that the timer thread should be ended. |
void |
run()
Processes the asynchronous events and autonomous timer events periodically, with the interval based on the sleep time and/or the asynchronous event time. |
void |
setAsyncTime(int asyncTime)
Sets the time (in milliseconds) that determines how often the agent processes asynchronous events on its event queue. |
void |
setSleepTime(int sleepTime)
Sets the time (in milliseconds) that determines how often an agent performs the autonomous behavior that is defined in its processTimerPop
method. |
void |
startTimer()
Starts the timer thread. |
void |
stopTimer()
Indicates that timer events events should not be fired. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public CIAgentTimer(CIAgent agent)
agent
- the CIAgent that owns this timer objectMethod Detail |
public void setSleepTime(int sleepTime)
processTimerPop
method.sleepTime
- the amount of sleep time in millisecondspublic int getSleepTime()
public void setAsyncTime(int asyncTime)
asyncTime
- the interval time in millisecondspublic int getAsyncTime()
public void startTimer()
public void stopTimer()
public void quitTimer()
public void run()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |