|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.kaariboga.core.Kaariboga | +--org.kaariboga.agents.Counter
Demonstrates the handling of time consuming applications by couning up to a given number.
Inner classes inherited from class org.kaariboga.core.Kaariboga |
Kaariboga.FireEventThread, Kaariboga.FireMessageThread |
Field Summary | |
(package private) int |
i
Count up to i. |
(package private) java.lang.Thread |
shouldLive
Used to end the thread. |
Fields inherited from class org.kaariboga.core.Kaariboga |
base, destination, kaaribogaListener, messageListener, name |
Constructor Summary | |
Counter(java.lang.String name)
Creates a new counter that counts up to a given number. |
Method Summary | |
void |
onDestroy()
Called by the kaariboga base when this agent has to be destroyed. |
void |
onDispatch()
Called by the kaariboga base before the agent is dispatched to another base. |
void |
run()
The run method just counts and ends when the thread is set to null. |
Methods inherited from class org.kaariboga.core.Kaariboga |
addKaaribogaListener, addKaaribogaMessageListener, fireDestroyRequest, fireDispatchRequest, fireKaaribogaMessage, fireSleepRequest, getDestination, getName, handleMessage, onArrival, onAwake, onCreate, onSleep, setBase, toString |
Methods inherited from class java.lang.Object |
|
Field Detail |
volatile java.lang.Thread shouldLive
int i
Constructor Detail |
public Counter(java.lang.String name)
Method Detail |
public void run()
run
in class Kaariboga
public void onDispatch()
onDispatch
in class Kaariboga
public void onDestroy()
onDestroy
in class Kaariboga
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |