AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.3.4.3
AMPS::MemorySubscriptionManager Class Reference

A SubscriptionManager implementation that maintains subscriptions placed in memory so that they can be placed again after a reconnect. More...

#include <MemorySubscriptionManager.hpp>

+ Inheritance diagram for AMPS::MemorySubscriptionManager:

Public Member Functions

void subscribe (MessageHandler messageHandler_, const Message &message_, unsigned requestedAckTypes_)
 Save a subscription so it can be placed again if a disconnect occurs. More...
 
void unsubscribe (const Message::Field &subId_)
 Remove the subscription from the manager. More...
 
void clear ()
 Clear all subscriptions from the manager.
 
void _clear ()
 Clear all subscriptions from the manager.
 
void resubscribe (Client &client_)
 Place all saved subscriptions on the provided Client. More...
 
void setResubscriptionTimeout (int timeout_)
 Sets the timeout used when trying to resubscribe after disconnect. More...
 
int getResubscriptionTimeout (void)
 Gets the timeout used when trying to resubscribe after disconnect. More...
 
- Public Member Functions inherited from AMPS::SubscriptionManager
virtual void setFailedResubscribeHandler (std::shared_ptr< FailedResubscribeHandler > handler_)
 Set a handler to deal with failing subscriptions after a failover event. More...
 

Static Public Member Functions

static int setDefaultResubscriptionTimeout (int timeout_)
 Sets the default timeout used by new MemorySubscriptionManager objects when trying to resubscribe after disconnect. More...
 
static int getDefaultResubscriptionTimeout (void)
 Gets the default timeout used by new MemorySubscriptionManager objects when trying to resubscribe after disconnect. More...
 

Detailed Description

A SubscriptionManager implementation that maintains subscriptions placed in memory so that they can be placed again after a reconnect.

Member Function Documentation

static int AMPS::MemorySubscriptionManager::getDefaultResubscriptionTimeout ( void  )
inlinestatic

Gets the default timeout used by new MemorySubscriptionManager objects when trying to resubscribe after disconnect.

Returns
The timeout used in milliseconds.
int AMPS::MemorySubscriptionManager::getResubscriptionTimeout ( void  )
inline

Gets the timeout used when trying to resubscribe after disconnect.

Returns
The timeout used in milliseconds.
void AMPS::MemorySubscriptionManager::resubscribe ( Client client_)
inlinevirtual

Place all saved subscriptions on the provided Client.

Parameters
client_The Client on which to place the subscriptions.

Implements AMPS::SubscriptionManager.

static int AMPS::MemorySubscriptionManager::setDefaultResubscriptionTimeout ( int  timeout_)
inlinestatic

Sets the default timeout used by new MemorySubscriptionManager objects when trying to resubscribe after disconnect.

Parameters
timeout_The timeout to use in milliseconds.
void AMPS::MemorySubscriptionManager::setResubscriptionTimeout ( int  timeout_)
inline

Sets the timeout used when trying to resubscribe after disconnect.

Parameters
timeout_The timeout to use in milliseconds.
void AMPS::MemorySubscriptionManager::subscribe ( MessageHandler  messageHandler_,
const Message message_,
unsigned  requestedAckTypes_ 
)
inlinevirtual

Save a subscription so it can be placed again if a disconnect occurs.

Generally used only internally by Client when subscriptions are placed.

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

Implements AMPS::SubscriptionManager.

void AMPS::MemorySubscriptionManager::unsubscribe ( const Message::Field subId_)
inlinevirtual

Remove the subscription from the manager.

Parameters
subId_The subscription ID of the subscription to remove.

Implements AMPS::SubscriptionManager.


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