ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.able.platform
Class AblePlatformServiceEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.ibm.able.platform.AblePlatformServiceEvent
All Implemented Interfaces:
java.io.Serializable

public class AblePlatformServiceEvent
extends java.util.EventObject

This class defines events generated by those ABLE-supplied platform services that implement the AblePlatformServiceEventGenerator interface.

See Also:
RmiAblePlatformServiceEventGenerator, AblePlatformServiceEventListener, Serialized Form

Field Summary
static int ADS_DEREGISTERED_AGENT_DESCRIPTION
          Service Event ID: Agent Directory Service: Deregistered an Agent Description
static int ADS_MODIFIED_AGENT_DESCRIPTION
          Service Event ID: Agent Directory Service: Modified an Agent Description
static int ADS_REGISTERED_AGENT_DESCRIPTION
          Service Event ID: Agent Directory Service: Registered an Agent Description
static int ALCS_CREATED_AGENT_INSTANCE
          Service Event ID: Agent Lifecycle Service: Created an agent
static int ALCS_INITIALIZED_AGENT_INSTANCE
          Service Event ID: Agent Lifecycle Service: Initialized an agent
static int ALCS_QUIESCE_AGENT_POOL
          Service Event ID: Agent Lifecycle Service: Quiesce Agent Pool
static int ALCS_QUIT_AGENT_INSTANCE
          Service Event ID: Agent Lifecycle Service: Quit an agent
static int ALCS_RESET_AGENT_INSTANCE
          Service Event ID: Agent Lifecycle Service: Reset an agent
static int ALCS_RESUMED_AGENT_INSTANCE
          Service Event ID: Agent Lifecycle Service: Resumed an agent
static int ALCS_SUSPENDED_AGENT_INSTANCE
          Service Event ID: Agent Lifecycle Service: Suspended an agent
static int ALS_LOGGED_AGENT_SITUATION_REPORT
          Service Event ID: Agent Logging Service: Logged an Agent Situation Report
static int ALS_REMOVED_AGENT_SITUATION_REPORT
          Service Event ID: Agent Logging Service: Removed an Agent Situation Report
static int ALS_UPDATED_AGENT_SITUATION_REPORT
          Service Event ID: Agent Logging Service: Updated an Agent Situation Report
protected  java.lang.String eventDescription
          eventDescription is an NLS description of the event.
protected  int eventId
          eventId is the ID of a service event defined in this file.
protected  java.lang.Object eventObject1
          eventObject1 is either null, or it contains any arbitrary object that makes sense to the AblePlatformServiceEventGenerator generating the event and its listeners.
protected  java.lang.Object eventObject2
          eventObject2 is either null, or it contains any arbitrary object that makes sense to the AblePlatformServiceEventGenerator generating the event and its listeners.
protected  java.lang.Object eventSource
          eventSource contains a nontransient version of the source generating the event.
static int UNKNOWN
          Service Event ID: Unknown service event
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
AblePlatformServiceEvent(java.lang.Object theEventSource, int theEventId)
          Creates a new AblePlatformServiceEvent with the specified source and event ID; the event description is set to the empty string and event objects 1 and 2 are both set to null.
AblePlatformServiceEvent(java.lang.Object theEventSource, int theEventId, java.lang.Object theEventObject1)
          Creates a new AblePlatformServiceEvent with the specified source, event ID, and event object; the event description is set to the empty string and event object 2 is set to null.
AblePlatformServiceEvent(java.lang.Object theEventSource, int theEventId, java.lang.Object theEventObject1, java.lang.Object theEventObject2)
          Creates a new AblePlatformServiceEvent with the specified source, event ID, and event objects; the event description is set to the empty string.
AblePlatformServiceEvent(java.lang.Object theEventSource, int theEventId, java.lang.String theEventDescription)
          Creates a new AblePlatformServiceEvent; with the specified source, event ID, and event description; event objects 1 and 2 are both set to null.
AblePlatformServiceEvent(java.lang.Object theEventSource, int theEventId, java.lang.String theEventDescription, java.lang.Object theEventObject1)
          Creates a new AblePlatformServiceEvent with the specified source, event ID, event description, and event object; event object 2 is set to null.
AblePlatformServiceEvent(java.lang.Object theEventSource, int theEventId, java.lang.String theEventDescription, java.lang.Object theEventObject1, java.lang.Object theEventObject2)
          Creates a new AblePlatformServiceEvent with the specified source, event ID, event description, and event objects.
 
Method Summary
static java.lang.String Copyright()
          Gets the copyright statement of this class.
