AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.3.0.2
AMPS::HAClient Class Reference

This class provides HA functionality to clients of AMPS. More...

#include <HAClient.hpp>

+ Inheritance diagram for AMPS::HAClient:

Public Member Functions

 HAClient ()
 Create an HAClient with no name The name for the client must be set using setName before it can be used. More...
 
 HAClient (const std::string &name_)
 Create an HAClient with the given name. More...
 
 HAClient (HAClientImpl *body_)
 Create an HAClient wrapping the given implementation, used internally. More...
 
 HAClient (const HAClient &rhs)
 Copy constructor, makes a new reference to the same body. More...
 
HAClientoperator= (const HAClient &rhs)
 Assignment operator, the body will be shared after this. More...
 
void setTimeout (int timeout_)
 Set the timeout used when logging into AMPS. More...
 
int getTimeout () const
 Get the current timeout used when attempting to log into AMPS. More...
 
void setReconnectDelay (int reconnectDelay_)
 Set the delay between reconnect attempts in milliseconds. More...
 
int getReconnectDelay () const
 The current delay in milliseconds between reconnect attempts. More...
 
void setReconnectDelayStrategy (const ReconnectDelayStrategy &strategy_)
 Set the ReconnectDelayStrategy used to control delay behavior when connecting and reconnecting to servers. More...
 
ReconnectDelayStrategy getReconnectDelayStrategy (void) const
 Get the ReconnectDelayStrategy used to control delay behavior when connecting and reconnecting to servers. More...
 
std::string getLogonOptions (void) const
 Get the options passed to the server during logon. More...
 
void setLogonOptions (const char *logonOptions_)
 Set the options passed to the server during logon.
 
void setLogonOptions (const std::string &logonOptions_)
 Set the options passed to the server during logon.
 
ServerChooser getServerChooser () const
 Return the ServerChooser currently used by the HAClient. More...
 
void setServerChooser (const ServerChooser &serverChooser_)
 Set the ServerChooser used to determine the URI used when trying to connect and logon to AMPS. More...
 
void connectAndLogon ()
 Connect and logon to AMPS using the server(s) from the ServerChooser set on this HAClient and the Authenticator set on this HAClient to to provide logon information. More...
 
bool disconnected () const
 Return whether or not the client is disconnected. More...
 
ConnectionInfo getConnectionInfo () const
 Get the connection information for the current connection. More...
 
ConnectionInfo gatherConnectionInfo () const
 Get the connection information for the current connection. More...
 
- Public Member Functions inherited from AMPS::Client
 Client (const std::string &clientName="")
 Constructs a new client with a given client name. More...
 
void setName (const std::string &name)
 Sets the name of this client, assuming no name was provided previously. More...
 
const std::string & getName () const
 Returns the name of this client passed in the constructor. More...
 
void setLogonCorrelationData (const std::string &logonCorrelationData_)
 Sets the logon correlation data for the client. More...
 
const std::string & getLogonCorrelationData () const
 Returns the currently set logoon correlation data for the client. More...
 
size_t getServerVersion () const
 Returns the server version retrieved during logon. More...
 
VersionInfo getServerVersionInfo () const
 Returns the server version retrieved during logon. More...
 
const std::string & getURI () const
 Returns the last URI this client is connected to. More...
 
void connect (const std::string &uri)
 Connect to an AMPS server. More...
 
void disconnect ()
 Disconnect from an AMPS server. More...
 
void send (const Message &message)
 Sends a Message to the connected AMPS server. More...
 
void addMessageHandler (const Field &commandId_, const AMPS::MessageHandler &messageHandler_, unsigned requestedAcks_, bool isSubscribe_)
 Adds a MessageHandler to be invoked for Messages with the given CommandId as their command id, sub id, or query id. More...
 
bool removeMessageHandler (const Field &commandId_)
 Removes a MessageHandler for a given ComandId from self. More...
 
std::string send (MessageHandler messageHandler, Message &message, int timeout=0)
 Sends a Message to the connected AMPS server. More...
 
void setDisconnectHandler (DisconnectHandler disconnectHandler)
 Sets the function to be called when the client is unintentionally disconnected. More...
 
DisconnectHandler getDisconnectHandler (void)
 Returns the callback function that is invoked when a disconnect occurs. More...
 
void setBookmarkStore (const BookmarkStore &bookmarkStore_)
 Set the bookmark store to be used by the client. More...
 
BookmarkStore getBookmarkStore ()
 Get the bookmark store being used by the client. More...
 
