com.ibm.commerce.event.impl
Class ECEventPublisherImpl
- java.lang.Object
-
- com.ibm.commerce.event.impl.ECEventPublisherImpl
-
- All Implemented Interfaces:
- EventPublisher
- Direct Known Subclasses:
- PaymentEventPublisherCmdImpl
public class ECEventPublisherImpl extends java.lang.Object implements EventPublisher
This class defines an event publisher that will serialize theCommonBaseEvent
object into the XML representation and persist the XML document into a local database table.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
COPYRIGHT
IBM copyright notice field.
-
Constructor Summary
Constructors Constructor and Description ECEventPublisherImpl()
This is the default constructor for this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
changePriority(java.lang.String eventName, java.lang.String eventKey, short priority)
This method changes the priority of the event that matches the event key that uniquely identifies the event.void
publishEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent commonBaseEvent)
This method publishes the event based on the priority specified in the event.
-
-
-
Field Detail
-
COPYRIGHT
public static final java.lang.String COPYRIGHT
IBM copyright notice field.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ECEventPublisherImpl
public ECEventPublisherImpl()
This is the default constructor for this class. It calls the constructor from the superclass.
-
-
Method Detail
-
publishEvent
public void publishEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent commonBaseEvent)
This method publishes the event based on the priority specified in the event. If the event priority is high then the event will be processed immediately. If the event is of medium priority then it will be processed asynchronously but immediately. An event of low priority will be persisted to the event queue and will be processed some time in the future.- Specified by:
publishEvent
in interfaceEventPublisher
- Parameters:
commonBaseEvent
- This is the common base event.- See Also:
EventPublisher.publishEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent)
-
changePriority
public void changePriority(java.lang.String eventName, java.lang.String eventKey, short priority) throws java.lang.Exception
This method changes the priority of the event that matches the event key that uniquely identifies the event. The appropriate event publisher will be resolved and used to change the priority of the event. This could result in immediate processing of the event depending on the specified priority.- Specified by:
changePriority
in interfaceEventPublisher
- Parameters:
eventName
- This is the name of the event to raise.eventKey
- This is an identifier of a maximum of 50 characters which can uniquely identify the event.priority
- This is the new priority of the event. The priority value should either beEventService.PRIORITY_HIGH
,
EventService.PRIORITY_MEDIUM
orEventService.PRIORITY_LOW
.- Throws:
java.lang.Exception
- This is thrown when any exception occurs while changing the event priority. For those cases where the event immediately executes, the listener may throw and exception and it will be exposed when this change occurs.
-
-