org.kaariboga.agents
Class BillyTheBit

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

public class BillyTheBit
extends Kaariboga

Travels around in a domain at random and lets a message pop up on every computer at random choices. The domain server must be running for this agent to work. After a number of maxTravels it kills itself.

See Also:
Serialized Form

Inner Class Summary
 class BillyTheBit.Popup
          Use a thread to let a window pop up.
 
Inner classes inherited from class org.kaariboga.core.Kaariboga
Kaariboga.FireEventThread, Kaariboga.FireMessageThread
 
Field Summary
(package private)  int cTravels
          Count of travels.
(package private)  int maxTravels
          Maximum count of travels.
(package private)  java.lang.String message
          The message that shows up.
(package private)  java.lang.String[] messages
           
(package private)  java.util.Vector servers
          List of all the servers in the domain.
 
Fields inherited from class org.kaariboga.core.Kaariboga
base, destination, kaaribogaListener, messageListener, name
 
Constructor Summary
BillyTheBit(java.lang.String name)
          Just initialize the super class.
 
Method Summary
 void onCreate()
          Initializes v with all servers connected to the domain.
 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, onArrival, onAwake, 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

messages

java.lang.String[] messages

servers

java.util.Vector servers
List of all the servers in the domain.

message

java.lang.String message
The message that shows up.

maxTravels

int maxTravels
Maximum count of travels.

cTravels

int cTravels
Count of travels.
Constructor Detail

BillyTheBit

public BillyTheBit(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()
Initializes v with all servers connected to the domain.
Overrides:
onCreate in class Kaariboga

run

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