SubscriptionManagergetSubscriptionManager ()
 Get the subscription manager being used by the client. More...
 
void setSubscriptionManager (SubscriptionManager *subscriptionManager_)
 Set the subscription manager to be used by the client. More...
 
void setPublishStore (const Store &publishStore_)
 Set the publish store to be used by the client. More...
 
Store getPublishStore ()
 Get the publish store used by the client. More...
 
void setDuplicateMessageHandler (const MessageHandler &duplicateMessageHandler_)
 Sets a callback function that is invoked when a duplicate message is detected. More...
 
MessageHandler getDuplicateMessageHandler (void)
 Returns the callback function that is invoked when a duplicate message is detected. More...
 
void setFailedWriteHandler (FailedWriteHandler *handler_)
 Set the handler that is invoked to report on duplicate or not entitled messages that have been published. More...
 
FailedWriteHandlergetFailedWriteHandler ()
 Get the handler that is invoked to report on failed writes. More...
 
amps_uint64_t publish (const std::string &topic_, const std::string &data_)
 Publish a message to an AMPS topic. More...
 
amps_uint64_t publish (const char *topic_, size_t topicLength_, const char *data_, size_t dataLength_)
 Publish a message to an AMPS topic. More...
 
amps_uint64_t publish (const std::string &topic_, const std::string &data_, unsigned long expiration_)
 Publish a message to an AMPS topic. More...
 
amps_uint64_t publish (const char *topic_, size_t topicLength_, const char *data_, size_t dataLength_, unsigned long expiration_)
 Publish a message to an AMPS topic. More...
 
void publishFlush (long timeout_=0)
 Ensures that AMPS messages are sent and have been processed by the AMPS server. More...
 
amps_uint64_t deltaPublish (const std::string &topic_, const std::string &data_)
 Publish the changed fields of a message to an AMPS topic. More...
 
amps_uint64_t deltaPublish (const char *topic_, size_t topicLength_, const char *data_, size_t dataLength_)
 Publish the changed fields of a message to an AMPS topic. More...
 
amps_uint64_t deltaPublish (const std::string &topic_, const std::string &data_, unsigned long expiration_)
 Publish the changed fields of a message to an AMPS topic. More...
 
amps_uint64_t deltaPublish (const char *topic_, size_t topicLength_, const char *data_, size_t dataLength_, unsigned long expiration_)
 Publish the changed fields of a message to an AMPS topic. More...
 
std::string logon (int timeout_=0, Authenticator &authenticator_=DefaultAuthenticator::instance(), const char *options_=NULL)
 Logon to the server. More...
 
std::string logon (const char *options_, int timeout_=0)
 Logon to the server. More...
 
std::string logon (const std::string &options_, int timeout_=0)
 Logon to the server. More...
 
std::string subscribe (MessageHandler messageHandler_, const std::string &topic_, long timeout_=0, const std::string &filter_="", const std::string &options_="", const std::string &subId_="")
 Subscribe to a topic. More...
 
MessageStream subscribe (const std::string &topic_, long timeout_=0, const std::string &filter_="", const std::string &options_="", const std::string &subId_="")
 Subscribe to a topic. More...
 
MessageStream subscribe (const char *topic_, long timeout_=0, const std::string &filter_="", const std::string &options_="", const std::string &subId_="")
 Subscribe to a topic. More...
 
std::string deltaSubscribe (MessageHandler messageHandler_, const std::string &topic_, long timeout_, const std::string &filter_="", const std::string &options_="", const std::string &subId_="")
 Delta Subscribe to a topic. More...
 
MessageStream deltaSubscribe (const std::string &topic_, long timeout_, const std::string &filter_="", const std::string &options_="", const std::string &subId_="")
 Delta Subscribe to a topic. More...
 
MessageStream deltaSubscribe (const char *topic_, long timeout_, const std::string &filter_="", const std::string &options_="", const std::string &subId_="")
 Delta Subscribe to a topic. More...
 
std::string bookmarkSubscribe (MessageHandler messageHandler_, const std::string &topic_, long timeout_, const std::string &bookmark_, const std::string &filter_="", const std::string &options_="", const std::string &subId_="")
 Subscribe to a topic using a bookmark. More...
 
MessageStream bookmarkSubscribe (const std::string &topic_, long timeout_, const std::string &bookmark_, const std::string &filter_="", const std::string &options_="", const std::string &subId_="")
 Subscribe to a topic using a bookmark. More...
 
