com.ibm.etill.framework.eventmgr
Class PSEvent

java.lang.Object
  |
  +--com.ibm.etill.framework.eventmgr.PSEvent
All Implemented Interfaces:
EventConstants
Direct Known Subclasses:
CassetteEvent, NetMgrEvent, StateEvent

public class PSEvent
extends Object
implements EventConstants

Cassettes should not extend this class - use CassetteEvent instead.

PSEvent is the base class for all classes that represent external events for the Payment Server Framework's Event Notificiation service.

Events are external asynchronous notifications of a change that has occurred within the Payment Server or one of its cassettes. When they are generated, the Framework's Event Notification service sends the event to each event listener application that has registerd for this type of event. See the Payment Server Programming Reference and Guide for a complete description of Framework's Event Notification service.

See the Javadoc for CassetteEvent for details on how to define and generate cassette-specific events.

See Also:
CassetteEvent, CommitPoint.addToEventList(com.ibm.etill.framework.eventmgr.PSEvent)

Fields inherited from interface com.ibm.etill.framework.eventmgr.EventConstants
ACCOUNTNUMBER, BATCH_OBJECT, BATCHNUMBER, CASSETTE_EVENT, CASSETTENAME, COMPONENTNAME, CREDIT_OBJECT, CREDITNUMBER, CURRENTSTATE, DOWN, ENABLED, EVENTLISTENER, EVENTTYPE, FRAMEWORK, HOSTNAME, LISTENERURI, MERCHANT_EVENT, MERCHANTNUMBER, NETMGR_EVENT, OBJECTNAME, ORDER_OBJECT, ORDERDATA1, ORDERDATA2, ORDERDATA3, ORDERDATA4, ORDERDATA5, ORDERNUMBER, PAYMENT_OBJECT, PAYMENTNUMBER, PORTNUMBER, PREVIOUSSTATE, PRIMARYRC, SECONDARYRC, SEPARATOR, SOCKSHOST, SOCKSPORT, STATE_CHANGE_EVENT, STATUS, TIMEGENERATED, TIMEREGISTERED, TRANSACTIONID, UP
 
Constructor Summary
PSEvent(Object source)
          This constructor should not be called directly by cassettes.
PSEvent(Object source, int e_type)
          This constructor should not be called directly by cassettes.
 
Method Summary
 int getEventType()
          Returns the event type value assigned to this PSEvent object.
 Object getSource()
          Returns the object which generated this event object.
 Date getTimestamp()
          Returns the time and date at which this PSEvent was created.
 String getTimestampAsString()
          Returns the time and date at which this PSEvent was created.
 void setEventType(int type)
          Assigns an event type value to this PSEvent object.
 String toString()
          Returns a string representation of this event object for tracing purposes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PSEvent

public PSEvent(Object source)
This constructor should not be called directly by cassettes. The Framework calls this constructor as the last in a chain of constructors to build a PSEvent object for the specified input Object.
Parameters:
source - the Java object that generated this event.

PSEvent

public PSEvent(Object source,
               int e_type)
This constructor should not be called directly by cassettes. The Framework calls this constructor as the last in a chain of constructors to build a PSEvent object of the specified event type for the specified input Object.
Parameters:
source - the Java object that generated this event.
e_type - an int containing the event type. Each subclass uses a different event type value.
Method Detail

setEventType

public void setEventType(int type)
Assigns an event type value to this PSEvent object.
Parameters:
type - an int containing the event type. Each subclass uses a different event type value.

getEventType

public int getEventType()
Returns the event type value assigned to this PSEvent object.
Returns:
int - the event type of this PSEvent object.

getTimestamp

public Date getTimestamp()
Returns the time and date at which this PSEvent was created.
Returns:
java.util.Date - a timestamp created when this PSEvent object was constructed.

getTimestampAsString

public String getTimestampAsString()
Returns the time and date at which this PSEvent was created.
Returns:
String - the object's timestamp as a String.

getSource

public Object getSource()
Returns the object which generated this event object.
Returns:
Object - the Java object that generated this event.

toString

public String toString()
Returns a string representation of this event object for tracing purposes.
Overrides:
toString in class Object
Returns:
String - a string representation of the key elements of this event object.