IConsumerOperations is an interface that specifies the standard operations to enable a client to receive events on specific channels from a remote Correlator.
More...
|
ReadOnlyCollection< string > | Channels [get] |
| Get the list of channel names to which this consumer is subscribed. More...
|
|
bool | ConsumerConnected [get] |
| Determine if this consumer is really connected to the remote Correlator. (This is a read-only property.) More...
|
|
string | Name [get] |
| Get the name of this consumer. (This is a read-only property.) More...
|
|
|
HandleEventCallback | EventReceived |
| Notifies subscribers when an Apama event is received on any of the channels on which this consumer is listening. More...
|
|
IConsumerOperations is an interface that specifies the standard operations to enable a client to receive events on specific channels from a remote Correlator.
See Apama.Engine.Client.EngineClientConstants for constants used by this interface.
void Apama.Engine.Client.IConsumerOperations.AddEventListener |
( |
IEventListener |
listener | ) |
|
Add an old-style IEventListener (see also EventReceived).
Threading note: unless this was created as an asynchronous consumer, it is essential that the specified event listener does not lock the consumer or client, and does not call any methods on the consumer or client, to avoid the possibility of deadlock. If the handler does need to call methods on the client (e.g. to send events) then an asynchronous named consumer must be used instead.
Note that only the plural HandleEvents(Event[]) method of the listener will be called. Clients should consider subscribing to the EventReceived .NET event member for a simpler interface to handle received events.
- Parameters
-
listener | the listener to be added. |
void Apama.Engine.Client.IConsumerOperations.AddPropertyChangeListener |
( |
PropertyChangedEventHandler |
listener | ) |
|
Add a property change listener. Use this method to be informed whenever the a property value is changed.
Since Apama 5.2, listeners registered with this method will be called back asynchronously on a dedicated thread, which means it is permissible to call any engine client method from the listener - though be aware that the property value could have changed since the property change notification was fired, so may be different to the specified 'new value'. Applications that need the previous synchronous notification behaviour can use AddPropertyChangeListenerSync to help with migration.
- Parameters
-
listener | the listener to be added. |
void Apama.Engine.Client.IConsumerOperations.AddPropertyChangeListener |
( |
string |
propertyName, |
|
|
PropertyChangedEventHandler |
listener |
|
) |
| |
Add a property change listener for a specific named property.
Since Apama 5.2, listeners registered with this method will be called back asynchronously on a dedicated thread, which means it is permissible to call any engine client method from the listener - though be aware that the property value could have changed since the property change notification was fired, so may be different to the specified 'new value'. Applications that need the previous synchronous notification behaviour can use AddPropertyChangeListenerSync to help with migration.
- Parameters
-
propertyName | the name of the property to listen on. |
listener | the listener to be added. |
void Apama.Engine.Client.IConsumerOperations.AddPropertyChangeListenerSync |
( |
PropertyChangedEventHandler |
listener | ) |
|
Add a property change listener. Use this method to be informed whenever the a property value is changed.
Deprecated - The synchronous property change listener methods are a temporary migration aid only, and will be removed in a future release. Use AddPropertyChangeListener() instead.
This method is deprecated and applications should use AddPropertyChangeListener() instead wherever possible, however this method is provided to simplify migration from pre-5.2 Apama releases which provided synchronous listener behaviour by default. To avoid the possibility of deadlock, it is essential that listeners registered using this method do not attempt to make calls back into the engine client (or any other service that uses it).
- Parameters
-
listener | the listener to be added. |
void Apama.Engine.Client.IConsumerOperations.AddPropertyChangeListenerSync |
( |
string |
propertyName, |
|
|
PropertyChangedEventHandler |
listener |
|
) |
| |
Add a property change listener for a specific named property.
Deprecated - The synchronous property change listener methods are a temporary migration aid only, and will be removed in a future release. Use AddPropertyChangeListener() instead.
This method is deprecated and applications should use AddPropertyChangeListener() instead wherever possible, however this method is provided to simplify migration from pre-5.2 Apama releases which provided synchronous listener behaviour by default. To avoid the possibility of deadlock, it is essential that listeners registered using this method do not attempt to make calls back into the engine client (or any other service that uses it).
- Parameters
-
propertyName | the name of the property to listen on. |
listener | the listener to be added. |
IEventListener [] Apama.Engine.Client.IConsumerOperations.GetEventListeners |
( |
| ) |
|
Get a list of subscribed listeners (as an array).
There is rarely any reason to call this method and it may be removed in a future release.
- Returns
- the list of event listeners.
void Apama.Engine.Client.IConsumerOperations.RemoveAllEventListeners |
( |
| ) |
|
Remove all IEventListeners and EventReceived subscribers that are listening to this consumer.
void Apama.Engine.Client.IConsumerOperations.RemoveEventListener |
( |
IEventListener |
listener | ) |
|
Remove a previously added old-style IEventListener.
- Parameters
-
listener | the listener to be removed. |
void Apama.Engine.Client.IConsumerOperations.RemovePropertyChangeListener |
( |
PropertyChangedEventHandler |
listener | ) |
|
Remove a property change listener.
- Parameters
-
listener | the listener to be removed. |
void Apama.Engine.Client.IConsumerOperations.RemovePropertyChangeListener |
( |
string |
propertyName, |
|
|
PropertyChangedEventHandler |
listener |
|
) |
| |
Remove a property change listener for a specific named property.
- Parameters
-
propertyName | the name of the property that was listened on. |
listener | the listener to be removed. |
void Apama.Engine.Client.IConsumerOperations.RemovePropertyChangeListenerSync |
( |
PropertyChangedEventHandler |
listener | ) |
|
Remove a property change listener registered with AddPropertyChangeListenerSync().
Deprecated - The synchronous property change listener methods are a temporary migration aid only, and will be removed in a future release. Use RemovePropertyChangeListener() instead.
- Parameters
-
listener | the listener to be removed. |
void Apama.Engine.Client.IConsumerOperations.RemovePropertyChangeListenerSync |
( |
string |
propertyName, |
|
|
PropertyChangedEventHandler |
listener |
|
) |
| |
Remove a property change listener for a specific named property registered with AddPropertyChangeListenerSync().
Deprecated - The synchronous property change listener methods are a temporary migration aid only, and will be removed in a future release. Use RemovePropertyChangeListener() instead.
- Parameters
-
propertyName | the name of the property that was listened on. |
listener | the listener to be removed. |
void Apama.Engine.Client.IConsumerOperations.SetChannels |
( |
params string[] |
newChannels | ) |
|
Set the list of channel names to which this consumer is subscribed.
The array of channels to which to subscribe. Must be non-null, and contain no null elements.
- Parameters
-
newChannels | An array of string representing the channels to listen on |
- Exceptions
-
ReadOnlyCollection<string> Apama.Engine.Client.IConsumerOperations.Channels |
|
get |
Get the list of channel names to which this consumer is subscribed.
- Returns
- the list of channels.
bool Apama.Engine.Client.IConsumerOperations.ConsumerConnected |
|
get |
Determine if this consumer is really connected to the remote Correlator. (This is a read-only property.)
- Returns
- true if connected, false otherwise.
string Apama.Engine.Client.IConsumerOperations.Name |
|
get |
Get the name of this consumer. (This is a read-only property.)
- Returns
- the name of this consumer.
HandleEventCallback Apama.Engine.Client.IConsumerOperations.EventReceived |
Notifies subscribers when an Apama event is received on any of the channels on which this consumer is listening.
Threading note: unless this was created as an asynchronous consumer, it is essential that subscribed callbacks do not lock the consumer or client, and do not call any methods on the consumer or client, to avoid the possibility of deadlock. If the handler does need to call methods on the client (e.g. to send events) then an asynchronous named consumer must be used instead.