MessageStream bookmarkSubscribe (const char *topic_, long timeout_, const std::string &bookmark_, const std::string &filter_="", const std::string &options_="", const std::string &subId_="")
 Subscribe to a topic using a bookmark. More...
 
void unsubscribe (const std::string &commandId)
 Unsubscribe from a topic. More...
 
void unsubscribe ()
 Unsubscribe from all topics. More...
 
std::string sow (MessageHandler messageHandler_, const std::string &topic_, const std::string &filter_="", const std::string &orderBy_="", const std::string &bookmark_="", int batchSize_=DEFAULT_BATCH_SIZE, int topN_=DEFAULT_TOP_N, const std::string &options_="", long timeout_=DEFAULT_COMMAND_TIMEOUT)
 Query a State-of-the-World topic. More...
 
MessageStream sow (const std::string &topic_, const std::string &filter_="", const std::string &orderBy_="", const std::string &bookmark_="", int batchSize_=DEFAULT_BATCH_SIZE, int topN_=DEFAULT_TOP_N, const std::string &options_="", long timeout_=DEFAULT_COMMAND_TIMEOUT)
 Query the SOW cache of a topic. More...
 
MessageStream sow (const char *topic_, const std::string &filter_="", const std::string &orderBy_="", const std::string &bookmark_="", int batchSize_=DEFAULT_BATCH_SIZE, int topN_=DEFAULT_TOP_N, const std::string &options_="", long timeout_=DEFAULT_COMMAND_TIMEOUT)
 Query the SOW cache of a topic. More...
 
std::string sow (MessageHandler messageHandler_, const std::string &topic_, long timeout_, const std::string &filter_="", int batchSize_=DEFAULT_BATCH_SIZE, int topN_=DEFAULT_TOP_N)
 Query the SOW cache of a topic. More...
 
std::string sowAndSubscribe (MessageHandler messageHandler_, const std::string &topic_, long timeout_, const std::string &filter_="", int batchSize_=DEFAULT_BATCH_SIZE, bool oofEnabled_=false, int topN_=DEFAULT_TOP_N)
 Query the SOW cache of a topic and initiates a new subscription on it. More...
 
MessageStream sowAndSubscribe (const std::string &topic_, long timeout_, const std::string &filter_="", int batchSize_=DEFAULT_BATCH_SIZE, bool oofEnabled_=false, int topN_=DEFAULT_TOP_N)
 Query the SOW cache of a topic and initiates a new subscription on it. More...
 
MessageStream sowAndSubscribe (const char *topic_, long timeout_, const std::string &filter_="", int batchSize_=DEFAULT_BATCH_SIZE, bool oofEnabled_=false, int topN_=DEFAULT_TOP_N)
 Query the SOW cache of a topic and initiates a new subscription on it. More...
 
std::string sowAndSubscribe (MessageHandler messageHandler_, const std::string &topic_, const std::string &filter_="", const std::string &orderBy_="", const std::string &bookmark_="", int batchSize_=DEFAULT_BATCH_SIZE, int topN_=DEFAULT_TOP_N, const std::string &options_="", long timeout_=DEFAULT_COMMAND_TIMEOUT)
 Query the SOW cache of a topic and initiates a new subscription on it. More...
 
MessageStream sowAndSubscribe (const std::string &topic_, const std::string &filter_="", const std::string &orderBy_="", const std::string &bookmark_="", int batchSize_=DEFAULT_BATCH_SIZE, int topN_=DEFAULT_TOP_N, const std::string &options_="", long timeout_=DEFAULT_COMMAND_TIMEOUT)
 Query the SOW cache of a topic and initiates a new subscription on it. More...
 
MessageStream sowAndSubscribe (const char *topic_, const std::string &filter_="", const std::string &orderBy_="", const std::string &bookmark_="", int batchSize_=DEFAULT_BATCH_SIZE, int topN_=DEFAULT_TOP_N, const std::string &options_="", long timeout_=DEFAULT_COMMAND_TIMEOUT)
 Query the SOW cache of a topic and initiates a new subscription on it. More...
 
std::string sowAndDeltaSubscribe (MessageHandler messageHandler_, const std::string &topic_, const std::string &filter_="", const std::string &orderBy_="", int batchSize_=DEFAULT_BATCH_SIZE, int topN_=DEFAULT_TOP_N, const std::string &options_="", long timeout_=DEFAULT_COMMAND_TIMEOUT)
 Query the SOW cache of a topic and initiates a new delta subscription on it. More...
 
