Parameter | Description |
handler | Required. The handler object which will process delivery of the events. |
channel | Required. The initial channel to subscribe to. |
mode | Optional. If set to STRING_MODE, then events are delivered in Apama string form. If set to MAP_MODE (default), events are delivered in map_t form (see Sending events). |
blocking | If set to true, then this handler may block the thread. If set to false, the handler will never block (see Blocking behavior of plug-ins). |
Parameter | Description |
type | The name of the type of the event. |
event | The event itself. The data_t contains a const char * if the handler was subscribed in STRING_MODE or a map_t if it was subscribed in MAP_MODE. You are given ownership of the event so you can move it for further processing without taking a copy. |
channel | The channel on which this event was delivered. |
Method | Description |
void addChannel(const char *channel) | Subscribe to an additional channel. |
bool removeChannel(const char *channel) | Unsubscribe from the channel, if subscribed to it. If this reduces the subscription count to 0, then it destroys the handler. Returns true if the handler was destroyed. |
void removeAllChannels() | Remove all subscriptions and destroy the handler. |