|
| 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...
|
|
HAClient & | operator= (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...
|
|
| 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...
|
|
SubscriptionManager * | getSubscriptionManager () |
| 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...
|
|
FailedWriteHandler * | getFailedWriteHandler () |
| 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 ExceptionListener & | getExceptionListener (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...
|
|