com.tibco.be.custom.channel

## Interface EventContext

- All Known Implementing Classes:
    DefaultEventContext

      public interface EventContext

  Represents the context in which a message that was received from a `Channel` which leads to the creation of an `Event`. Allows BusinessEvents to acknowledge and/or to reply to the message using the underlying transport(Destination) of the associated `Channel`.
  Since:
    5.4
  See Also:
    `BaseDestination.getEventContext(Event)`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `acknowledge()` Acknowledges the message that was deserialized into the event associated to this `EventContext`.
    `BaseDestination` | `getDestination()` Gets the `Destination` which received the message that was deserialized into the event associated to this `EventContext`.
    `java.lang.Object` | `getMessage()` Gets the message that was deserialized into the event associated to this `EventContext`.
    `boolean` | `reply(Event replyEvent)` Replies with the given `Event` to the message that was deserialized into the event associated to this `EventContext`.
    `void` | `rollback()` Rolls back the message that was deserialized into the event associated to this `EventContext`.

- - ### Method Detail

    - #### reply

          boolean reply(Event replyEvent)

      Replies with the given `Event` to the message that was deserialized into the event associated to this `EventContext`.
      Parameters:
        `replyEvent` - reply event
      Returns:
        true if successful
      Since:
        5.4

    - #### acknowledge

          void acknowledge()

      Acknowledges the message that was deserialized into the event associated to this `EventContext`. Also called when an Event is consumed.
      Since:
        5.4

    - #### rollback

          void rollback()

      Rolls back the message that was deserialized into the event associated to this `EventContext`.
      Since:
        5.4

    - #### getDestination

          BaseDestination getDestination()

      Gets the `Destination` which received the message that was deserialized into the event associated to this `EventContext`.
      Returns:
        the `Destination` which received the event corresponding to this `EventContext`.
      Since:
        5.4

    - #### getMessage

          java.lang.Object getMessage()

      Gets the message that was deserialized into the event associated to this `EventContext`.
      Returns:
        the message that was deserialized into the event associated to this `EventContext`.
      Since:
        5.4