static java.lang.String EventId(int theEventId)
          Given a Service Event ID numeric value, return the Java name of that value.
 java.lang.String getEventDescription()
          Gets the NLS description of the event.
 int getEventId()
          Gets the ID of the event.
 java.lang.Object getEventObject1()
          Gets the first object of the event.
 java.lang.Object getEventObject2()
          Gets the second object of the event.
 java.lang.Object getEventSource()
          Gets the source of the event; this is typically an AblePlatformServiceEventGenerator.
 java.lang.Object getNewValue()
          For "property change" types of events, retrieve the "new" property value of the event.
 java.lang.Object getOldValue()
          For "property change" types of events, retrieve the "old" property value of the event.
 boolean isValidEventId(int theEventId)
          Determines whether the specified Service Event ID value is a valid Service Event ID; that is, one that is defined in this class.
 java.lang.String toString()
          Get a string describing (the contents of) the object.
 
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

UNKNOWN

public static final int UNKNOWN
Service Event ID: Unknown service event

ADS_REGISTERED_AGENT_DESCRIPTION

public static final int ADS_REGISTERED_AGENT_DESCRIPTION
Service Event ID: Agent Directory Service: Registered an Agent Description

ADS_DEREGISTERED_AGENT_DESCRIPTION

public static final int ADS_DEREGISTERED_AGENT_DESCRIPTION
Service Event ID: Agent Directory Service: Deregistered an Agent Description

ADS_MODIFIED_AGENT_DESCRIPTION

public static final int ADS_MODIFIED_AGENT_DESCRIPTION
Service Event ID: Agent Directory Service: Modified an Agent Description

ALCS_CREATED_AGENT_INSTANCE

public static final int ALCS_CREATED_AGENT_INSTANCE
Service Event ID: Agent Lifecycle Service: Created an agent

ALCS_INITIALIZED_AGENT_INSTANCE

public static final int ALCS_INITIALIZED_AGENT_INSTANCE
Service Event ID: Agent Lifecycle Service: Initialized an agent

ALCS_QUIT_AGENT_INSTANCE

public static final int ALCS_QUIT_AGENT_INSTANCE
Service Event ID: Agent Lifecycle Service: Quit an agent

ALCS_SUSPENDED_AGENT_INSTANCE

public static final int ALCS_SUSPENDED_AGENT_INSTANCE
Service Event ID: Agent Lifecycle Service: Suspended an agent

ALCS_RESUMED_AGENT_INSTANCE

public static final int ALCS_RESUMED_AGENT_INSTANCE
Service Event ID: Agent Lifecycle Service: Resumed an agent

ALCS_RESET_AGENT_INSTANCE

public static final int ALCS_RESET_AGENT_INSTANCE
Service Event ID: Agent Lifecycle Service: Reset an agent

ALCS_QUIESCE_AGENT_POOL

public static final int ALCS_QUIESCE_AGENT_POOL
Service Event ID: Agent Lifecycle Service: Quiesce Agent Pool

ALS_LOGGED_AGENT_SITUATION_REPORT

public static final int ALS_LOGGED_AGENT_SITUATION_REPORT
Service Event ID: Agent Logging Service: Logged an Agent Situation Report

ALS_REMOVED_AGENT_SITUATION_REPORT

public static final int ALS_REMOVED_AGENT_SITUATION_REPORT
Service Event ID: Agent Logging Service: Removed an Agent Situation Report

ALS_UPDATED_AGENT_SITUATION_REPORT

public static final int ALS_UPDATED_AGENT_SITUATION_REPORT
Service Event ID: Agent Logging Service: Updated an Agent Situation Report

eventSource

protected final java.lang.Object eventSource
eventSource contains a nontransient version of the source generating the event. For distributed agent applications, this must be serializable and is typically specified as a Java interface.

eventId

protected final int eventId
eventId is the ID of a service event defined in this file.

eventDescription

protected final java.lang.String eventDescription
eventDescription is an NLS description of the event.

This field is initialized to the empty string ("").


eventObject1

protected final java.lang.Object eventObject1
eventObject1 is either null, or it contains any arbitrary object that makes sense to the AblePlatformServiceEventGenerator generating the event and its listeners. For property change types of events, this member typically contains the "old" propertyvalue.

If this event is to be tranported through RMI, this object must be serializable.

This field is initialized to null.


eventObject2

protected final java.lang.Object eventObject2
eventObject2 is either null, or it contains any arbitrary object that makes sense to the AblePlatformServiceEventGenerator generating the event and its listeners. For property change types of events, this member typically contains the "new" property value.

If this event is to be tranported through RMI, this object must be serializable.

This field is initialized to null.

Constructor Detail

AblePlatformServiceEvent

public AblePlatformServiceEvent(java.lang.Object theEventSource,
                                int theEventId)
Creates a new AblePlatformServiceEvent with the specified source and event ID; the event description is set to the empty string and event objects 1 and 2 are both set to null.
Parameters:
theEventSource - The service that is creating this event.

theEventId - One of the service event IDs defined in this class.


AblePlatformServiceEvent

public AblePlatformServiceEvent(java.lang.Object theEventSource,
                                int theEventId,
                                java.lang.String theEventDescription)
