<Default Package>
Type listener


A reference to an EPL listener or stream listener.

A listener variable can be instantiated only by assigning to it the outcome of an on statement, a from statement, or by assigning to it the value of another listener variable. Values of listener type are references to listener objects created with the on statement or from statement. The main use of listener variables is, in combination with the listener type's inbuilt quit method, to terminate an active listener when it is no longer needed.

An event can contain a field of type listener, however you cannot send, emit, route, or enqueue an event that has a listener type field. Also, you cannot specify an event with a listener field in an event template.

An empty listener cannot be used in any meaningful way. To use this variable, you must assign a listener to it from within an on statement, from another listener variable, or from a stream listener in a from statement.

Listeners are not comparable or parseable.
Action summary
 booleanempty()

Check whether this listener contains an object (this is a legacy alias for the isEmpty() method).
 booleanisEmpty()

Check whether this listener contains an object.
 voidquit()

Quit the listener.
 stringtoString()

Convert a listener to a string.
 
Action detail

empty

boolean empty()
Check whether this listener contains an object (this is a legacy alias for the isEmpty() method).
Returns:
True if no object contained, False if otherwise
Since:
10.3
See Also:
listener.isEmpty() - The recommended way to call this.

isEmpty

boolean isEmpty()
Check whether this listener contains an object.
Returns:
True if no object contained, False if otherwise
Since:
10.15.4.0

quit

void quit()
Quit the listener.

Causes the referenced listener to terminate and cease receiving events. This method is idempotent and silently does nothing if the listener has already been quit, self-terminated or is uninitialized.

toString

string toString()
Convert a listener to a string.
Returns:
The string "listener".