com.tibco.be.custom.channel

## Class DefaultEventContext

- java.lang.Object
- - com.tibco.be.custom.channel.DefaultEventContext

- All Implemented Interfaces:
    EventContext

      public class DefaultEventContext
      extends java.lang.Object
      implements EventContext

  Default implementation for the EventContext. If user does not provide implementation for a custom EventContext , DefaultEventContext will be used.
  Since:
    5.4
  See Also:
    `BaseDestination.getEventContext(Event)`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultEventContext(Event event, BaseDestination destination)` Initializes an instance of `DefaultEventContext`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `acknowledge()` Default implementation for acknowledge.Does nothing.
    `BaseDestination` | `getDestination()` Default implementation for getDestination.Returns the associated destination.
    `java.lang.Object` | `getMessage()` Default implementation for getMessage.Does nothing/returns null.
    `boolean` | `reply(Event replyEvent)` Default implementation for reply.Does nothing.
    `void` | `rollback()` Default implementation for rollback.Does nothing.

- - ### Constructor Detail

    - #### DefaultEventContext

          public DefaultEventContext(Event event,
                                     BaseDestination destination)

      Initializes an instance of `DefaultEventContext`
      Parameters:
        `event` - Event the associated event
        `destination` - the instance of the underlying transport.

  - ### Method Detail

    - #### reply

          public boolean reply(Event replyEvent)

      Default implementation for reply.Does nothing.
      Specified by:
        `reply` in interface `EventContext`
      Parameters:
        `replyEvent` - Reply event
      Returns:
        true if successful

    - #### getDestination

          public BaseDestination getDestination()

      Default implementation for getDestination.Returns the associated destination.
      Specified by:
        `getDestination` in interface `EventContext`
      Returns:
        BaseDestination destination.

    - #### acknowledge

          public void acknowledge()

      Default implementation for acknowledge.Does nothing.
      Specified by:
        `acknowledge` in interface `EventContext`

    - #### rollback

          public void rollback()

      Default implementation for rollback.Does nothing.
      Specified by:
        `rollback` in interface `EventContext`

    - #### getMessage

          public java.lang.Object getMessage()

      Default implementation for getMessage.Does nothing/returns null.
      Specified by:
        `getMessage` in interface `EventContext`
      Returns:
        Object defaults to null.