public class EventSenderBean extends Object implements EventSender
Allows sending only event objects of the underlying type matching the event type, or implementing the interface or extending the type. Any other event object generates an error.
Constructor and Description |
---|
EventSenderBean(EPRuntimeEventSender runtime,
BeanEventType beanEventType,
EventAdapterService eventAdapterService,
ThreadingService threadingService)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
route(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.
|
public EventSenderBean(EPRuntimeEventSender runtime, BeanEventType beanEventType, EventAdapterService eventAdapterService, ThreadingService threadingService)
runtime
- for processing eventsbeanEventType
- the event typeeventAdapterService
- factory for event beans and event typesthreadingService
- for inbound threadingpublic void sendEvent(Object theEvent)
EventSender
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.
sendEvent
in interface EventSender
theEvent
- to processpublic void route(Object theEvent) throws EPException
EventSender
route
in interface EventSender
theEvent
- to processEPException
- is thrown when the processing of the event lead to an error