org.kaariboga.agents
Class HelloTraveler

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

public class HelloTraveler
extends Kaariboga

The travel agent just opens a dialog, travels to another base and prints Hello World to the screen. After that it destroys itself.

See Also:
Serialized Form

Inner classes inherited from class org.kaariboga.core.Kaariboga
Kaariboga.FireEventThread, Kaariboga.FireMessageThread
 
Fields inherited from class org.kaariboga.core.Kaariboga
base, destination, kaaribogaListener, messageListener, name
 
Constructor Summary
HelloTraveler(java.lang.String name)
          Just initialize the super class.
 
Method Summary
 void onArrival()
          This is automically called if the agent arrives on a base.
 void onCreate()
          This is called just after the kaariboga has been created and the base has set the important fields.
 
Methods inherited from class org.kaariboga.core.Kaariboga
addKaaribogaListener, addKaaribogaMessageListener, fireDestroyRequest, fireDispatchRequest, fireKaaribogaMessage, fireSleepRequest, getDestination, getName, handleMessage, onAwake, onDestroy, onDispatch, onSleep, run, setBase, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Constructor Detail

HelloTraveler

public HelloTraveler(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

onCreate

public void onCreate()
This is called just after the kaariboga has been created and the base has set the important fields.
Overrides:
onCreate in class Kaariboga

onArrival

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