com.ibm.commerce.event

Interface EventPublisher

  • All Known Implementing Classes:
    DefaultEventPublisher, ECEventPublisherImpl, PaymentEventPublisherCmdImpl


    public interface EventPublisher
    This interface defines how to publish CommonBaseEvent objects based on a specific extension name. The event publisher will be assigned to specific CommonBaseEvent objects and will publish the event to the appropriate event bus. To differentiate how different events are published, a separate EventPublisher will be defined for specific events.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Method Summary

      All Methods Instance Methods Abstract 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 a CommonBaseEvent object to the event bus.
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Method Detail

      • publishEvent

        void publishEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent commonBaseEvent)
        This method publishes a CommonBaseEvent object to the event bus. Publishing an event does not have to be unique for specific events. A group of events can use the same EventPublisher to publish to the event queue. The publish operation will release the event so it can be used by the consumers who subscribe to the event.
        Parameters:
        commonBaseEvent - This is a CommonBaseEvent object to publish.
      • changePriority

        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.
        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 be EventService.PRIORITY_HIGH, EventService.PRIORITY_MEDIUM or EventService.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 an exception and it will be exposed when this change occurs.