AMPS C# Client  5.3.3.4
AMPS C# Client for .NET
AMPS.Client.Command Class Reference

Command is an encapsulation of a single AMPS command sent by the client. Using Command you can build valid commands to be executed either 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: More...

Public Member Functions

string getSOWKeys ()
 
Returns
the SOW Keys

 
string getSowKeys ()
 
Returns
the SOW Keys

 
Command setSOWKeys (string sowKeys)
 The SowKeys for a command are a comma-separated list of the keys that AMPS assigns to SOW messages. The SOW key for a message is available through the Message#getSowKeys method on a message. More...
 
Command setSowKeys (string sowKeys)
 The SowKeys for a command are a comma-separated list of the keys that AMPS assigns to SOW messages. The SOW key for a message is available through the Message#getSowKeys method on a message. More...
 
string getSOWKey ()
 
Returns
the SOW Key

 
string getSowKey ()
 
Returns
the SOW Key

 
Command setSOWKey (string sowKey)
 The SowKey for a command are a comma-separated list of the keys that AMPS assigns to SOW messages. The SOW key for a message is available through the Message#getSowKey method on a message. More...
 
Command setSowKey (string sowKey)
 The SowKey for a command are a comma-separated list of the keys that AMPS assigns to SOW messages. The SOW key for a message is available through the Message#getSowKey method on a message. More...
 
bool isSubscribe ()
 
Returns
true if this command is a subscription

 
bool isSow ()
 
Returns
true if this command is a sow query

 
bool needsSequenceNumber ()
 
Returns
true if this command can be associated with a client sequence number.

 
 Command ()
 Create a new Command with no command type or arguments set. More...
 
 Command (Message.Commands command_)
 Create a Command with the Command field set. More...
 
 Command (string command_)
 Create a Command with the Command field set. More...
 
Command reset (Message.Commands command_)
 Resets this command with a new Command type and re-initializes all other fields. More...
 
Command reset (string command_)
 Resets this command with a new Command type and re-initializes all other fields. More...
 
CommandId getCommandId ()
 
Returns
the commandId, which is automatically generated for some command types.

 
Command setCommandId (CommandId commandId)
 
Parameters
commandIdthe commandId to set

 
CommandId getQueryId ()
 
Returns
the queryId

 
Command setQueryId (CommandId queryId)
 
Parameters
queryIdthe queryId to set

 
Message.Commands getCommand ()
 
Returns
the command

 
Command setCommand (Message.Commands command)
 
Parameters
commandthe command to set

 
string getTopic ()
 
Returns
the topic

 
Command setTopic (string topic)
 
Parameters
topicthe topic to set

 
Command setTopic (byte[] topic, int offset, int length)
 
string getFilter ()
 
Returns
the filter

 
Command setFilter (string filter)
 
Parameters
filterthe filter to set

 
string getOrderBy ()
 
Returns
the orderBy

 
Command setOrderBy (string orderBy)
 
Parameters
orderBythe orderBy to set

 
CommandId getSubId ()
 
Returns
the subId

 
Command setSubId (CommandId subId)
 
Parameters
subIdthe subId to set

 
Command setSubId (string subId)
 
Parameters
subIdthe subId to set

 
string getBookmark ()
 
Returns
the bookmark

 
Command setBookmark (string bookmark)
 
Parameters
bookmarkthe bookmark to set

 
string getOptions ()
 
Returns
the options

 
Command setOptions (string options)
 
Parameters
optionsthe options to set

 
Message.AckTypes getAckType ()
 
Returns
the ackType

 
Command setAckType (Message.AckTypes ackType)
 
Parameters
ackTypethe ackType to set

 
Command addAckType (Message.AckTypes ackType)
 Adds an additional ackType to the ackTypes already set for this Command. More...
 
string getData ()
 
Returns
the data

 
Command setData (string data)
 
Parameters
datathe data to set

 
Command setData (byte[] data, int offset, int length)
 
Command setData (CompositeMessageBuilder builder)
 Set the data for this command. More...
 
long getTimeout ()
 
Returns
the timeout

 
Command setTimeout (long timeout)
 
Parameters
timeoutthe timeout to set

 
int getTopN ()
 
Returns
the topN

 
Command setTopN (int topN)
 