MessageStream sowAndDeltaSubscribe (const std::string &topic_, const std::string &filter_="", const std::string &orderBy_="", int batchSize_=DEFAULT_BATCH_SIZE, int topN_=DEFAULT_TOP_N, const std::string &options_="", long timeout_=DEFAULT_COMMAND_TIMEOUT)
 Query the SOW cache of a topic and initiates a new delta subscription on it. More...
 
MessageStream sowAndDeltaSubscribe (const char *topic_, const std::string &filter_="", const std::string &orderBy_="", int batchSize_=DEFAULT_BATCH_SIZE, int topN_=DEFAULT_TOP_N, const std::string &options_="", long timeout_=DEFAULT_COMMAND_TIMEOUT)
 Query the SOW cache of a topic and initiates a new delta subscription on it. More...
 
std::string sowAndDeltaSubscribe (MessageHandler messageHandler_, const std::string &topic_, long timeout_, const std::string &filter_="", int batchSize_=DEFAULT_BATCH_SIZE, bool oofEnabled_=false, bool sendEmpties_=false, int topN_=DEFAULT_TOP_N)
 Query the SOW cache of a topic and initiates a new delta subscription on it. More...
 
MessageStream sowAndDeltaSubscribe (const std::string &topic_, long timeout_, const std::string &filter_="", int batchSize_=DEFAULT_BATCH_SIZE, bool oofEnabled_=false, bool sendEmpties_=false, int topN_=DEFAULT_TOP_N)
 Query the SOW cache of a topic and initiates a new delta subscription on it. More...
 
MessageStream sowAndDeltaSubscribe (const char *topic_, long timeout_, const std::string &filter_="", int batchSize_=DEFAULT_BATCH_SIZE, bool oofEnabled_=false, bool sendEmpties_=false, int topN_=DEFAULT_TOP_N)
 Query the SOW cache of a topic and initiates a new delta subscription on it. More...
 
std::string sowDelete (MessageHandler messageHandler, const std::string &topic, const std::string &filter, long timeout)
 Deletes one or more messages from a topic's SOW cache. More...
 
Message sowDelete (const std::string &topic, const std::string &filter, long timeout=0)
 Deletes one or more messages from a topic's SOW cache. More...
 
void startTimer ()
 Sends a message to AMPS requesting that AMPS start a server-side timer. More...
 
std::string stopTimer (MessageHandler messageHandler)
 Sends a message to AMPS requesting that AMPS stop the previously started timer. More...
 
std::string sowDeleteByKeys (MessageHandler messageHandler_, const std::string &topic_, const std::string &keys_, long timeout_=0)
 Deletes messages that match SOW keys from a topic's SOW cache. More...
 
Message sowDeleteByKeys (const std::string &topic_, const std::string &keys_, long timeout_=0)
 Deletes messages that match SOW keys from a topic's SOW cache. More...
 
std::string sowDeleteByData (MessageHandler messageHandler_, const std::string &topic_, const std::string &data_, long timeout_=0)
 Deletes the message whose keys match the message data provided. More...
 
Message sowDeleteByData (const std::string &topic_, const std::string &data_, long timeout_=0)
 Deletes the message whose keys match the message data provided. More...
 
amps_handle getHandle ()
 Returns the underlying amps_handle for this client, to be used with amps_client_* functions from the C api. More...
 
void setExceptionListener (const ExceptionListener &listener_)
 Sets the exception listener for exceptions that are not thrown back to the user. More...
 
const ExceptionListenergetExceptionListener (void) const
 Returns the exception listener for exceptions that are not thrown back to the user. More...
 
void setHeartbeat (unsigned heartbeatTime_, unsigned readTimeout_)
 Sets the heartbeat time on this Client, Server and Transport. More...
 
void setHeartbeat (unsigned heartbeatTime_)
 Sets the heartbeat time on this Client, Server and Transport. More...
 
void setUnhandledMessageHandler (const AMPS::MessageHandler &messageHandler)
 Deprecated. Use setLastChanceMessageHandler instead.
 
void setLastChanceMessageHandler (const AMPS::MessageHandler &messageHandler)
 Sets the message handler called when no other handler matches. More...
 
void addConnectionStateListener (ConnectionStateListener *listener)
 Adds a ConnectionStateListener to self's set of listeners. More...
 
void removeConnectionStateListener (ConnectionStateListener *listener)
 Attempts to remove listener from self's set of ConnectionStateListeners. More...
 
std::string executeAsync (Command &command_, MessageHandler handler_)
 Execute the provided command and, once AMPS acknowledges the command, process messages in response to the command on the client receive thread by invoking the provided handler. More...
 
