Apama 10.3 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in EPL | Defining Event Listeners
Defining Event Listeners
About event expressions and event templates
Specifying the on statement
Using a stream source template to find events of interest
Defining event expressions with one event template
Terminating and changing event listeners
Specifying multiple event listeners
Listening for events that do not match
Specifying completion event listeners
Improving performance by ignoring some fields in matching events
Defining event listeners for patterns of events
Specifying and/or/not logic in event listeners
How the correlator executes event listeners
Defining event listeners with temporal constraints
Understanding time in the correlator
Out of band connection notifications
In an EPL monitor, an on statement specifies an event expression and a listener action.
Note: Queries do not need to set up event listeners so you cannot specify an on statement in a query. The information about defining event listeners applies only to monitors.
When the correlator executes an on statement it creates an event listener. An event listener observes each event processed by the context until an event or a pattern of events matches the pattern specified in the event listener's event expression. When this happens the event listener triggers, causing the correlator to execute the listener action. At this point, depending on the form of the event expression, the event listener either terminates or continues listening for additional matching event patterns.
An event listener analyzes the event stream until one of the following happens:
*The event listener finds the pattern defined in its event expression.
*The quit() method is called on the event listener to kill it.
*The monitor that defines the event listener dies.
*The correlator determines that the event listener can never trigger.
The correlator can support large numbers of concurrent event listeners each watching for an individual pattern.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.