Parameters
topNthe topN to set

 
int getBatchSize ()
 
Returns
the batchSize

 
Command setBatchSize (int batchSize)
 
Parameters
batchSizethe batchSize to set

 
int getExpiration ()
 
Returns
the expiration. Use hasExpiration() to check if an expiration is set.

 
bool hasExpiration ()
 
Returns
true if an expiration is set.

 
Command setExpiration (int expiration)
 
Parameters
expirationthe expiration to set

 
void unsetExpiration ()
 Clears any expiration value set on self.
 
Command setClientSequenceNumber (ulong seqNumber)
 
ulong getClientSequenceNumber ()
 
Returns
the client sequence number generated for this command, or 0 if none was generated.

 
Command setCorrelationId (String correlationId_)
 
String getCorrelationId ()
 

Detailed Description

Command is an encapsulation of a single AMPS command sent by the client. Using Command you can build valid commands to be executed either 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 = new Client(...);
for(Message m : client.execute(new Command("sow").setTopic("topic"))) { ... }
 

Constructor & Destructor Documentation

◆ Command() [1/3]

AMPS.Client.Command.Command ( )
inline

Create a new Command with no command type or arguments set.

◆ Command() [2/3]

AMPS.Client.Command.Command ( Message.Commands  command_)
inline

Create a Command with the Command field set.

Parameters
command_A Message.Commands value indicating the AMPS command.

◆ Command() [3/3]

AMPS.Client.Command.Command ( string  command_)
inline

Create a Command with the Command field set.

Parameters
command_A string indicating the AMPS command.

Member Function Documentation

◆ addAckType()

Command AMPS.Client.Command.addAckType ( Message.AckTypes  ackType)
inline

Adds an additional ackType to the ackTypes already set for this Command.

Parameters
ackTypethe ackType to add

◆ reset() [1/2]

Command AMPS.Client.Command.reset ( Message.Commands  command_)
inline

Resets this command with a new Command type and re-initializes all other fields.

Parameters
command_A Message.Commands value indicating the AMPS command.

◆ reset() [2/2]

Command AMPS.Client.Command.reset ( string  command_)
inline

Resets this command with a new Command type and re-initializes all other fields.

Parameters
command_A string value indicating the AMPS command.

◆ setData() [1/2]

Command AMPS.Client.Command.setData ( byte[]  data,
int  offset,
int  length 
)
inline
Parameters
dataThe raw bytes to be used for the data.
offsetThe offset into data where the data begins.
lengthThe length of the data.

◆ setData() [2/2]

Command AMPS.Client.Command.setData ( CompositeMessageBuilder  builder)
inline

Set the data for this command.

Parameters
builderA CompositeMessageBuilder to set self's data from.

◆ setSOWKey()

Command AMPS.Client.Command.setSOWKey ( string  sowKey)
inline

The SowKey for a command are a comma-separated list of the keys that AMPS assigns to SOW messages. The SOW key for a message is available through the Message#getSowKey method on a message.

Parameters
sowKeythe sow keys to set

◆ setSowKey()

Command AMPS.Client.Command.setSowKey ( string  sowKey)
inline

The SowKey for a command are a comma-separated list of the keys that AMPS assigns to SOW messages. The SOW key for a message is available through the Message#getSowKey method on a message.

Parameters
sowKeythe sow keys to set

◆ setSOWKeys()

Command AMPS.Client.Command.setSOWKeys ( string  sowKeys)
inline

The SowKeys for a command are a comma-separated list of the keys that AMPS assigns to SOW messages. The SOW key for a message is available through the Message#getSowKeys method on a message.

Parameters
sowKeysthe sow keys to set

◆ setSowKeys()

Command AMPS.Client.Command.setSowKeys ( string  sowKeys)
inline

The SowKeys for a command are a comma-separated list of the keys that AMPS assigns to SOW messages. The SOW key for a message is available through the Message#getSowKeys method on a message.

Parameters
sowKeysthe sow keys to set

◆ setTopic()

Command AMPS.Client.Command.setTopic ( byte[]  topic,
int  offset,
int  length 
)
inline
Parameters
topicThe raw bytes to be used for the topic.
offsetThe offset into topic where the topic data begins
lengthThe length of the topic.

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