Creates a new AblePlatformServiceEvent; with the specified source, event ID, and event description; event objects 1 and 2 are both set to null.
Parameters:
theEventSource - The service that is creating this event.

theEventId - One of the service event IDs defined in this class.

theEventDescription - An NLS description of the event.


AblePlatformServiceEvent

public AblePlatformServiceEvent(java.lang.Object theEventSource,
                                int theEventId,
                                java.lang.Object theEventObject1)
Creates a new AblePlatformServiceEvent with the specified source, event ID, and event object; the event description is set to the empty string and event object 2 is set to null.
Parameters:
theEventSource - The service that is creating this event.

theEventId - One of the service event IDs defined in this class.

theEventObject1 - Any arbitrary object that makes sense to the generating service and its listeners.


AblePlatformServiceEvent

public AblePlatformServiceEvent(java.lang.Object theEventSource,
                                int theEventId,
                                java.lang.String theEventDescription,
                                java.lang.Object theEventObject1)
Creates a new AblePlatformServiceEvent with the specified source, event ID, event description, and event object; event object 2 is set to null.
Parameters:
theEventSource - The service that is creating this event.

theEventId - One of the service event IDs defined in this class.

theEventDescription - An NLS description of the event.

theEventObject1 - Any arbitrary object that makes sense to the generating service and its listeners.


AblePlatformServiceEvent

public AblePlatformServiceEvent(java.lang.Object theEventSource,
                                int theEventId,
                                java.lang.Object theEventObject1,
                                java.lang.Object theEventObject2)
Creates a new AblePlatformServiceEvent with the specified source, event ID, and event objects; the event description is set to the empty string.
Parameters:
theEventSource - The service that is creating this event.

theEventId - One of the service event IDs defined in this class.

theEventObject1 - Any arbitrary object that makes sense to the generating service and its listeners.

For property change types of events, this parameter typically specifies the "old" property value.

theEventObject2 - Any arbitrary object that makes sense to the generating service and its listeners.

For property change types of events, this parameter typically contains the "new" property value.


AblePlatformServiceEvent

public AblePlatformServiceEvent(java.lang.Object theEventSource,
                                int theEventId,
                                java.lang.String theEventDescription,
                                java.lang.Object theEventObject1,
                                java.lang.Object theEventObject2)
Creates a new AblePlatformServiceEvent with the specified source, event ID, event description, and event objects.
Parameters:
theEventSource - The service that is creating this event.

theEventId - One of the service event IDs defined in this class.

theEventDescription - An NLS description of the event.

theEventObject1 - Any arbitrary object that makes sense to the generating service and its listeners.

For property change types of events, this parameter typically specifies the "old" property value.

theEventObject2 - Any arbitrary object that makes sense to the generating service and its listeners.

For property change types of events, this parameter typically contains the "new" property value.

Method Detail

EventId

public static final java.lang.String EventId(int theEventId)
Given a Service Event ID numeric value, return the Java name of that value.
Parameters:
theEventId - A Service Event ID value.

Returns:
A string of the form "n:AblePlatformServiceEvent.<CONSTANT_NAME>" where "n" is the given input parameter and "CONSTANT_NAME" is the name of the constant represented by "n". If "n" is not a valid service event ID, "n:AblePlatformServiceEvent.Unrecognized" is returned.

getEventSource

public java.lang.Object getEventSource()
Gets the source of the event; this is typically an AblePlatformServiceEventGenerator.
Returns:
The source that generated the event.

getEventId

public int getEventId()
Gets the ID of the event.
Returns:
A service ID value defined in this class.

isValidEventId

public boolean isValidEventId(int theEventId)
Determines whether the specified Service Event ID value is a valid Service Event ID; that is, one that is defined in this class.
Parameters:
theEventId - One of the numeric values defined for this class.

Returns:
true if the specified event ID is one of the values defined in this class; false otherwise.

getEventDescription

public java.lang.String getEventDescription()
Gets the NLS description of the event.
Returns:
An NLS description of the event.

getEventObject1

public java.lang.Object getEventObject1()
Gets the first object of the event.
Returns:
An object supplied by the event generator. This may be null.

getEventObject2

public java.lang.Object getEventObject2()
Gets the second object of the event.
Returns:
An object supplied by the event generator. This may be null.

getOldValue

public java.lang.Object getOldValue()
For "property change" types of events, retrieve the "old" property value of the event.
Returns:
An object supplied by the event generator. This may be null.

getNewValue

public java.lang.Object getNewValue()
For "property change" types of events, retrieve the "new" property value of the event.
Returns:
An object supplied by the event generator. This may be null.

toString

public java.lang.String toString()
Get a string describing (the contents of) the object.
Overrides:
toString in class java.util.EventObject
Returns:
A string containing the current contents of the object.


Copyright

public static java.lang.String Copyright()
Gets the copyright statement of this class.
Returns:
This class's copyright statement.

ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003