std::string executeAsyncNoResubscribe (Command &command_, MessageHandler handler_)
 Execute the provided command and, once AMPS acknowledges the command, process messages in response to the command on the client receive thread by invoking the provided handler. More...
 
MessageStream execute (Command &command_)
 Execute the provided command and return messages received in response in a MessageStream. More...
 
void ack (Field &topic_, Field &bookmark_, const char *options_=NULL)
 ACK a message queue message by supplying a topic and bookmark. More...
 
void ack (Message &message_, const char *options_=NULL)
 ACK a message queue message by supplying the message directly. More...
 
void ack (const std::string &topic_, const std::string &bookmark_, const char *options_=NULL)
 ACK a message queue message by supplying a topic and bookmark string. More...
 
void flushAcks (void)
 Sends any queued message queue ACK messages to the server immediately.
 
bool getAutoAck (void) const
 Returns the value of the auto-ack setting. More...
 
void setAutoAck (bool isAutoAckEnabled_)
 Sets the auto-ack setting on this client. More...
 
unsigned getAckBatchSize (void) const
 Returns the value of the ack batch size setting. More...
 
void setAckBatchSize (const unsigned ackBatchSize_)
 Sets the ack batch size setting. More...
 
int getAckTimeout (void) const
 Returns the current value of the ack timeout setting. More...
 
void setAckTimeout (const int ackTimeout_)
 Sets the message queue ACK timeout value. More...
 
void setRetryOnDisconnect (bool isRetryOnDisconnect_)
 Enables or disables automatic retry of a command to AMPS after a reconnect. More...
 
bool getRetryOnDisconnect (void) const
 Returns true if automatic retry of a command to AMPS after a reconnect is enabled.
 
void setDefaultMaxDepth (unsigned maxDepth_)
 Sets a defualt max depth on all subsequently created MessageStream objects. More...
 
unsigned getDefaultMaxDepth (void) const
 Returns the default max depth for returned MessageStream objects. More...
 
void setTransportFilterFunction (amps_transport_filter_function filter_, void *userData_)
 Sets a filter function on the transport that is called with all raw data sent or received. More...
 

Static Public Member Functions

static HAClient createMemoryBacked (const std::string &name_)
 Creates an HAClient with the given name that uses a memory-based Store for publish messages and a memory-based BookmarkStore for received messages. More...
 
static HAClient createFileBacked (const std::string &name_, const std::string &publishLogName_, const std::string &subscribeLogName_)
 Creates an HAClient with the given name that uses a file-based Store for publish messages that is named publishLogName_ and a file-based BookmarkStore for received messages that is named subscribeLogName_. More...
 
- Static Public Member Functions inherited from AMPS::Client
static size_t convertVersionToNumber (const std::string &version_)
 Converts a string version, such as "3.8.1.5" into the same numeric form used internally and returned by getServerVersion. More...
 
static size_t convertVersionToNumber (const char *data_, size_t len_)
 Converts a string version, such as "3.8.1.5" into the same numeric form used internally and returned by getServerVersion. More...
 

Detailed Description

This class provides HA functionality to clients of AMPS.

It has all the functionality of Client, plus a disconnect handler that will automatically reconnect to a server if it gets disconnected. The class also includes a publish store that can replay published messages if the client is disconnected and a bookmark store that can resume subscriptions if the client is disconnected.

Constructor & Destructor Documentation

AMPS::HAClient::HAClient ( )
inline

Create an HAClient with no name The name for the client must be set using setName before it can be used.

AMPS::HAClient::HAClient ( const std::string &  name_)
inline

Create an HAClient with the given name.

Parameters
name_Name for the client. This name is used for duplicate message detection and should be unique. AMPS does not enforce specific restrictions on the character set used, however some protocols (for example, XML) may not allow specific characters. 60East recommends that the client name be meaningful, short, human readable, and avoids using control characters, newline characters, or square brackets.
AMPS::HAClient::HAClient ( HAClientImpl *  body_)
inline

Create an HAClient wrapping the given implementation, used internally.

Parameters
body_The implementation for the client to wrap.
AMPS::HAClient::HAClient ( const HAClient rhs)
inline

Copy constructor, makes a new reference to the same body.

Parameters
rhsThe HAClient to copy.

Member Function Documentation

void AMPS::HAClient::connectAndLogon ( )
inline

Connect and logon to AMPS using the server(s) from the ServerChooser set on this HAClient and the Authenticator set on this HAClient to to provide logon information.

