AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.3.4.4
AMPS::SubscriptionManager Class Referenceabstract

Abstract base class to manage all subscriptions placed on a client so that they can be re-established if the client is disconnected and then reconnected. More...

#include <ampsplusplus.hpp>

+ Inheritance diagram for AMPS::SubscriptionManager:

Public Member Functions

virtual void subscribe (MessageHandler messageHandler_, const Message &message_, unsigned requestedAckTypes_)=0
 Called by Client when a subscription is placed. More...
 
virtual void unsubscribe (const Message::Field &subId_)=0
 Called by Client when a subscription is unsubscribed. More...
 
virtual void clear ()=0
 Clear subscriptions and reset to the initial state.
 
virtual void resubscribe (Client &client_)=0
 Called by Client to get all subscriptions placed again. More...
 
virtual void setFailedResubscribeHandler (std::shared_ptr< FailedResubscribeHandler > handler_)
 Set a handler to deal with failing subscriptions after a failover event. More...
 

Detailed Description

Abstract base class to manage all subscriptions placed on a client so that they can be re-established if the client is disconnected and then reconnected.

Member Function Documentation

virtual void AMPS::SubscriptionManager::resubscribe ( Client client_)
pure virtual

Called by Client to get all subscriptions placed again.

Parameters
client_The Client on which to place all subscriptions.

Implemented in AMPS::MemorySubscriptionManager.

virtual void AMPS::SubscriptionManager::setFailedResubscribeHandler ( std::shared_ptr< FailedResubscribeHandler handler_)
inlinevirtual

Set a handler to deal with failing subscriptions after a failover event.

Parameters
handler_The handler on which to call failure.
virtual void AMPS::SubscriptionManager::subscribe ( MessageHandler  messageHandler_,
const Message message_,
unsigned  requestedAckTypes_ 
)
pure virtual

Called by Client when a subscription is placed.

Not all parameters are appropriate for all subscriptions, so the operation type determines which ones are required and/or useful.

Parameters
messageHandler_The MessageHandler for the subscription.
message_The Message containing the subscription to reissue.
requestedAckTypes_The ack types requested for the handler.

Implemented in AMPS::MemorySubscriptionManager.

virtual void AMPS::SubscriptionManager::unsubscribe ( const Message::Field subId_)
pure virtual

Called by Client when a subscription is unsubscribed.

Parameters
subId_The identifier of the subscription being unsubscribed.

Implemented in AMPS::MemorySubscriptionManager.


The documentation for this class was generated from the following file: