com.ibm.broker.connector

Class Event

  • java.lang.Object
    • com.ibm.broker.connector.Event


  • public abstract class Event
    extends java.lang.Object
    Event is the base class which must be extended to implement the receiving of an event from the system.

    The connector writer implements and constructs event objects, which are delivered to IBM Integration Bus for processing by calling the deliverEvents method on the EventInputConnector.

    IBM Integration Bus makes call backs to the Event object during the processing of the Event as follows:

    • logEvent is called when the event is about to be processed and needs to be logged to activity trace.
    • buildInputRecord is called when the record representing the Event is required. The record is used to construct the message that is processed in the message flow.
    • buildProperties is called when extra details about the event are required which are not part of the data. These details are written out to the local environment.
    • confirm is called if the processing of the event was successful.
    • markAsFailed is called if the processing of the event failed.

    The connector writer constructs Event objects which are delivered to IBM Integration Bus by calling the deliverEvents method.

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String copyright 
    • Constructor Summary

      Constructors 
      Constructor and Description
      Event() 
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      abstract InputRecord buildInputRecord()
      This is called by the integration node when the record representing the Event is required.
      java.util.Properties buildProperties()
      This is called by the integration node when the additional information on found in the record is required.
      void confirm()
      This is called by the integration node if the processing of the event completes with out error.
      java.lang.String eventSource()
      This is called by the the integration node after an event is received.
      EventInputConnector getConnector() 
      void logEvent()
      This is called by the integration node after send to allow the connector writer to do there own logging.
      void markAsFailed()
      This is called by the integration node if the processing of the event fails with an error.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Event

        public Event()
              throws com.ibm.broker.plugin.MbException
        Throws:
        com.ibm.broker.plugin.MbException
    • Method Detail

      • buildInputRecord

        public abstract InputRecord buildInputRecord()
                                              throws com.ibm.broker.plugin.MbException
        This is called by the integration node when the record representing the Event is required. The record is used to construct the message that is processed in the message flow. If a MbException is thrown then the processing of the event will fail.
        Throws:
        com.ibm.broker.plugin.MbException
      • buildProperties

        public java.util.Properties buildProperties()
                                             throws com.ibm.broker.plugin.MbException
        This is called by the integration node when the additional information on found in the record is required. The returned properties is used to construct the local environment part of the message. If a MbException is thrown then the processing of the event will fail.
        Throws:
        com.ibm.broker.plugin.MbException
      • confirm

        public void confirm()
                     throws com.ibm.broker.plugin.MbException
        This is called by the integration node if the processing of the event completes with out error. If a MbException is thrown then the error is written to the system log and the event is discarded.
        Throws:
        com.ibm.broker.plugin.MbException
      • markAsFailed

        public void markAsFailed()
                          throws com.ibm.broker.plugin.MbException
        This is called by the integration node if the processing of the event fails with an error. If a MbException is thrown then the error is written to the system log and the event is discarded.
        Throws:
        com.ibm.broker.plugin.MbException
      • eventSource

        public java.lang.String eventSource()
                                     throws com.ibm.broker.plugin.MbException
        This is called by the the integration node after an event is received. The information is used in log entries to tell the end user where the event originated from. If it is not overridden then the connector key is used. Throwing an exception will cause an entry to be written to the system log and the event to be discarded.
        Throws:
        com.ibm.broker.plugin.MbException
      • logEvent

        public void logEvent()
                      throws com.ibm.broker.plugin.MbException
        This is called by the integration node after send to allow the connector writer to do there own logging. If it is not overridden then a standard activity log message is written using the details given in sentDestination. Throwing an exception will cause the message flow node to throw an exception for the messaging being currently processed.
        Throws:
        com.ibm.broker.plugin.MbException
      • getConnector

        public final EventInputConnector getConnector()
                                               throws com.ibm.broker.plugin.MbException
        Throws:
        com.ibm.broker.plugin.MbException
IBM Integration BusTM
JavaTM Connector API