Command is an encapsulation of a single AMPS command sent by the client.
More...
#include <ampsplusplus.hpp>
Command is an encapsulation of a single AMPS command sent by the client.
Using Command you can build valid commands to be executed to process messages synchronously or asynchronously via the Client execute() and executeAsync() methods. Command is designed to be used as a "builder" enabling AMPS commands to be built easily, for example:
Client client(...);
for(Message m : client.execute(Command("sow").setTopic("topic"))) { ... }
AMPS::Command::Command |
( |
const std::string & |
command_ | ) |
|
|
inline |
Creates an object to represent the given AMPS command, such as "sow" or "subscribe".
- Parameters
-
command_ | The AMPS command to be created. |
AMPS::Command::Command |
( |
Message::Command::Type |
command_ | ) |
|
|
inline |
Creates an object to represent the given AMPS command, such as "sow" or "subscribe".
- Parameters
-
command_ | The AMPS command to be created. |
Command& AMPS::Command::addAckType |
( |
const std::string & |
v_ | ) |
|
|
inline |
- Parameters
-
v_ | add an ack type to this command, such as "stats" or "completed". Additional acks are returned in the message stream. |
Command& AMPS::Command::reset |
( |
const std::string & |
command_ | ) |
|
|
inline |
Resets the fields of self, and sets the command to command_.
- Parameters
-
command_ | The new AMPS command to be created. |
Command& AMPS::Command::reset |
( |
Message::Command::Type |
command_ | ) |
|
|
inline |
Resets the fields of self, and sets the command to command_.
- Parameters
-
command_ | The new AMPS command to be created. |
Command& AMPS::Command::setBatchSize |
( |
unsigned |
v_ | ) |
|
|
inline |
- Parameters
-
v_ | the batch size for this command. This value controls how many records are sent together in a SOW result set. |
Command& AMPS::Command::setBookmark |
( |
const std::string & |
v_ | ) |
|
|
inline |
- Parameters
-
v_ | the bookmark for this command. |
Command& AMPS::Command::setCommandId |
( |
const std::string & |
v_ | ) |
|
|
inline |
- Parameters
-
v_ | the command ID for this command. For relevant commands, one is generated for you if you do not supply one. |
Command& AMPS::Command::setCorrelationId |
( |
const std::string & |
v_ | ) |
|
|
inline |
- Parameters
-
v_ | the correlation ID for this command. |
Command& AMPS::Command::setData |
( |
const std::string & |
v_ | ) |
|
|
inline |
- Parameters
-
v_ | the data for this command. |
Command& AMPS::Command::setData |
( |
const char * |
v_, |
|
|
size_t |
length_ |
|
) |
| |
|
inline |
- Parameters
-
v_ | the data for this command. |
length_ | the length, in bytes, of your data (excluding any null-terminator) |
Command& AMPS::Command::setExpiration |
( |
unsigned |
v_ | ) |
|
|
inline |
- Parameters
-
v_ | the expiration time for this command. For publishes, this controls how many seconds the message is retained on the server, if expirations are enabled. |
Command& AMPS::Command::setFilter |
( |
const std::string & |
v_ | ) |
|
|
inline |
- Parameters
-
v_ | the filter for this command. |
Command& AMPS::Command::setOptions |
( |
const std::string & |
v_ | ) |
|
|
inline |
- Parameters
-
v_ | the options string for this command. |
Command& AMPS::Command::setOrderBy |
( |
const std::string & |
v_ | ) |
|
|
inline |
- Parameters
-
v_ | the order by clause for this command. |
Command& AMPS::Command::setSowKey |
( |
const std::string & |
sowKey_ | ) |
|
|
inline |
- Parameters
-
sowKey_ | the SOWKey field of this command. |
Command& AMPS::Command::setSowKeys |
( |
const std::string & |
sowKeys_ | ) |
|
|
inline |
- Parameters
-
sowKeys_ | the SOWKeys field of this command. |
Command& AMPS::Command::setSubId |
( |
const std::string & |
v_ | ) |
|
|
inline |
- Parameters
-
v_ | the subscription ID for this command. For relevant commands, one is generated for you if you do not supply one. |
Command& AMPS::Command::setTimeout |
( |
unsigned |
v_ | ) |
|
|
inline |
- Parameters
-
v_ | the timeout for this command. By default, this command will block until a "processed" ack is returned. 0 indicates no timeout. |
Command& AMPS::Command::setTopic |
( |
const std::string & |
v_ | ) |
|
|
inline |
- Parameters
-
v_ | the topic for this command. |
Command& AMPS::Command::setTopN |
( |
unsigned |
v_ | ) |
|
|
inline |
- Parameters
-
v_ | the "top N" field for this command. This value limits the number of records returned from a SOW query to the first N records. |
The documentation for this class was generated from the following file: