Container for session subscriptions within abstract service or external service adapter.
More...
#include <subscription_container.hpp>
|
| bool | addSubscription (const string &identifier, SessionType session) |
| | Add subscription to the given session for this service.
|
| |
| vector< SessionType > | findSubscribers (const string &identifier) |
| | Find all subscribers for the given identifier.
|
| |
| bool | hasSubscriptions (const string &identifier) |
| | Check if the given identifier has any subscriptions.
|
| |
| vector< string > | removeSubscriptions (SessionType session, const string &identifier) |
| | Remove subscription to the given session for this service.
|
| |
| | SubscriptionContainer ()=default |
| | ctor
|
| |
| | ~SubscriptionContainer ()=default |
| | dtor
|
| |
template<typename SessionType>
class kanzi::connect::SubscriptionContainer< SessionType >
Container for session subscriptions within abstract service or external service adapter.
- Template Parameters
-
| SessionType | The session object type which class uses for sessions |
- See also
- kanzi::connect::AbstractService
-
kanzi::connect::ExternalServiceAdapter
◆ SubscriptionContainer()
template<typename SessionType >
◆ ~SubscriptionContainer()
template<typename SessionType >
◆ addSubscription()
template<typename SessionType >
Add subscription to the given session for this service.
- Parameters
-
| identifier | Identifies the subscription, what this means is implementation specific |
| session | The session to subscribe |
- Returns
- True if the subscription was added, double subscription is not accepted
◆ findSubscribers()
template<typename SessionType >
Find all subscribers for the given identifier.
- Parameters
-
| identifier | Identifies the subscriptions, what this means is implementation specific |
- Returns
- vector listing all subscribers
◆ hasSubscriptions()
template<typename SessionType >
Check if the given identifier has any subscriptions.
- Parameters
-
| identifier | The identifier to check, what this means is implementation specific |
- Returns
- True if at least one subscriber is found
◆ removeSubscriptions()
template<typename SessionType >
Remove subscription to the given session for this service.
- Parameters
-
| session | The session whose subscriptions are to be removed |
| identifier | The subscriptions to remove, if empty all subscriptions for the session are removed |
- Returns
- vector containing identifiers that no longer have any subscriptions left after this call
The documentation for this class was generated from the following file:
- connect/interface/subscription_container.hpp