com.ibm.aglet.event
Class MobilityEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bycom.ibm.aglet.event.AgletEvent
          extended bycom.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.
private static java.lang.String[] name
           
static int REVERTING
          The REVERTING event type is delivered when the retaction is requested from the remote site.
private  Ticket ticket
           
 
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
 
Method Summary
 AgletProxy getAgletProxy()
          Returns the aglet proxy which is the source of the event.
 java.net.URL getLocation()
          Gets the location.
 Ticket getTicket()
          Gets the ticket.
 java.lang.String toString()
           
 
Methods inherited from class com.ibm.aglet.event.AgletEvent
getID
 
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
 

Field Detail

AGLET_MOBILITY_FIRST

public static final int AGLET_MOBILITY_FIRST
Marks the first integer id for the range of mobility event ids.

See Also:
Constant Field Values

AGLET_MOBILITY_LAST

public static final int AGLET_MOBILITY_LAST
Marks the last integer id for the range of mobility event ids.

See Also:
Constant Field Values

DISPATCHING

public static final int DISPATCHING
The DISPATCHING event type is delivered just after the dispatch methods is called.

See Also:
Constant Field Values

REVERTING

public static final int REVERTING
The REVERTING event type is delivered when the retaction is requested from the remote site.

See Also:
Constant Field Values

ARRIVAL

public static final int ARRIVAL
The ARRIVAL event type is delivered when the aglet arrived at the destination.

See Also:
Constant Field Values

name

private static java.lang.String[] name

ticket

private Ticket ticket
Constructor Detail

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

Method Detail

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()