AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.2.3.0
|
These functions process messages on a background thread by calling the provided message handler. More...
Functions | |
std::string | AMPS::Client::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... | |
std::string | AMPS::Client::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 | AMPS::Client::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... | |
std::string | AMPS::Client::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... | |
std::string | AMPS::Client::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... | |
std::string | AMPS::Client::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... | |
std::string | AMPS::Client::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... | |
std::string | AMPS::Client::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... | |
std::string | AMPS::Client::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 | AMPS::Client::sowDeleteByData (const std::string &topic_, const std::string &data_, long timeout_=0) |
Deletes the message whose keys match the message data provided. More... | |
These functions process messages on a background thread by calling the provided message handler.
|
inline |
Query a State-of-the-World topic.
Queries a SOW topic on the AMPS server. When you call this function, AMPS returns the command ID assigned to this command immediately. The query runs on a background thread, and the provided message handler is called on that thread.
messageHandler_ | The function to be invoked when messages for this topic arrive. |
topic_ | The topic, or regular expression topic, to subscribe to. |
filter_ | Optional filter expression for this subscription. |
orderBy_ | Optional orderBy to have records ordered by server. |
bookmark_ | Optional bookmark for historical query. Bookmarks can be one of the Special Bookmark Values, the bookmark assigned to a specific message, or a timestamp of the format YYYYmmddTHHMMSS. |
batchSize_ | The number of records the server should pack into each message. |
topN_ | The maximum number of records the server will return (default is all that match). |
options_ | An 'or'ing of options for the command. |
timeout_ | The time to wait, in milliseconds, for a response from the server. 0 indicates no timeout. |
DisconnectedException | The Client is no longer connected to a server. |
ConnectionException | An error occured while sending the message. |
TimedOutException | A timeout occured while waiting for a response from the server. |
AuthenticationException | An authentication failure was received from the server. |
UnknownException | An unknown failure was received from the server. |
BadFilterException | The specified filter is not valid or has a syntax error. |
BadRegexTopicException | The specified topic contains an invalid regex. |
InvalidTopicException | The specified topic may not be used with this command. |
SubscriptionAlreadyExistsException | This ID already exists as a subscription. |
|
inline |
Query the SOW cache of a topic.
Queries the SOW cache of a topic on the AMPS server.
messageHandler_ | The function to be invoked when messages for this topic arrive. |
topic_ | The topic, or regular expression topic, to subscribe to. |
timeout_ | The time to wait, in milliseconds, for a response from the server. 0 indicates no timeout. |
filter_ | Optional filter expression for this subscription. |
batchSize_ | The number of records the server should pack into each message. |
topN_ | The maximum number of records the server will return (default is all that match). |
DisconnectedException | The Client is no longer connected to a server. |
ConnectionException | An error occured while sending the message. |
TimedOutException | A timeout occured while waiting for a response from the server. |
AuthenticationException | An authentication failure was received from the server. |
UnknownException | An unknown failure was received from the server. |
BadFilterException | The specified filter is not valid or has a syntax error. |
BadRegexTopicException | The specified topic contains an invalid regex. |
InvalidTopicException | The specified topic may not be used with this command. |
SubscriptionAlreadyExistsException | This ID already exists as a subscription. |
|
inline |
Query the SOW cache of a topic and initiates a new delta subscription on it.
Queries the SOW cache of a topic on the AMPS server, and simultaneously begins a new delta subscription on it.
messageHandler_ | The function to be invoked when messages for this topic arrive. |
topic_ | The topic, or regular expression topic, to subscribe to. |
filter_ | Optional filter expression for this subscription. |
orderBy_ | Optional orderBy to have records ordered by server. |
batchSize_ | The number of records the server should pack into each message. |
topN_ | The maximum number of records the server will return (default is all that match). |
options_ | An 'or'ing of options for the command. |
timeout_ | The time to wait, in milliseconds, for a response from the server. 0 indicates no timeout. |
DisconnectedException | The Client is no longer connected to a server. |
ConnectionException | An error occured while sending the message. |
TimedOutException | A timeout occured while waiting for a response from the server. |
AuthenticationException | An authentication failure was received from the server. |
UnknownException | An unknown failure was received from the server. |
BadFilterException | The specified filter is not valid or has a syntax error. |
BadRegexTopicException | The specified topic contains an invalid regex. |
InvalidTopicException | The specified topic may not be used with this command. |
SubscriptionAlreadyExistsException | This ID already exists as a subscription. |
|
inline |
Query the SOW cache of a topic and initiates a new delta subscription on it.
Queries the SOW cache of a topic on the AMPS server, and simultaneously begins a new delta subscription on it.
messageHandler_ | The function to be invoked when messages for this topic arrive. |
topic_ | The topic, or regular expression topic, to subscribe to. |
timeout_ | The time to wait, in milliseconds, for a response from the server. 0 indicates no timeout. |
filter_ | Optional filter expression for this subscription. |
batchSize_ | The number of records the server should pack into each message. |
oofEnabled_ | true indicates Out-Of-Focus messages are desired for this topic. |
sendEmpties_ | true indicates empty messages should be sent by the server. |
topN_ | The maximum number of records the server will return (default is all that match). |
DisconnectedException | The Client is no longer connected to a server. |
ConnectionException | An error occured while sending the message. |
TimedOutException | A timeout occured while waiting for a response from the server. |
AuthenticationException | An authentication failure was received from the server. |
UnknownException | An unknown failure was received from the server. |
BadFilterException | The specified filter is not valid or has a syntax error. |
BadRegexTopicException | The specified topic contains an invalid regex. |
InvalidTopicException | The specified topic may not be used with this command. |
SubscriptionAlreadyExistsException | This ID already exists as a subscription. |
|
inline |
Query the SOW cache of a topic and initiates a new subscription on it.
Queries the SOW cache of a topic on the AMPS server, and simultaneously begins a new subscription.
messageHandler_ | The function to be invoked when messages for this topic arrive. |
topic_ | The topic, or regular expression topic, to subscribe to. |
timeout_ | The time to wait, in milliseconds, for a response from the server. 0 indicates no timeout. |
filter_ | Optional filter expression for this subscription. |
batchSize_ | The number of records the server should pack into each message. |
oofEnabled_ | true indicates Out-Of-Focus messages are desired for this topic. |
topN_ | The maximum number of records the server will return (default is all that match). |
DisconnectedException | The Client is no longer connected to a server. |
ConnectionException | An error occured while sending the message. |
TimedOutException | A timeout occured while waiting for a response from the server. |
AuthenticationException | An authentication failure was received from the server. |
UnknownException | An unknown failure was received from the server. |
BadFilterException | The specified filter is not valid or has a syntax error. |
BadRegexTopicException | The specified topic contains an invalid regex. |
InvalidTopicException | The specified topic may not be used with this command. |
SubscriptionAlreadyExistsException | This ID already exists as a subscription. |
|
inline |
Query the SOW cache of a topic and initiates a new subscription on it.
Queries the SOW cache of a topic on the AMPS server, and simultaneously begins a new subscription.
messageHandler_ | The function to be invoked when messages for this topic arrive. |
topic_ | The topic, or regular expression topic, to subscribe to. |
filter_ | Optional filter expression for this subscription. |
orderBy_ | Optional orderBy to have records ordered by server. |
bookmark_ | Optional bookmark for historical query. Bookmarks can be one of the Special Bookmark Values, the bookmark assigned to a specific message, or a timestamp of the format YYYYmmddTHHMMSS, as described in the AMPS User's Guide. |
batchSize_ | The number of records the server should pack into each message. |
topN_ | The maximum number of records the server will return (default is all that match). |
options_ | An 'or'ing of options for the command. |
timeout_ | The time to wait, in milliseconds, for a response from the server. 0 indicates no timeout. |
DisconnectedException | The Client is no longer connected to a server. |
ConnectionException | An error occured while sending the message. |
TimedOutException | A timeout occured while waiting for a response from the server. |
AuthenticationException | An authentication failure was received from the server. |
UnknownException | An unknown failure was received from the server. |
BadFilterException | The specified filter is not valid or has a syntax error. |
BadRegexTopicException | The specified topic contains an invalid regex. |
InvalidTopicException | The specified topic may not be used with this command. |
SubscriptionAlreadyExistsException | This ID already exists as a subscription. |
|
inline |
Deletes one or more messages from a topic's SOW cache.
Sends a request to the server to delete one or more messages in the SOW cache.
messageHandler | The function to be invoked when messages for this topic arrive. |
topic | The topic, or regular expression topic, to delete from. |
filter | Optional filter expression for this subscription. To delete all records, set a filter that is always true ('1=1'). |
timeout | The time to wait, in milliseconds, for a response from the server. 0 indicates no timeout. |
DisconnectedException | The Client is no longer connected to a server. |
ConnectionException | An error occured while sending the message. |
TimedOutException | A timeout occured while waiting for a response from the server. |
AuthenticationException | An authentication failure was received from the server. |
UnknownException | An unknown failure was received from the server. |
BadFilterException | The specified filter is not valid or has a syntax error. |
BadRegexTopicException | The specified topic contains an invalid regex. |
InvalidTopicException | The specified topic may not be used with this command. |
|
inline |
Deletes the message whose keys match the message data provided.
messageHandler_ | The function to be invoked when statistics about the delete arrive. |
topic_ | The topic, or regular expression topic, to delete from. |
data_ | The message whose keys are matched against the server's SOW cache. |
timeout_ | The time to wait, in milliseconds, for a response from the server. 0 indicates no timeout. |
DisconnectedException | The Client is no longer connected to a server. |
ConnectionException | An error occured while sending the message. |
TimedOutException | A timeout occured while waiting for a response from the server. |
AuthenticationException | An authentication failure was received from the server. |
UnknownException | An unknown failure was received from the server. |
BadRegexTopicException | The specified topic contains an invalid regex. |
InvalidTopicException | The specified topic may not be used with this command. |
|
inline |
Deletes the message whose keys match the message data provided.
Sends a request to the server to delete the message whose keys match the data provided. This method returns once the operation is complete.
topic_ | The topic, or regular expression topic, to delete from. |
data_ | The message whose keys are matched against the server's SOW cache. |
timeout_ | The time to wait, in milliseconds, for a response from the server. 0 indicates no timeout. |
DisconnectedException | The Client is no longer connected to a server. |
ConnectionException | An error occured while sending the message. |
TimedOutException | A timeout occured while waiting for a response from the server. |
AuthenticationException | An authentication failure was received from the server. |
UnknownException | An unknown failure was received from the server. |
BadRegexTopicException | The specified topic contains an invalid regex. |
InvalidTopicException | The specified topic may not be used with this command. |
|
inline |
Deletes messages that match SOW keys from a topic's SOW cache.
Sends a request to the server to delete messages that match SOW keys from a topic's SOW cache.
messageHandler_ | The function to be invoked when messages for this topic arrive. |
topic_ | The topic, or regular expression topic, to delete from. |
keys_ | The sow keys to delete as a comma-separated list |
timeout_ | The time to wait, in milliseconds, for a response from the server. 0 indicates no timeout. |
DisconnectedException | The Client is no longer connected to a server. |
ConnectionException | An error occured while sending the message. |
TimedOutException | A timeout occured while waiting for a response from the server. |
AuthenticationException | An authentication failure was received from the server. |
UnknownException | An unknown failure was received from the server. |
BadRegexTopicException | The specified topic contains an invalid regex. |
InvalidTopicException | The specified topic may not be used with this command. |