Class EventSenderJsonImpl
java.lang.Object
com.espertech.esper.common.internal.event.json.compiletime.EventSenderJsonImpl
- All Implemented Interfaces:
EventSender
,EventSenderJson
Event sender for json-backed events.
Allows sending only event objects of type string, does not check contents. Any other event object generates an error.
-
Constructor Summary
ConstructorDescriptionEventSenderJsonImpl
(EPRuntimeEventProcessWrapped runtimeEventSender, JsonEventType eventType, EventBeanTypedEventFactory eventBeanTypedEventFactory, ThreadingCommon threadingService) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
Processes the event object.
-
Constructor Details
-
EventSenderJsonImpl
public EventSenderJsonImpl(EPRuntimeEventProcessWrapped runtimeEventSender, JsonEventType eventType, EventBeanTypedEventFactory eventBeanTypedEventFactory, ThreadingCommon threadingService) Ctor.- Parameters:
runtimeEventSender
- for processing eventseventType
- the event typethreadingService
- for inbound threadingeventBeanTypedEventFactory
- for event bean creation
-
-
Method Details
-
sendEvent
Description copied from interface:EventSender
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.
- Specified by:
sendEvent
in interfaceEventSender
- Parameters:
theEvent
- to process
-
routeEvent
Description copied from interface:EventSender
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.- Specified by:
routeEvent
in interfaceEventSender
- Parameters:
theEvent
- to process
-
parse
- Specified by:
parse
in interfaceEventSenderJson
- Parameters:
json
- to parse- Returns:
- event object
-