Click or drag to resize

EPListenable Interface

Interface to add and remove update listeners.

Namespace:  com.espertech.esper.runtime.client
Assembly:  NEsper.Runtime (in NEsper.Runtime.dll) Version: 8.0.0.0
Syntax
C#
public interface EPListenable

The EPListenable type exposes the following members.

Properties
  NameDescription
Public propertyUpdateListeners
Returns any listeners that have been registered.
Top
Methods
  NameDescription
Public methodAddListener
Add a listener that observes events.
Public methodAddListenerWithReplay
Add an update listener replaying current statement results to the listener.

The listener receives current statement results as the first call to the update method of the listener, passing in the newEvents parameter the current statement results as an array of zero or more events. Subsequent calls to the update method of the listener are statement results.

Current statement results are the events returned by the iterator or safeIterator methods.

Delivery of current statement results in the first call is performed by the same thread invoking this method, while subsequent calls to the listener may deliver statement results by the same or other threads.

Note: this is a blocking call, delivery is atomic: Events occurring during iteration and delivery to the listener are guaranteed to be delivered in a separate call and not lost. The listener implementation should minimize long-running or blocking operations.

Delivery is only atomic relative to the current statement. If the same listener instance is registered with other statements it may receive other statement results simultaneously.

If a statement is not started an therefore does not have current results, the listener receives a single invocation with a null value in newEvents.

Public methodRemoveAllEventHandlers
Removes all event handlers.
Public methodRemoveAllListeners
Removes all listeners.
Public methodRemoveListener
Remove a listener that observes events.
Top
Events
  NameDescription
Public eventEvents
Occurs whenever new events are available or old events are removed.
Top
See Also