|
client-cpp
0.10.0
|
#include <NotificationManager.hpp>
Inheritance diagram for kaa::NotificationManager:
Collaboration diagram for kaa::NotificationManager:Public Member Functions | |
| NotificationManager (IKaaClientContext &context) | |
| virtual void | addTopicListListener (INotificationTopicListListener &listener) |
| Adds the listener which receives updates on the list of available topics. More... | |
| virtual void | removeTopicListListener (INotificationTopicListListener &listener) |
| Removes listener which receives updates on the list of available topics. More... | |
| virtual Topics | getTopics () |
| Retrieves the list of available topics. More... | |
| virtual void | addNotificationListener (INotificationListener &listener) |
| Adds the listener which receives notifications on all available topics. More... | |
| virtual void | addNotificationListener (std::int64_t topidId, INotificationListener &listener) |
| Adds the listener which receives notifications on the specified topic. More... | |
| virtual void | removeNotificationListener (INotificationListener &listener) |
| Removes the listener which receives notifications on all available topics. More... | |
| virtual void | removeNotificationListener (std::int64_t topidId, INotificationListener &listener) |
| Removes the listener which receives notifications on the specified topic. More... | |
| virtual void | subscribeToTopic (std::int64_t id, bool forceSync=true) |
| Subscribes to the specified optional topic to receive notifications on that topic. More... | |
| virtual void | subscribeToTopics (const std::list< std::int64_t > &idList, bool forceSync=true) |
| Subscribes to the specified list of optional topics to receive notifications on those topics. More... | |
| virtual void | unsubscribeFromTopic (std::int64_t id, bool forceSync=true) |
| Unsubscribes from the specified optional topic to stop receiving notifications on that topic. More... | |
| virtual void | unsubscribeFromTopics (const std::list< std::int64_t > &idList, bool forceSync=true) |
| Unsubscribes from the specified list of optional topics to stop receiving notifications on those topics. More... | |
| virtual void | sync () |
| Sends subscription request(s) to the Operations server. More... | |
| virtual void | topicsListUpdated (const Topics &topics) |
| virtual void | notificationReceived (const Notifications ¬ifications) |
| void | setTransport (std::shared_ptr< NotificationTransport > transport) |
Public Member Functions inherited from kaa::INotificationManager | |
| virtual | ~INotificationManager () |
Public Member Functions inherited from kaa::INotificationProcessor | |
| virtual | ~INotificationProcessor () |
Definition at line 44 of file NotificationManager.hpp.
| kaa::NotificationManager::NotificationManager | ( | IKaaClientContext & | context | ) |
|
virtual |
Adds the listener which receives notifications on all available topics.
| [in] | listener | The listener which receives notifications. |
Implements kaa::INotificationManager.
|
virtual |
Adds the listener which receives notifications on the specified topic.
Listener(s) for optional topics may be added/removed irrespective to whether subscription is already done or not.
| [in] | topicId | The id of the topic (either mandatory or optional). |
| [in] | listener | The listener which receives notifications. |
| UnavailableTopicException | Throws if the unknown topic id is provided. |
Implements kaa::INotificationManager.
|
virtual |
Adds the listener which receives updates on the list of available topics.
| [in] | listener | The listener which receives updates. |
Implements kaa::INotificationManager.
|
virtual |
Retrieves the list of available topics.
Implements kaa::INotificationManager.
|
virtual |
Will be called when new topic list are received
| notifications | comprises of new notifications |
Implements kaa::INotificationProcessor.
|
virtual |
Removes the listener which receives notifications on all available topics.
| [in] | listener | The listener which receives notifications. |
Implements kaa::INotificationManager.
|
virtual |
Removes the listener which receives notifications on the specified topic.
Listener(s) for optional topics may be added/removed irrespective to whether subscription is already done or not.
| [in] | topicId | The id of topic (either mandatory or optional). |
| [in] | listener | The listener which receives notifications. |
| UnavailableTopicException | Throws if the unknown topic id is provided. |
Implements kaa::INotificationManager.
|
virtual |
Removes listener which receives updates on the list of available topics.
| [in] | listener | The listener which receives updates. |
Implements kaa::INotificationManager.
| void kaa::NotificationManager::setTransport | ( | std::shared_ptr< NotificationTransport > | transport | ) |
|
virtual |
Subscribes to the specified optional topic to receive notifications on that topic.
| [in] | topicId | The id of the optional topic. |
| [in] | forceSync | Indicates whether the subscription request should be sent immediately to the Operations server. If false , the request postpones to the explicit call of sync() or to the first call of subscribeToTopic(), subscribeToTopics(), unsubscribeFromTopic() or unsubscribeFromTopics() with the true value for the forceSync parameter. |
| UnavailableTopicException | Throws if the unknown topic id is provided or the topic isn't optional. |
Implements kaa::INotificationManager.
|
virtual |
Subscribes to the specified list of optional topics to receive notifications on those topics.
| [in] | topicIds | The list of optional topic id-s. |
| [in] | forceSync | Indicates whether the subscription request should be sent immediately to the Operations server. If false , the request postpones to the explicit call of sync() or to the first call of subscribeToTopic(), subscribeToTopics(), unsubscribeFromTopic() or unsubscribeFromTopics() with the true value for the forceSync parameter. |
| UnavailableTopicException | Throws if the unknown topic id is provided or the topic isn't optional. |
Implements kaa::INotificationManager.
|
virtual |
Sends subscription request(s) to the Operations server.
Use as a convenient way to send several subscription requests at once.
Implements kaa::INotificationManager.
|
virtual |
Will be called when new topic list are received
| topics | comprises of new topics |
Implements kaa::INotificationProcessor.
|
virtual |
Unsubscribes from the specified optional topic to stop receiving notifications on that topic.
| [in] | topicId | The id of the optional topic. |
| [in] | forceSync | Indicates whether the subscription request should be sent immediately to the Operations server or postponed. If false , the request is postponed either to the explicit call of sync() or to the first call of one of the following functions with the forceSync parameter set to true : subscribeToTopic(), subscribeToTopics(), unsubscribeFromTopic() or unsubscribeFromTopics() . |
| UnavailableTopicException | Throws if the unknown topic id is provided or the topic isn't optional. |
Implements kaa::INotificationManager.
|
virtual |
Unsubscribes from the specified list of optional topics to stop receiving notifications on those topics.
| [in] | topicId | The list of optional topic id-s. |
| [in] | forceSync | Indicates whether the subscription request should be sent immediately to the Operations server or postponed. If false , the request is postponed either to the explicit call of sync() or to the first call of one of the following functions with the forceSync parameter set to true : subscribeToTopic(), subscribeToTopics(), unsubscribeFromTopic() or unsubscribeFromTopics() . |
| UnavailableTopicException | Throws if the unknown topic id is provided or the topic isn't optional. |
Implements kaa::INotificationManager.