<Default Package>
Type monitor


Static actions available to monitors.

The monitor type provides static methods to configure the monitor instance or context they are called from. You cannot create instances of the monitor type.
Constant summary
 stringDIE_CALLED

Parameter to 'ondie' signifying 'die' statement.
 stringEPL_DELETED

Parameter to 'ondie' signifying EPL deleted form the correlator.
 stringNO_LISTENERS

Parameter to 'ondie' signifying no active listeners in the EPL.
 
Action summary
 voidstatic subscribe(string channelName)

Subscribe the calling context to the specified channel.
 voidstatic unsubscribe(string channelName)

Remove the subscription to the specified channel that this monitor instance has in the calling context.
 
Constant detail

DIE_CALLED

            string DIE_CALLED
        
Parameter to 'ondie' signifying 'die' statement.

Value that can be passed to the second parameter of an ondie action with the signature action<optional<com.apama.exceptions.Exception>, optional<string>> If called with this value, this means that the monitor instance terminated because it executed a die statement.

EPL_DELETED

            string EPL_DELETED
        
Parameter to 'ondie' signifying EPL deleted form the correlator.

Value that can be passed to the second parameter of an ondie action with the signature action<optional<com.apama.exceptions.Exception>, optional<string>> If called with this value, this means that the monitor instance terminated because engine_delete utility deleted the monitor from the correlator.

NO_LISTENERS

            string NO_LISTENERS
        
Parameter to 'ondie' signifying no active listeners in the EPL.

Value that can be passed to the second parameter of an ondie action with the signature action<optional<com.apama.exceptions.Exception>, optional<string>> If called with this value, this means that the monitor instance terminated because it finished calling onload or a listener and has no active listeners or streaming elements left.
Action detail

subscribe

            void static subscribe(string channelName)
        
Subscribe the calling context to the specified channel.

All listeners in the same context as the calling monitor instance (including in other monitor instances) will receive and 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 exactly once as long as any of the subscriptions are active. An event is not delivered once for each subscription.
Parameters:
channelName - The channel name to subscribe to.

unsubscribe

            void static unsubscribe(string channelName)
        
Remove the subscription to the specified channel that this monitor instance has in the calling context.

If this was the last monitor instance subscribed to the channel, then the context will no longer receive or process events sent to this channel.
Parameters:
channelName - The channel name to unsubscribe from.
Throws:
Throws IllegalStateException if you attempt to unsubscribe from a channel the monitor instance was not subscribed to.