Interface EventSender

All Known Subinterfaces:
EventSenderJson

public interface EventSender
Returns a facility to process event objects that are of a known type.

Obtained via the method EPRuntime#getEventSender(String) the sender is specific to a given event type and may not process event objects of any other event type; See the method documentation for more details.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    routeEvent(Object theEvent)
    Route the event object back to the event stream processing runtime for internal dispatching, to avoid the possibility of a stack overflow due to nested calls to sendEvent.
    void
    sendEvent(Object theEvent)
    Processes the event object.
  • Method Details

    • sendEvent

      void sendEvent(Object theEvent) throws EPException
      Processes the event object.

      Use the route method for sending events into the runtime from within UpdateListener code. to avoid the possibility of a stack overflow due to nested calls to sendEvent.

      Parameters:
      theEvent - to process
      Throws:
      EPException - if a runtime error occured.
    • routeEvent

      void routeEvent(Object theEvent) throws EPException
      Route the event object back to the event stream processing runtime for internal dispatching, to avoid the possibility of a stack overflow due to nested calls to sendEvent. The route event is processed just like it was sent to the runtime, that is any active expressions seeking that event receive it. The routed event has priority over other events sent to the runtime. In a single-threaded application the routed event is processed before the next event is sent to the runtime through the EPRuntime.sendEvent method.
      Parameters:
      theEvent - to process
      Throws:
      EPException - is thrown when the processing of the event lead to an error