|
| 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 |
|
| 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...
|
|
const std::string & | getNameHash () const |
| Returns the name hash string of this client as generated by the server and returned when the client logged on. More...
|
|
const amps_uint64_t | getNameHashValue () const |
| Returns the numeric name hash of this client as generated by the server and returned when the client logged on. 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 logon 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, performing only minimal validation and bypassing client services such as the publish store. 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...
|
|
void | addMessageHandler (const Field &commandId_, const AMPS::MessageHandler &messageHandler_, unsigned requestedAcks_, Message::Command::Type commandType_) |
| 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 (const MessageHandler &messageHandler, Message &message, int timeout=0) |
| Sends a Message to the connected AMPS server, performing only minimal validation and bypassing client services such as the publish store. More...
|
|
void | setDisconnectHandler (const DisconnectHandler &disconnectHandler) |
| Sets the function to be called when the client is unintentionally disconnected. More...
|
|
DisconnectHandler | getDisconnectHandler (void) const |
| 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 when a publish fails, for example if the publisher is not entitled, if AMPS attempts to parse the message and the parse fails, and so on. 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, returning the sequence number assigned by the publish store if one is present on the client. More...
|
|
amps_uint64_t | publish (const char *topic_, size_t topicLength_, const char *data_, size_t dataLength_) |
| Publish a message to an AMPS topic, returning the sequence number assigned by the publish store if one is present on the client. More...
|
|
amps_uint64_t | publish (const std::string &topic_, const std::string &data_, unsigned long expiration_) |
| Publish a message to an AMPS topic, returning the sequence number assigned by the publish store (if a publish store is present on the client). 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, returning the sequence number assigned by the publish store if one is present on the client. More...
|
|
void | publishFlush (long timeout_=0, unsigned ackType_=Message::AckType::Processed) |
| Ensure 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, providing the client name, credentials (if available), and client information (such as client version and connection message type). More...
|
|
std::string | logon (const char *options_, int timeout_=0) |
| Logon to the server, providing the client name, credentials (if available) client information (such as client version and connection message type), and the specified options. More...
|
|
std::string | logon (const std::string &options_, int timeout_=0) |
| Logon to the server, providing the client name, credentials (if available) client information (such as client version and connection message type), and the specified options. More...
|
|
std::string | subscribe (const 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 (const 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 (const 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 (const 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 (const 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 (const 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 (const 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 (const 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 (const 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 (const 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 () |
|
std::string | stopTimer (const MessageHandler &messageHandler) |
|
std::string | sowDeleteByKeys (const 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 (const 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 std::shared_ptr< const ExceptionListener > &pListener_) |
| Sets the exception listener for exceptions that are not thrown back to the user (for example, exceptions that are thrown from a MessageHandler running on the client receive thread.) 60East strongly recommends setting this callback if an application uses asynchronous message processing (that is, provides message handler callbacks). More...
|
|
void | setExceptionListener (const ExceptionListener &listener_) |
|
const ExceptionListener & | getExceptionListener (void) const |
| Returns the exception listener set on this Client. More...
|
|
void | setHeartbeat (unsigned heartbeatTime_, unsigned readTimeout_) |
| Requests heartbeating with the AMPS server. More...
|
|
void | setHeartbeat (unsigned heartbeatTime_) |
| Requests heartbeating with the AMPS server. More...
|
|
void | setUnhandledMessageHandler (const AMPS::MessageHandler &messageHandler) |
|
void | setLastChanceMessageHandler (const AMPS::MessageHandler &messageHandler) |
| Sets the message handler called when no other handler matches. More...
|
|
void | setGlobalCommandTypeMessageHandler (const std::string &command_, const MessageHandler &handler_) |
| Sets a handler for all messages of a particular type, or for messages that would be delivered to a particular special handler: currently supported types are "heartbeat", "ack", "duplicate", and "lastchance". More...
|
|
void | setGlobalCommandTypeMessageHandler (const Message::Command::Type command_, const MessageHandler &handler_) |
| Sets a handler for all messages of a particular type: currently supported types are heartbeat messages and ack messages. 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...
|
|
void | clearConnectionStateListeners () |
| Clear all listeners from self's set of ConnectionStateListeners.
|
|
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) |
| Acknowledge a message queue message by supplying a topic and bookmark: this adds the ack to the current batch (or sends the ack immediately if the batch size is 1 or less). More...
|
|
void | ack (Message &message_, const char *options_=NULL) |
| Acknowledge a message queue message by supplying the message directly: this adds the ack to the current batch (or sends the ack immediately if the batch size is 1 or less). More...
|
|
void | ack (const std::string &topic_, const std::string &bookmark_, const char *options_=NULL) |
| Acknowledge a message queue message by supplying a topic and bookmark string: this adds the ack to the current batch (or sends the ack immediately if the batch size is 1 or less). More...
|
|
void | flushAcks (void) |
| Sends any queued message queue ack messages to the server immediately. More...
|
|
bool | getAutoAck (void) const |
| Returns the value of the queue auto-ack setting. More...
|
|
void | setAutoAck (bool isAutoAckEnabled_) |
| Sets the queue auto-ack setting on this client. More...
|
|
unsigned | getAckBatchSize (void) const |
| Returns the value of the queue ack batch size setting. More...
|
|
void | setAckBatchSize (const unsigned ackBatchSize_) |
| Sets the queue ack batch size setting. More...
|
|
int | getAckTimeout (void) const |
| Returns the current value of the message queue ack timeout setting – that is, the amount of time after which queue messages will be acknowledged even if the ack batch is not full. 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 default 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...
|
|
void | setThreadCreatedCallback (amps_thread_created_callback callback_, void *userData_) |
| Sets a callback function on the transport that is called when a new thread is created to receive data from the server. More...
|
|