com.ibm.aglet.system
Class ContextEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.ibm.aglet.event.AgletEvent
              |
              +--com.ibm.aglet.system.ContextEvent
All Implemented Interfaces:
java.io.Serializable

public class ContextEvent
extends AgletEvent

Context level event

Version:
1.50 $Date: 2001/07/28 06:34:07 $
Author:
Danny B. Lange, Mitsuru Oshima
See Also:
Serialized Form

Field Summary
static int ACTIVATED
          The ACTIVATED event type is delivered when an aglet is activated.
protected  AgletProxy agletproxy
          AgletProxy proxy
 java.lang.Object arg
          Arbitary arguments
static int ARRIVED
          The ARRIVED event type is delivered when an aglet is arrived at the context.
static int CLONED
          The CLONED event type is delivered when an aglet is cloned.
static int CONTEXT_FIRST
          Marks the first integer id for the range of context event ids.
static int CONTEXT_LAST
          Marks the last integer id for the range of context event ids.
static int CREATED
          The CREATED event type is delivered when an aglet is created.
static int DEACTIVATED
          The DEACTIVATED event type is delivered when an aglet is deactivated
static int DISPATCHED
          The DISPATCHED event type is delivered when an aglet is dispatched.
static int DISPOSED
          The DISPOSED event type is delivered when an aglet is disposed.
static int MESSAGE
          The MESSAGE event type is delivered when an context tries to show an message.
static int NO_RESPONSE
          Not used.
static int RESUMED
          The RESUMED event type is delivered when an aglet is resumed.
static int REVERTED
          The DISPATCHED event type is delivered when an aglet is retracted.
static int SHOW_DOCUMENT
          The SHOW_DOCUMENT event type is delivered when an aglet requests to show an document specified by the URL.
static int SHUTDOWN
          The STARTED event type is delivered when the context is being shutting down.
static int STARTED
          The STARTED event type is delivered when the aglet is started.
static int STATE_CHANGED
          The STATE_CHANGED event type is delivered when the state of an aglet has been changed.
static int SUSPENDED
          The SUSPENDED event type is delivered when an aglet is suspended
 
Fields inherited from class com.ibm.aglet.event.AgletEvent
id
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ContextEvent(int id, java.lang.Object context, AgletProxy target)
          Constructs an ContextEvent with id.
ContextEvent(int id, java.lang.Object context, AgletProxy target, java.lang.Object arg)
          Constructs an ContextEvent with id.
 
Method Summary
 AgletContext getAgletContext()
          Gets AgletContext object of this event
 AgletProxy getAgletProxy()
          Gets AgletProxy object of this event null if the event is STARTED or STOPPED
 java.net.URL getDocumentURL()
          Gets the document URL.
 java.lang.String getMessage()
          Gets the message to show
 java.lang.String getText()
           
 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

CONTEXT_FIRST

public static final int CONTEXT_FIRST
Marks the first integer id for the range of context event ids.

CONTEXT_LAST

public static final int CONTEXT_LAST
Marks the last integer id for the range of context event ids.

STARTED

public static final int STARTED
The STARTED event type is delivered when the aglet is started.
See Also:
aglet.AgletContext#start

SHUTDOWN

public static final int SHUTDOWN
The STARTED event type is delivered when the context is being shutting down.
See Also:
aglet.AgletContext#shutdown

CREATED

public static final int CREATED
The CREATED event type is delivered when an aglet is created.
See Also:
aglet.AgletContext#createAglet

CLONED

public static final int CLONED
The CLONED event type is delivered when an aglet is cloned.
See Also:
aglet.Aglet#clone

DISPOSED

public static final int DISPOSED
The DISPOSED event type is delivered when an aglet is disposed.
See Also:
aglet.Aglet#dispose

DISPATCHED

public static final int DISPATCHED
The DISPATCHED event type is delivered when an aglet is dispatched.
See Also:
aglet.Aglet#dispatch

REVERTED

public static final int REVERTED
The DISPATCHED event type is delivered when an aglet is retracted.
See Also:
aglet.AgletContext#retractAglet

ARRIVED

public static final int ARRIVED
The ARRIVED event type is delivered when an aglet is arrived at the context.

DEACTIVATED

public static final int DEACTIVATED
The DEACTIVATED event type is delivered when an aglet is deactivated
See Also:
aglet.Aglet#deactivate

SUSPENDED

public static final int SUSPENDED
The SUSPENDED event type is delivered when an aglet is suspended
See Also:
aglet.Aglet#deactivate

ACTIVATED

public static final int ACTIVATED
The ACTIVATED event type is delivered when an aglet is activated.
See Also:
aglet.Aglet#activate

RESUMED

public static final int RESUMED
The RESUMED event type is delivered when an aglet is resumed.
See Also:
aglet.Aglet#resume

STATE_CHANGED

public static final int STATE_CHANGED
The STATE_CHANGED event type is delivered when the state of an aglet has been changed.

SHOW_DOCUMENT

public static final int SHOW_DOCUMENT
The SHOW_DOCUMENT event type is delivered when an aglet requests to show an document specified by the URL.
See Also:
aglet.AgletContext#showDocument

MESSAGE

public static final int MESSAGE
The MESSAGE event type is delivered when an context tries to show an message.

NO_RESPONSE

public static final int NO_RESPONSE
Not used.

agletproxy

protected AgletProxy agletproxy
AgletProxy proxy

arg

public java.lang.Object arg
Arbitary arguments
Constructor Detail

ContextEvent

public ContextEvent(int id,
                    java.lang.Object context,
                    AgletProxy target)
Constructs an ContextEvent with id.

ContextEvent

public ContextEvent(int id,
                    java.lang.Object context,
                    AgletProxy target,
                    java.lang.Object arg)
Constructs an ContextEvent with id.
Method Detail

getAgletContext

public AgletContext getAgletContext()
Gets AgletContext object of this event

getAgletProxy

public AgletProxy getAgletProxy()
Gets AgletProxy object of this event null if the event is STARTED or STOPPED

getDocumentURL

public java.net.URL getDocumentURL()
Gets the document URL.

getMessage

public java.lang.String getMessage()
Gets the message to show

getText

public java.lang.String getText()

toString

public java.lang.String toString()
Overrides:
toString in class java.util.EventObject