org.kaariboga.core
Class KaaribogaEvent
java.lang.Object
|
+--java.util.EventObject
|
+--org.kaariboga.core.KaaribogaEvent
- All Implemented Interfaces:
- java.io.Serializable
- public class KaaribogaEvent
- extends java.util.EventObject
This is the class for all events that can be fired by kaaribogas.
Normaly this events are handled in an asynchronous way.
- See Also:
- Serialized Form
Field Summary |
static int |
DESTROY_REQUEST
Send by an agent if it wants to be destroyed. |
static int |
DISPATCH_REQUEST
Send by an agent if it wants to be transfered to a new location. |
protected int |
id
The events id. |
static int |
SLEEP_REQUEST
Send by an agent if it wants to be put asleep. |
Fields inherited from class java.util.EventObject |
source |
Constructor Summary |
KaaribogaEvent(java.lang.Object obj,
int id)
Creates a new kaariboga event. |
Method Summary |
int |
getID()
Returns the id of this message: DISPATCH_REQUEST,
SLEEP_REQUEST or DESTROY_REQUEST |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
DISPATCH_REQUEST
public static final int DISPATCH_REQUEST
- Send by an agent if it wants to be transfered to a new location.
SLEEP_REQUEST
public static final int SLEEP_REQUEST
- Send by an agent if it wants to be put asleep.
DESTROY_REQUEST
public static final int DESTROY_REQUEST
- Send by an agent if it wants to be destroyed.
id
protected int id
- The events id. This can be DISPATCH_REQUEST,
SLEEP_REQUEST or DESTROY_REQUEST.
KaaribogaEvent
public KaaribogaEvent(java.lang.Object obj,
int id)
- Creates a new kaariboga event.
- Parameters:
obj
- The object that created the event.id
- The events id. This can be DISPATCH_REQUEST,
SLEEP_REQUEST or DESTROY_REQUEST.
getID
public int getID()
- Returns the id of this message: DISPATCH_REQUEST,
SLEEP_REQUEST or DESTROY_REQUEST