Apama 10.7.2 | Developing Apama Applications | Developing Apama Applications in EPL | Defining Event Listeners | How the correlator executes event listeners | When the correlator terminates event listeners
 
When the correlator terminates event listeners
The correlator terminates event listeners in the following situations:
*The event listener's event expression evaluates to true, and does not specify the all keyword. The correlator executes the specified action. Since the single defined match was found, the correlator terminates the event listener.
*The correlator recognizes that an event listener's event expression can never evaluate to true. For example:
on ( A() -> B() ) and not C()
The event listener starts by seeking both A() -> B() and not C() concurrently. If an event matching C is received before one matching B, the C clause evaluates to true, and hence not C becomes false. This means that (A() -> B()) and not C() can never evaluate to true, and hence this event listener will never trigger its action. The correlator terminates these zombie event listeners periodically.
*You obtain a handle to an event listener and call the quit() method on that event listener. See Terminating and changing event listeners.