Will continue attempting to connect and logon until successful or ServerChooser returns an empty URI.

static HAClient AMPS::HAClient::createFileBacked ( const std::string &  name_,
const std::string &  publishLogName_,
const std::string &  subscribeLogName_ 
)
inlinestatic

Creates an HAClient with the given name that uses a file-based Store for publish messages that is named publishLogName_ and a file-based BookmarkStore for received messages that is named subscribeLogName_.

This uses PublishStore and MMapBookmarkStore.

Parameters
name_Name for the client. This name is used for duplicate message detection and should be unique. AMPS does not enforce specific restrictions on the character set used, however some protocols (for example, XML) may not allow specific characters. 60East recommends that the client name be meaningful, short, human readable, and avoids using control characters, newline characters, or square brackets.
publishLogName_The name for file used by the PublishStore.
subscribeLogName_The name for the file used by the LoggedBookmarkStore.
Returns
The HAClient created with given values.
static HAClient AMPS::HAClient::createMemoryBacked ( const std::string &  name_)
inlinestatic

Creates an HAClient with the given name that uses a memory-based Store for publish messages and a memory-based BookmarkStore for received messages.

This uses MemoryPublishStore and MemoryBookmarkStore.

Parameters
name_Name for the client. This name is used for duplicate message detection and should be unique. AMPS does not enforce specific restrictions on the character set used, however some protocols (for example, XML) may not allow specific characters. 60East recommends that the client name be meaningful, short, human readable, and avoids using control characters, newline characters, or square brackets.
Returns
The HAClient created with the name and the memory stores.
bool AMPS::HAClient::disconnected ( ) const
inline

Return whether or not the client is disconnected.

Returns
true if disconnected, false if connected.
ConnectionInfo AMPS::HAClient::gatherConnectionInfo ( ) const
inline

Get the connection information for the current connection.

This is a deprecated alias to getConnectionInfo.

Returns
A ConnectionInfo object with the information describing the the current connection.
ConnectionInfo AMPS::HAClient::getConnectionInfo ( ) const
inlinevirtual

Get the connection information for the current connection.

Returns
A ConnectionInfo object with the information describing the the current connection.

Reimplemented from AMPS::Client.

std::string AMPS::HAClient::getLogonOptions ( void  ) const
inline

Get the options passed to the server during logon.

Returns
The options passed to the server during logon.
int AMPS::HAClient::getReconnectDelay ( ) const
inline

The current delay in milliseconds between reconnect attempts.

Returns
The number of milliseconds to delay.
ReconnectDelayStrategy AMPS::HAClient::getReconnectDelayStrategy ( void  ) const
inline

Get the ReconnectDelayStrategy used to control delay behavior when connecting and reconnecting to servers.

Returns
The ReconnectDelayStrategy used when connecting and reconnecting to AMPS instances.
ServerChooser AMPS::HAClient::getServerChooser ( ) const
inline

Return the ServerChooser currently used by the HAClient.

Returns
The current ServerChooser.
int AMPS::HAClient::getTimeout ( ) const
inline

Get the current timeout used when attempting to log into AMPS.

Returns
The number of milliseconds used for the logon timeout.
HAClient& AMPS::HAClient::operator= ( const HAClient rhs)
inline

Assignment operator, the body will be shared after this.

Parameters
rhsThe HAClient to copy.
void AMPS::HAClient::setReconnectDelay ( int  reconnectDelay_)
inline

Set the delay between reconnect attempts in milliseconds.

This method constructs a new FixedDelayStrategy with the specified reconnect time and sets that as the delay strategy for the class.

Parameters
reconnectDelay_The number of milliseconds to wait between attempts to reconnect when disconnected.
void AMPS::HAClient::setReconnectDelayStrategy ( const ReconnectDelayStrategy strategy_)
inline

Set the ReconnectDelayStrategy used to control delay behavior when connecting and reconnecting to servers.

Parameters
strategy_The ReconnectDelayStrategy to use when connecting and reconnecting to AMPS instances.
void AMPS::HAClient::setServerChooser ( const ServerChooser serverChooser_)
inline

Set the ServerChooser used to determine the URI used when trying to connect and logon to AMPS.

Parameters
serverChooser_The ServerChooser instance to use.
void AMPS::HAClient::setTimeout ( int  timeout_)
inline

Set the timeout used when logging into AMPS.

Parameters
timeout_The timeout, in milliseconds. 0 indicates no timeout.

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