Developing Apama Applications > Apama EPL Reference > Types > Reference types > listener
listener
A handle to a listener.
Usage
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.
The following method may be called on variables of listener type.
ListenerMethods
*quit() – causes the listener to terminate immediately.
If the listener is invalid or has already been quit, then the quit() method does nothing and does not raise an error.
The quit() method takes no parameters and does not return a result.
Copyright © 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.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.