|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.esper.core.EPRuntimeImpl
public class EPRuntimeImpl
Implements runtime interface. Also accepts timer callbacks for synchronizing time events with regular events sent in.
Constructor Summary | |
---|---|
EPRuntimeImpl(EPServicesContext services)
Constructor. |
Method Summary | |
---|---|
void |
addEmittedListener(EmittedListener listener,
String channel)
Register an object that listens for events emitted from the event stream processing runtime on the specified channel. |
void |
clearEmittedListeners()
Deregister all emitted event listeners. |
void |
emit(Object object)
Emit an event object to any registered EmittedListener instances listening to the default channel. |
void |
emit(Object object,
String channel)
Emit an event object to any registered EmittedListener instances on the specified channel. |
int |
getNumEventsEmitted()
Number of events emitted over the lifetime of the event stream processing runtime. |
int |
getNumEventsReceived()
Number of events received over the lifetime of the event stream processing runtime. |
void |
route(EventBean event)
Route the event such that the event is processed as required. |
void |
route(Object event)
Route the event object back to the event stream processing runtime for internal dispatching. |
void |
sendEvent(Map map,
String eventTypeAlias)
Send a map containing event property values to the event stream processing runtime. |
void |
sendEvent(Node document)
Send an event represented by a DOM node to the event stream processing runtime. |
void |
sendEvent(Object event)
Send an event represented by a plain Java object to the event stream processing runtime. |
void |
timerCallback()
Invoked by the internal clocking service at regular intervals. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EPRuntimeImpl(EPServicesContext services)
services
- - references to servicesMethod Detail |
---|
public void sendEvent(Object event) throws EPException
EPRuntime
Use the route method for sending events into the runtime from within UpdateListener code.
sendEvent
in interface EPRuntime
event
- is the event to sent to the runtime
EPException
- is thrown when the processing of the event lead to an errorpublic void sendEvent(Node document) throws EPException
EPRuntime
Use the route method for sending events into the runtime from within UpdateListener code.
sendEvent
in interface EPRuntime
document
- is the DOM node as an event
EPException
- is thrown when the processing of the event lead to an errorpublic void sendEvent(Map map, String eventTypeAlias) throws EPException
EPRuntime
Use the route method for sending events into the runtime from within UpdateListener code.
sendEvent
in interface EPRuntime
map
- - map that contains event property values. Keys are expected to be of type String while values
can be of any type. Keys and values should match those declared via Configuration for the given eventTypeAlias.eventTypeAlias
- - the alias for the (property name, property type) information for this map
EPException
- - when the processing of the event leads to an errorpublic int getNumEventsReceived()
EPRuntime
getNumEventsReceived
in interface EPRuntime
public int getNumEventsEmitted()
EPRuntime
getNumEventsEmitted
in interface EPRuntime
public void route(Object event)
EPRuntime
route
in interface EPRuntime
event
- to route internally for processing by the event stream processing runtimepublic void route(EventBean event)
InternalEventRouter
route
in interface InternalEventRouter
event
- to routepublic void emit(Object object)
EPRuntime
emit
in interface EPRuntime
object
- to be emitted to the default channelpublic void emit(Object object, String channel)
EPRuntime
emit
in interface EPRuntime
object
- to be emittedchannel
- channel to emit the object to, or null if emitting to the default channelpublic void addEmittedListener(EmittedListener listener, String channel)
EPRuntime
addEmittedListener
in interface EPRuntime
listener
- called when an event is emitted by the runtime.channel
- is the channel to add the listener to, a null value can be used to listen to events emitted
on all channelspublic void clearEmittedListeners()
EPRuntime
clearEmittedListeners
in interface EPRuntime
public void timerCallback()
TimerCallback
timerCallback
in interface TimerCallback
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |