|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.etill.framework.eventmgr.PSEvent | +--com.ibm.etill.framework.eventmgr.CassetteEvent
CassetteEvent allows cassettes to define and generate their own external events. This class can be used as-is, without being extended.
Note that cassettes should only generate CassetteEvent event objects - they should never generate events that are defined by the Framework.
Events are external asynchronous notifications of a change that has occurred within Commerce Payments or one of its cassettes. To generate an event, the cassette must:
setCassetteData
method
CommitPoint
through that object's addEventToList
method
CommitPoint
object's
commit
method.
commit
call executes, the CommitPoint
passes all of the events on its event list to the Framework's
Event Notification service for delivery to the appropriate event
listeners.
Here is an example of the code to perform these steps:
// create cassetteEvent object
CassetteEvent ce = new CassetteEvent(this, cassetteName, merchantNumber);
// Create a hashtable and load it with our event data
Hashtable cassetteHashtable = new Hashtable();
cassetteHashtable.put("csKeyword1", "csValue1");
cassetteHashtable.put("csKeyword2", "csValue2");
// Referenct hashtable from the event object
ce.setCassetteData(cassetteHashtable);
...
// Commit this object to the database and send our event to registered
// event listeners
Supervisor.getThreadCommitPoint().commit();
CommitPoint.addToEventList(com.ibm.etill.framework.eventmgr.PSEvent)
,
Supervisor.getThreadCommitPoint()
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 | |
---|---|
CassetteEvent(Object source,
String cName,
String merNumber)
Constructs a CassetteEvent object with the input object for the specified cassette and merchant. |
Method Summary | |
---|---|
Hashtable |
getCassetteData()
Returns the cassette-specifc keyword/value pairs for this event object. |
String |
getCassetteName()
Returns the name of the cassette with which this event is associated. |
String |
getMerchantNumber()
Returns the merchant number of the merchant with which this event is associated. |
void |
setCassetteData(Hashtable cData)
Assigns a set of cassette-specific parameters to this event object. |
String |
toString()
Returns a string representation of this event object for tracing purposes. |
Methods inherited from class com.ibm.etill.framework.eventmgr.PSEvent |
---|
getEventType, getSource, getTimestamp, getTimestampAsString, setEventType |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CassetteEvent(Object source, String cName, String merNumber)
source
- the Java object that generated this event.cName
- a String containing the configured name of the cassette
that is generating the event.merNumber
- a String containing the merchant number associated with this
event.Method Detail |
public void setCassetteData(Hashtable cData)
public String getMerchantNumber()
public String getCassetteName()
public Hashtable getCassetteData()
setCassetteData
method.public String toString()
toString
in class PSEvent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |