org.kaariboga.agents
Class HelloPlugInAgent

java.lang.Object
  |
  +--org.kaariboga.core.Kaariboga
        |
        +--org.kaariboga.agents.HelloPlugInAgent
All Implemented Interfaces:
KbMessageHandler, java.lang.Runnable, java.io.Serializable

public class HelloPlugInAgent
extends Kaariboga

The HelloPlugInAgents is an example of how to use a plug-in.

See Also:
Serialized Form

Inner classes inherited from class org.kaariboga.core.Kaariboga
Kaariboga.FireEventThread, Kaariboga.FireMessageThread
 
Field Summary
private  HelloService serviceObject
          The object this class wants to access at a base.
private  int trips
          How often did the agent travel?
 
Fields inherited from class org.kaariboga.core.Kaariboga
base, destination, kaaribogaListener, messageListener, name
 
Constructor Summary
HelloPlugInAgent(java.lang.String name)
          Just initialize the super class.
 
Method Summary
 void onArrival()
          Called by the base when the agent arrives on the base.
 void run()
          This is automically called if the agent arrives on a base.
 
Methods inherited from class org.kaariboga.core.Kaariboga
addKaaribogaListener, addKaaribogaMessageListener, fireDestroyRequest, fireDispatchRequest, fireKaaribogaMessage, fireSleepRequest, getDestination, getName, handleMessage, onAwake, onCreate, onDestroy, onDispatch, onSleep, setBase, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

trips

private int trips
How often did the agent travel?

serviceObject

private transient HelloService serviceObject
The object this class wants to access at a base.
Constructor Detail

HelloPlugInAgent

public HelloPlugInAgent(java.lang.String name)
Just initialize the super class.
Parameters:
name - The name of the agent. This name has to be unique. Normally the KaaribogaBase class provides some method to generate a unique name.
Method Detail

run

public void run()
This is automically called if the agent arrives on a base.
Overrides:
run in class Kaariboga

onArrival

public void onArrival()
Called by the base when the agent arrives on the base.
Overrides:
onArrival in class Kaariboga