Apama Documentation : Developing Apama Applications : EPL Reference : Types : monitor pseudo-type
monitor pseudo-type
The use of the monitor keyword as a pseudo-type is limited to invocation of the subscribe() and unsubscribe() methods.
Usage
Use the following formats:
monitor.subscribe(channel_name);
monitor.unsubscribe(channel_name);
Replace channel_name with a string expression that resolves to the name of the channel you want to subscribe to or unsubscribe from. In a monitor instance, call these methods from inside an action.
It is not possible to use instances of the monitor type. For example, there cannot be variables or event members of type monitor. You cannot specify a com.apama.Channel object as the argument to subscribe() or unsubscribe() method.
Methods
*subscribe() — Subscribes the calling context to the specified channel. All listeners in the same context as the calling monitor instance can process events sent to the specified channel. The calling monitor instance owns the subscription. If the calling monitor instance terminates the subscription ends.
Multiple monitor instances in the same context can subscribe to the same channel. Each event is delivered once as long as any of the subscriptions are active. An event is not delivered once for each subscription.
*unsubscribe() — Unsubscribes the calling context from the specified channel. If this was the only subscription in the context to the specified channel then the context no longer processes events sent to the unsubscribed channel.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback