com.ibm.aglet.event
Class MobilityEvent
java.lang.Object
|
+--java.util.EventObject
|
+--com.ibm.aglet.event.AgletEvent
|
+--com.ibm.aglet.event.MobilityEvent
- All Implemented Interfaces:
- java.io.Serializable
- public class MobilityEvent
- extends AgletEvent
The mobility event occurs when the aglet is about to move.
- Version:
- 1.00 $Date: 2001/07/28 06:34:12 $
- Author:
- Mitsuru Oshima
- See Also:
- Serialized Form
Field Summary |
static int |
AGLET_MOBILITY_FIRST
Marks the first integer id for the range of mobility event ids. |
static int |
AGLET_MOBILITY_LAST
Marks the last integer id for the range of mobility event ids. |
static int |
ARRIVAL
The ARRIVAL event type is delivered when the aglet arrived at the
destination. |
static int |
DISPATCHING
The DISPATCHING event type is delivered just after the dispatch methods
is called. |
static int |
REVERTING
The REVERTING event type is delivered when the retaction is requested
from the remote site. |
Fields inherited from class com.ibm.aglet.event.AgletEvent |
id |
Fields inherited from class java.util.EventObject |
source |
Constructor Summary |
MobilityEvent(int id,
AgletProxy target,
Ticket tick)
Constructs a mobility event with specified id, target and ticket |
MobilityEvent(int id,
AgletProxy target,
java.net.URL loc)
Constructs a mobility event with specified id, target and location |
Methods inherited from class java.util.EventObject |
getSource |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AGLET_MOBILITY_FIRST
public static final int AGLET_MOBILITY_FIRST
- Marks the first integer id for the range of mobility event ids.
AGLET_MOBILITY_LAST
public static final int AGLET_MOBILITY_LAST
- Marks the last integer id for the range of mobility event ids.
DISPATCHING
public static final int DISPATCHING
- The DISPATCHING event type is delivered just after the dispatch methods
is called.
REVERTING
public static final int REVERTING
- The REVERTING event type is delivered when the retaction is requested
from the remote site.
ARRIVAL
public static final int ARRIVAL
- The ARRIVAL event type is delivered when the aglet arrived at the
destination.
MobilityEvent
public MobilityEvent(int id,
AgletProxy target,
Ticket tick)
- Constructs a mobility event with specified id, target and ticket
MobilityEvent
public MobilityEvent(int id,
AgletProxy target,
java.net.URL loc)
- Constructs a mobility event with specified id, target and location
getAgletProxy
public AgletProxy getAgletProxy()
- Returns the aglet proxy which is the source of the event.
getLocation
public java.net.URL getLocation()
- Gets the location. This specifies:
The destination if the event is DISPATCHING .
The requester if the event is REVERTING .
The host it arrived if the event is ARRIVED . This returns
null for the REVERTING event at the present.
getTicket
public Ticket getTicket()
- Gets the ticket.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.util.EventObject