AMPS C# Client
5.3.3.4
AMPS C# Client for .NET
|
All communication with AMPS occurs through passing Messages. The AMPS clients provide named convenience methods for core AMPS functionality. These named methods work by creating and sending Messages to AMPS. More...
Classes | |
class | Options |
Represents the possible values for message options in an AMPS command. Options in a message are combined in to a comma-delimited list. Each of these option values is comma-terminated, so they can be easily combined by simple string concatenation. More... | |
Public Types | |
enum class | Commands : int { Unknown = 0 , Publish = 1 , Subscribe = 2 , Unsubscribe = 4 , SOW = 8 , Heartbeat = 16 , SOWDelete = 32 , DeltaPublish = 64 , Logon = 128 , SOWAndSubscribe = 256 , DeltaSubscribe = 512 , SOWAndDeltaSubscribe = 1024 , StartTimer = 2048 , StopTimer = 4096 , GroupBegin = 8192 , GroupEnd = 16384 , OOF = 32768 , Ack = 65536 , Flush = 131072 , NoDataCommands } |
Tells AMPS how to interpret a message. Without a command, AMPS will reject the message. The relevancy or meaning of other Message fields like options will depend upon the value of its command field. More... | |
enum class | AckTypes : int { None = 0 , Received = 1 , Parsed = 2 , Processed = 4 , Persisted = 8 , Completed = 16 , Stats = 32 } |
Enum of maskable ints that represent the available types of Message acknowledgement. AMPS.Client.Command::getAckType() AMPS.Client.Command::setAckType(int) AMPS.Client.Command::addAckType(int) More... | |
enum class | State : int { None , Success , Failure , Retry } |
Enum of ints that represent the possible values for Message status. More... | |
enum class | Reasons : int { None = 0 , Duplicate = 1 , BadFilter = 2 , BadRegexTopic = 3 , SubscriptionAlreadyExists = 4 , Deleted = 5 , Expired = 6 , Match = 7 , InvalidTopic = 8 , NameInUse = 9 , AuthFailure = 10 , NotEntitled = 11 , AuthDisabled = 12 , InvalidBookmark = 13 , InvalidOrderBy = 14 , SubidInUse = 15 , NoTopic = 16 , LogonFailed = 17 , LogonRequired = 18 , InvalidTopicOrFilter = 19 , InvalidSubId = 20 , NoTopicOrFilter = 21 , NoClientName = 22 , BadSowKey = 23 , RegexTopicNotSupported = 24 , SowStoreFailed = 25 , ParseError = 26 , NotSupported = 27 , TxStoreFailure = 28 , DuplicateLogon = 29 , TxnReplayFailed = 30 , SowCanceled = 31 , InvalidOptions = 32 , InvalidMessageType = 33 , OrderByTooLarge = 34 , RejectedByTransportFilter = 35 , SowDeleteInvalid = 36 , PublishFilterNoMatch = 37 , Other = 38 } |
Enum of ints that represent the possible values for a Message reason. AMPS.Client.Message::setReason(int) AMPS.Client.Message::getReason() More... | |
enum class | SerializationResult { OK , BufferTooSmall } |
Public Member Functions | |||||||
Message (Encoding encoder, Encoding decoder) | |||||||
void | setBookmarkSeqNo (long val) | ||||||
Sets the bookmark sequence number for this message. The BookmarkSeqNo is used by bookmark stores to track messages. More... | |||||||
long | getBookmarkSeqNo () | ||||||
Returns the bookmark sequence number for this message. The BookmarkSeqNo is used by bookmark stores to track messages. More... | |||||||
abstract SerializationResult | serialize (System.IO.MemoryStream buffer) | ||||||
Message | reset () | ||||||
Resets all of the Field members to null. More... | |||||||
Message.AckTypes | getAckType () | ||||||
Returns the type of acknowledgement for an acknowledgement Message. More... | |||||||
Message.AckTypes | getAckTypeOutgoing () | ||||||
Returns the type of acknowledgement for an outgoing Message. More... | |||||||
Message | setAckType (Message.AckTypes v) | ||||||
Sets the type of acknowledgement for an acknowledgement message. More... | |||||||
bool | isAckTypeNull () | ||||||
Checks whether the AckType field is null. More... | |||||||
int | getBatchSize () | ||||||
Returns the batch size of this message. More... | |||||||
Message | setBatchSize (int v) | ||||||
Sets the batch size for this message. More... | |||||||
bool | isBatchSizeNull () | ||||||
Checks to see if the batch size is null. More... | |||||||
String | getBookmark () | ||||||
Returns the AMPS bookmark for this message. The bookmark is an identifier assigned to AMPS to locate a Message in the transaction log. More... | |||||||
BookmarkField | getBookmarkRaw () | ||||||
Gets the raw value for the AMPS bookmark. The bookmark is an identifier assigned to AMPS to locate a Message in the transaction log. More... | |||||||
Message | setBookmark (String v) | ||||||
Sets the value of the AMPS bookmark. The bookmark is an identifier assigned by AMPS to locate a message in the transaction log. Setting the bookmark is used for commands that locate messages in the log, such as bookmark subscribe or historical SOW query. Setting the bookmark on a publish message has no effect. More... | |||||||
Message | setBookmark (byte[] buffer, int offset, int length) | ||||||
Sets the value of the AMPS bookmark. The bookmark is an identifier assigned by AMPS to locate a message in the transaction log. Setting the bookmark is used for commands that locate messages in the log, such as bookmark subscribe or historical SOW query. Setting the bookmark on a publish message has no effect. More... | |||||||
bool | isBookmarkNull () | ||||||
Checks to see if the bookmark field is null. More... | |||||||
String | getClientName () | ||||||
Gets the ClientName on this Message. More... | |||||||
Field | getClientNameRaw () | ||||||
Gets the ClientName on this Message. More... | |||||||
Message | setClientName (String v) | ||||||
Sets the name of the Client sending the Message. More... | |||||||
Message | setClientName (byte[] buffer, int offset, int length) | ||||||
Sets the name of the Client sending the Message. More... | |||||||
bool | isClientNameNull () | ||||||
Checks whether the ClientName field is null. More... | |||||||
String | getCommandId () | ||||||
Gets the CommandId for this Message. CommandId is an identifier set by the client that is used to correlate later Messages. For example, the client sets a CommandId on a subscription request to AMPS, and can later use that CommandId to unsubscribe. More... | |||||||
Field | getCommandIdRaw () | ||||||
Gets the CommandId for this Message. CommandId is an identifier set by the client that is used to correlate later Messages. For example, the client sets a CommandId on a subscription request to AMPS, and can later use that CommandId to unsubscribe. More... | |||||||
bool | getCommandId (CommandId v) | ||||||
Gets the CommandId for this Message. CommandId is an identifier set by the client that is used to correlate later Messages. For example, the client sets a CommandId on a subscription request to AMPS, and can later use that CommandId to unsubscribe. The CommandId is returned on ack messages in response to the command. More... | |||||||
Message | setCommandId (String v) | ||||||
Sets the CommandId for this Message. CommandId is an identifier set by the client that is used to correlate later Messages and Commands. For example, the client sets a CommandId on a subscription request to AMPS, and can later use that CommandId to unsubscribe. The CommandId is returned on ack messages in response to the command. More... | |||||||
Message | setCommandId (CommandId v) | ||||||
Sets the CommandId for this Message. CommandID is an identifier set by the client that is used to correlate later Messages and Commands. For example, the client sets a CommandId on a subscription request to AMPS, and can later use that CommandId to unsubscribe. The CommandId is returned on ack messages in response to the command. More... | |||||||
Message | setCommandId (byte[] buffer, int offset, int length) | ||||||
Sets the CommandId for this Message. CommandId is an identifier set by the client that is used to correlate later Messages and Commands. For example, the client sets a CommandId on a subscription request to AMPS, and can later use that CommandId to unsubscribe. The CommandId is returned on ack messages in response to the command. More... | |||||||
bool | isCommandIdNull () | ||||||
Checks to see if the CommandId is null. More... | |||||||
Commands | getCommand () | ||||||
Returns the Command for this Message, indicating the type of message this is. The fields that are supported by this message, and how they are set and interpreted, depend on the type of message. See the AMPS Command reference for details. More... | |||||||
Message | setCommand (Commands v) | ||||||
Sets the Command for this Message, indicating the type of messagethis is. The fields that are supported by this message, and how they are set and interpreted, depend on the type of message. See the AMPS Command reference for details. More... | |||||||
bool | isCommandNull () | ||||||
Checks to see if the Command is null. More... | |||||||
virtual String | getData () | ||||||
Returns the payload of the Message. More... | |||||||
Field | getDataRaw () | ||||||
Returns the payload of the Message. More... | |||||||
Message | setData (String v) | ||||||
Sets the payload of the Message. More... | |||||||
Message | setData (byte[] buffer, int offset, int length) | ||||||
Sets the payload of the Message. More... | |||||||
bool | isDataNull () | ||||||
Checks to see if the data field is null. More... | |||||||
IntegerField | getExpirationRaw () | ||||||
Returns the Expiration field set for this Message. More... | |||||||
int | getExpiration () | ||||||
Returns the Expiration field for this Message. More... | |||||||
Message | setExpiration (int v) | ||||||
Sets the Expiration for a Message. More... | |||||||
bool | isExpirationNull () | ||||||
Checked whether the Expiration is field is null. More... | |||||||
String | getFilter () | ||||||
Returns the Filter field for this Message. More... | |||||||
Field | getFilterRaw () | ||||||
Returns the Filter field on this Message. More... | |||||||
Message | setFilter (String v) | ||||||
Sets the Filter field on this Message. More... | |||||||
Message | setFilter (byte[] buffer, int offset, int length) | ||||||
Sets the Filter field on this Message. More... | |||||||
bool | isFilterNull () | ||||||
Checks to see if the Filter is null on this Message. More... | |||||||
String | getOrderBy () | ||||||
Get the OrderBy parameter for this Message. For commands that support ordering, this parameter provides the order in which AMPS returns results. More... | |||||||
Field | getOrderByRaw () | ||||||
Gets the OrderBy parameter for this Message. For commands that support ordering, this parameter provides the order in which AMPS returns results. More... | |||||||
Message | setOrderBy (String v) | ||||||
Set the OrderBy parameter for this Message. For commands that support ordering, this parameter provides the order in which AMPS returns results. See the AMPS User Guide for details. More... | |||||||
Message | setOrderBy (byte[] buffer, int offset, int length) | ||||||
Set the OrderBy parameter for this Message. For commands that support ordering, this parameter provies the order in which AMPS returns results. See the AMPS User Guide for details. More... | |||||||
bool | isOrderByNull () | ||||||
Checks to see if the OrderBy parameter is null. More... | |||||||
long | getGroupSeqNo () | ||||||
Get the GroupSeqNo. The group sequence number is the number of the batch within the SOW response, and is set on incoming messages by the AMPS client. More... | |||||||
Message | setGroupSeqNo (long v) | ||||||
Set the GroupSeqNo. The group sequence number is the number of the batch within the SOW response, and is set on incoming messages by the AMPS client. More... | |||||||
bool | isGroupSeqNoNull () | ||||||
Checks whether the GroupSeqNo field is null. More... | |||||||
long | getMatches () | ||||||
Returns the number of matches in the command this Message acknowledges. This header is provided on an acknowledgement message that includes information on the number of matches. See the AMPS Command Reference for details. More... | |||||||
Message | setMatches (long v) | ||||||
Sets the matches field on this Message. This header is typically provided by AMPS. More... | |||||||
bool | isMatchesNull () | ||||||
Checks whether the Matches field is null. More... | |||||||
String | getMessageType () | ||||||
Returns the MessageType on this client. MessageType is used to specify the message type given in the URI. More... | |||||||
Message | setMessageType (String v) | ||||||
Sets the MessageType on this client. MessageType is used to specify the message type given in the URI. More... | |||||||
bool | isMessageTypeNull () | ||||||
Checks whether the MessageType field is null. More... | |||||||
string | getPassword () | ||||||
Returns the Password set on this Message. This field is typically used during the logon sequence. More... | |||||||
Field | getPasswordRaw () | ||||||
Returns the Password set on this Message. This field is typically used during the logon sequence. More... | |||||||
Message | setPassword (byte[] data, int offset, int length) | ||||||
Set the Password on the Message. This field is typically used during the logon sequence. More... | |||||||
Message | setPassword (string password) | ||||||
Set the password on the Message. This field is typically used during the logon sequence. More... | |||||||
int | getLength () | ||||||
Returns the Length of the Message. More... | |||||||
Message | setLength (int v) | ||||||
Sets the Length of the Message. This field is typically set by the AMPS Client API rather than by application code. More... | |||||||
bool | isPasswordNull () | ||||||
Checks whether the Password field is null. More... | |||||||
Field | getOptionsRaw () | ||||||
Returns the Options to be seet on this Message. More... | |||||||
string | getOptions () | ||||||
Returns the Options to be set on this Message. More... | |||||||
Message | setOptions (string options) | ||||||
Sets the Options for this Message. Options are a comma-delimited list of parameters. The values accepted for options depend on the command: see the AMPS Command Reference for details. More... | |||||||
bool | isOptionsNull () | ||||||
Checks to see if the Options field is null. More... | |||||||
String | getQueryId () | ||||||
Returns the QueryId for this Message. More... | |||||||
Field | getQueryIdRaw () | ||||||
Returns the QueryId for this Message. More... | |||||||
bool | isQueryIdNull () | ||||||
Checks whether the QueryId field is null. More... | |||||||
bool | getQueryId (CommandId v) | ||||||
Returns the QueryId for this Message by copying it into the provided CommandId. More... | |||||||
Message | setQueryId (String v) | ||||||
Sets the QueryId field for this Message. Typically, the QueryId is set by the AMPS client on incoming messages. More... | |||||||
Message | setQueryId (CommandId v) | ||||||
Sets the QueryId for this Message by copying it from a CommandId object. Typically, the QueryId is set for incoming messages by the AMPS Client. More... | |||||||
Message | setQueryId (byte[] buffer, int offset, int position) | ||||||
Set the QueryId for this Message. Typically, the QueryId is set for incoming messages by the AMPS Client. More... | |||||||
Reasons | getReason () | ||||||
Returns the Reason value for this Message. The Reason is set on acknowledgement messages to provide more information about the acknowledgement. More... | |||||||
string | getReasonText () | ||||||
Returns the Reason value for this Message. Typically, the Reason is set for incoming messages by the AMPS Client. More... | |||||||
Message | setReason (Reasons v) | ||||||
Set the Reason value for this Message. Typically, the Reason is set for incoming messages by the AMPS Client. More... | |||||||
bool | isReasonNull () | ||||||
Checks whether the Reason is null. More... | |||||||
long | getRecordsDeleted () | ||||||
Returns the number of records deleted for the command that this Message was produced in response to. This header is provided on an acknowledgement message. See the AMPS Command Reference for more details. More... | |||||||
Message | setRecordsDeleted (long v) | ||||||
Sets the records deleted header field. This header is provided on an acknowledgement message. An application does not typically need to set this field. See the AMPS Command Reference for details. More... | |||||||
bool | isRecordsDeletedNull () | ||||||
Checks whether the RecordsDeleted field is null. More... | |||||||
long | getRecordsInserted () | ||||||
Returns the number of records inserted for the command that this Message was produced for. This header is provided on an acknowledgement message that includes information on the number of records inserted. See the AMPS Command Reference for details. More... | |||||||
Message | setRecordsInserted (long v) | ||||||
Sets the Records Inserted field. This header is provided on an acknowledgement message. An application typically does not need to set this field. See the AMPS Command Reference for details. More... | |||||||
bool | isRecordsInsertedNull () | ||||||
Checks whether the RecordsInserted field is null. More... | |||||||
long | getRecordsUpdated () | ||||||
Returns the number of records updated for the command that this Message was produced in response to. More... | |||||||
Message | setRecordsUpdated (long v) | ||||||
Sets the RecordsUpdated header field. More... | |||||||
bool | isRecordsUpdatedNull () | ||||||
Checks whether the RecordsUpdated field is null. More... | |||||||
long | getRecordsReturned () | ||||||
Returns the number of records returned for the command that this Message was produced in response to. More... | |||||||
Message | setRecordsReturned (long v) | ||||||
Sets the RecordsReturned header field. More... | |||||||
bool | isRecordsReturnedNull () | ||||||
Checks whether the RecordsReturned field is null. More... | |||||||
Field | getSequenceRaw () | ||||||
Returns the sequence number for this Message. More... | |||||||
ulong | getSequence () | ||||||
Returns the sequence number for this Message. More... | |||||||
Message | setSequence (ulong v) | ||||||
Sets the sequence number for this Message. More... | |||||||
bool | isSequenceNull () | ||||||
Checks whether the Sequence field is null. More... | |||||||
String | getSowKey () | ||||||
Returns the SowKey for this Message. More... | |||||||
Field | getSowKeyRaw () | ||||||
Returns the SowKey for this Message. More... | |||||||
Message | setSowKey (String v) | ||||||
Sets the SowKey for this Message. More... | |||||||
Message | setSowKey (byte[] buffer, int offset, int length) | ||||||
Sets the SowKey for this Message. More... | |||||||
bool | isSowKeyNull () | ||||||
Checks whether the SowKey field is null. More... | |||||||
String | getSowKeys () | ||||||
Gets the set of SowKeys this message applies to. More... | |||||||
Field | getSowKeysRaw () | ||||||
Message | setSowKeys (String v) | ||||||
Sets the set of SowKeys this message applies to, as a comma-delimited list of identifiers. This can be useful for commands that operate on multiple SOW records, such as a sow_delete that specifies a set of keys to remove. More... | |||||||
Message | setSowKeys (byte[] buffer, int offset, int length) | ||||||
Sets the set of SowKeys this message applies to, as a comma-delimited list of identifiers. This can be useful for commands that operate on multiple SOW records, such as a sow_delete that specifies a set of keys to remove. More... | |||||||
bool | isSowKeysNull () | ||||||
Checks whether the SowKeys field is null. More... | |||||||
State | getStatus () | ||||||
Returns the Status of this Message. More... | |||||||
Message | setStatus (State v) | ||||||
Sets the Status of this Message. More... | |||||||
bool | isStatusNull () | ||||||
Checks to see whether the Status field is null. More... | |||||||
String | getSubId () | ||||||
Gets the SubId of this Message. More... | |||||||
Field | getSubIdRaw () | ||||||
Gets the SubId of this Message. More... | |||||||
bool | getSubId (CommandId v) | ||||||
Gets the SubId of this Message by copying it into the provided CommandId. More... | |||||||
Message | setSubId (String v) | ||||||
Sets the SubId of this Message. More... | |||||||
Message | setSubId (CommandId v) | ||||||
Sets the SubId of this Message by copying it from a CommandId object. More... | |||||||
Message | setSubId (byte[] buffer, int offset, int length) | ||||||
Sets the SubId of this Message. More... | |||||||
bool | isSubIdNull () | ||||||
Checks whether the SubId field is null. More... | |||||||
String | getSubIds () | ||||||
The set of SubIds for this Message. AMPS returns a SubId for each subscription that matches the message as a comma-delimited list. More... | |||||||
Field | getSubIdsRaw () | ||||||
The set of SubIds for this message. AMPS returns a SubId for each subscription that matches the message as a comma-delimited list. More... | |||||||
Message | setSubIds (String v) | ||||||
The set of SubIds for this message. AMPS returns a SubId for each subscription that matches the message as a comma-delimited list. More... | |||||||
Message | setSubIds (byte[] buffer, int offset, int length) | ||||||
The set of SubIds for this message. AMPS returns a SubId for each subscription that matches the message. More... | |||||||
bool | isSubIdsNull () | ||||||
Checks whether the SubIds field is null. More... | |||||||
String | getTimestamp () | ||||||
Returns the timestamp for this message, an ISO-8601 formatted string. The timestamp is set by AMPS at the time that AMPS processes the message. More... | |||||||
Field | getTimestampRaw () | ||||||
Returns the timestamp for this message, an ISO-8601 formatted string. The timestamp is set by AMPS at the time that AMPS processes the message. More... | |||||||
Message | setTimestamp (String v) | ||||||
Sets the Timestamp for this Message. The timestamp is set by AMPS at the time that AMPS processes the message. There is generally no need to set this field in your application. More... | |||||||
Message | setTimestamp (byte[] buffer, int offset, int length) | ||||||
Sets the timestamp for this message. The timestamp is set by AMPS at the time that AMPS processes the message. There is generally no need to set this field in your application. More... | |||||||
bool | isTimestampNull () | ||||||
Checks to see if the Timestamp field is null. More... | |||||||
long | getTopN () | ||||||
Get the TopN parameter for this message. For commands that support limiting the number of messages in the result set, this parameter provides the limit to AMPS. More... | |||||||
Message | setTopN (long v) | ||||||
Set the TopN parameter for this message. For commands that support limiting the number of messages in the result set, this parameter provides the limit to AMPS. More... | |||||||
bool | isTopNNull () | ||||||
Checks to see whether the TopN parameter for this message is null. For commands that support limiting the number of messgaes in the result set, this parameter provides the limit to AMPS. More... | |||||||
String | getTopic () | ||||||
Return the topic that the message applies to. More... | |||||||
Field | getTopicRaw () | ||||||
Return the topic that the message applies to. More... | |||||||
Message | setTopic (String v) | ||||||
Set the topic that the message applies to. More... | |||||||
Message | setTopic (byte[] buffer, int offset, int length) | ||||||
Set the topic that the message applies to. More... | |||||||
bool | isTopicNull () | ||||||
Checks whether the Topic field is null. More... | |||||||
long | getTopicMatches () | ||||||
Returns the number of matching topics for the command that this message was produced in response to. More... | |||||||
Message | setTopicMatches (long v) | ||||||
Sets the topic matches field on this message. This header is typically provided by AMPS. More... | |||||||
bool | isTopicMatchesNull () | ||||||
Checks to see if the topic matches field on this message is null. More... | |||||||
String | getUserId () | ||||||
Get the UserId for this message. This field is typically set during the logon sequence. The field may also be provided on published messages, depending on the authentication used in AMPS. When provided on a published message, AMPS provides the identity of the connection that sent the message, not the value provided with the message as published. More... | |||||||
Field | getUserIdRaw () | ||||||
Get the UserId for this message. This field is typically set during the logon sequence. The field may also be provided on published messages, depending on the authentication used in AMPS. When provided on a published message, AMPS provides the identity of the connection that sent the message, not the value provided with the message as published. More... | |||||||
Message | setUserId (String v) | ||||||
Set the UserId for this message. This field is typically set during the logon sequence. The field may also be provided on published messages, depending on the authentication used in AMPS. When provided on a published message, AMPS provides the identity of the connection that sent the message, not the value provided with the message as published. Therefore, applications generally only set this value during logon. More... | |||||||
Message | setUserId (byte[] buffer, int offset, int length) | ||||||
Set the UserId for this message. This field is typically set during the logon sequence. The field may also be provided on published messages, depending on the authentication used in AMPS. When provided on a published message, AMPS provides the identity of the connection that sent the message, not the value provided with the message as published. Therefore, applications generally only set this value during logon.
| |||||||
bool | isUserIdNull () | ||||||
Checks to see if the UserId field is null. More... | |||||||
String | getVersion () | ||||||
Returns the version of the AMPS server, provided in response to a logon. More... | |||||||
Field | getVersionRaw () | ||||||
Returns the version of the AMPS server, provided in response to a logon. More... | |||||||
int | getVersionAsInt () | ||||||
Returns the version of the AMPS server, provided in response to a logon. More... | |||||||
Message | setVersion (String v) | ||||||
Sets the version field of this message. This is typically done by the AMPS client API when a message with this field set is received. More... | |||||||
Message | setVersion (byte[] buffer, int offset, int length) | ||||||
Sets the version field of this message. This is typically done by the AMPS client API when a message with this field set is received. More... | |||||||
bool | isVersionNull () | ||||||
Checks to see if the Version field is null. More... | |||||||
String | getCorrelationId () | ||||||
Get the CorrelationId on this message. The CorrelationId is an opaque identifier provided by the publisher of a message. AMPS provides the identifier to subscribers of the message without interpreting or changing the identifier. More... | |||||||
Message | setCorrelationId (String correlationId_) | ||||||
Set the CorrelationId on this message. The CorrelationId is an opaque identifier provided by the publisher of a message. AMPS provides the identifier to subscribers of the message without interpreting or changing the identifier. More... | |||||||
StringField | getCorrelationIdRaw () | ||||||
Get the CorrelationId on this message. The CorrelationId is an opaque identifier provided by the publisher of a message. AMPS provides the identifier to subscribers of the message without interpreting or changing the identifier. More... | |||||||
bool | isCorrelationIdNull () | ||||||
Checks to see if the CorrelationId field is null. More... | |||||||
bool | isLeasePeriodNull () | ||||||
Returns true if the LeasePeriod field is null More... | |||||||
String | getLeasePeriod () | ||||||
Returns the value of the LeasePeriod field More... | |||||||
StringField | getLeasePeriodRaw () | ||||||
Returns the raw value of the LeasePeriod field More... | |||||||
override string | ToString () | ||||||
abstract Message | copy () | ||||||
void | setBuffer (byte[] buffer) | ||||||
byte[] | getBuffer () | ||||||
void | setRawBufferOffset (int offset) | ||||||
int | getRawBufferOffset () | ||||||
void | setRawBufferLength (int length) | ||||||
int | getRawBufferLength () | ||||||
Client | getClient () | ||||||
Returns the Client who allocated this message. More... | |||||||
void | ack (String options=null) | ||||||
Acks the message to the server if it was a Queue message. More... | |||||||
void | ack (Field options) | ||||||
Acks the message to the server if it was a Queue message. More... | |||||||
bool | isIgnoreAutoAck () | ||||||
void | setIgnoreAutoAck () | ||||||
Public Attributes | |
Encoding | encoder = null |
Encoding | decoder = null |
StringField | _Version = new StringField() |
Static Protected Attributes | |
const int | MINIMUM_SERVER_VERSION = Client.DEFAULT_SERVER_VERSION |
Properties | |
String | LeasePeriod [get] |
Returns the value of the LeasePeriod field More... | |
Client | Client [get] |
The Client who allocated this message. More... | |
Int64 | GroupSeqNo [get, set] |
Int64 | Matches [get, set] |
Int32 | Length [get, set] |
String | QueryId [get, set] |
Reasons | Reason [get, set] |
Int64 | RecordsInserted [get, set] |
Int64 | RecordsUpdated [get, set] |
Int64 | RecordsDeleted [get, set] |
Int64 | RecordsReturned [get, set] |
UInt64 | Sequence [get, set] |
String | SowKey [get, set] |
String | SowKeys [get, set] |
State | Status [get, set] |
String | SubId [get, set] |
String | SubIds [get, set] |
String | Timestamp [get, set] |
Int64 | TopN [get, set] |
String | Topic [get, set] |
Int64 | TopicMatches [get, set] |
String | UserId [get, set] |
String | Password [get, set] |
String | Data [get, set] |
AckTypes | AckType [get, set] |
Int32 | BatchSize [get, set] |
String | Bookmark [get, set] |
String | ClientName [get, set] |
String | CommandId [get, set] |
Commands | Command [get, set] |
Int32 | Expiration [get, set] |
String | Filter [get, set] |
String | OrderBy [get, set] |
String | CorrelationId [get, set] |
All communication with AMPS occurs through passing Messages. The AMPS clients provide named convenience methods for core AMPS functionality. These named methods work by creating and sending Messages to AMPS.
|
strong |
Enum of maskable ints that represent the available types of Message acknowledgement. AMPS.Client.Command::getAckType() AMPS.Client.Command::setAckType(int) AMPS.Client.Command::addAckType(int)
|
strong |
|
strong |
Enum of ints that represent the possible values for a Message reason. AMPS.Client.Message::setReason(int) AMPS.Client.Message::getReason()
|
strong |
Enum of ints that represent the possible values for Message status.
|
inline |
Acks the message to the server if it was a Queue message.
options | The optional options to use for the ack, such as "cancel". |
|
inline |
Acks the message to the server if it was a Queue message.
options | The optional options to use for the ack, such as "cancel". |
|
inline |
Returns the type of acknowledgement for an acknowledgement Message.
|
inline |
Returns the type of acknowledgement for an outgoing Message.
|
inline |
Returns the batch size of this message.
|
inline |
|
inline |
Gets the raw value for the AMPS bookmark. The bookmark is an identifier assigned to AMPS to locate a Message in the transaction log.
The Raw variation of this getter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulates the data. It does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer for the field is the lifetime of the Message. If you need the data to persist longer than the lifetime of the Message, you must copy the Field.
|
inline |
Returns the bookmark sequence number for this message. The BookmarkSeqNo is used by bookmark stores to track messages.
|
inline |
Gets the byte buffer used by the message.
|
inline |
|
inline |
Gets the ClientName on this Message.
|
inline |
Gets the ClientName on this Message.
The RAW variation of this getter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulates the data. This does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer for the field is the lifetime of the Message. If you need the data to persist longer than the lifetime of the Message, you must copy the Field.
|
inline |
|
inline |
|
inline |
Gets the CommandId for this Message. CommandId is an identifier set by the client that is used to correlate later Messages. For example, the client sets a CommandId on a subscription request to AMPS, and can later use that CommandId to unsubscribe. The CommandId is returned on ack messages in response to the command.
v | The object to hold the value of the CommandId object. |
|
inline |
Gets the CommandId for this Message. CommandId is an identifier set by the client that is used to correlate later Messages. For example, the client sets a CommandId on a subscription request to AMPS, and can later use that CommandId to unsubscribe.
The RAW variation of this getter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulates the data. This does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer for the field is the lifetime of the Message. If you need the data to persist longer than the lifetime of the Message, you must copy the Field.
|
inline |
|
inline |
Get the CorrelationId on this message. The CorrelationId is an opaque identifier provided by the publisher of a message. AMPS provides the identifier to subscribers of the message without interpreting or changing the identifier.
The Raw variation of this getter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulates the data. This does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer for the field is the lifetime of the Message. If you need the data to persist longer than the lifetime of the Message, you must copy the Field.
|
inlinevirtual |
|
inline |
Returns the payload of the Message.
The RAW variation of this getter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulates the data. This does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer of the field is the lifetime of the Message. If you need the data to persist longer than the lifetime of the Message, you must copy the Field.
|
inline |
Returns the Expiration field for this Message.
The RAW variation of this getter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulatees the data. This does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer for the field is the lifetime of the Message. If you need the data to persist longer than the lifetime of the Messgae, then you must copy the Field.
|
inline |
|
inline |
|
inline |
Returns the Filter field on this Message.
Filters are used for commands that provide content filtering, such as SOW queries, subscriptions, and SOW delete. The RAW variation of this getter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulates the data. This does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer for the field is the lifetime of the Message. If you need the data to persist longer than the lifetime of the Message, you must copy the Field.
|
inline |
|
inline |
Returns the value of the LeasePeriod field
|
inline |
Returns the raw value of the LeasePeriod field
|
inline |
Returns the Length of the Message.
|
inline |
|
inline |
Returns the MessageType on this client. MessageType is used to specify the message type given in the URI.
|
inline |
|
inline |
Returns the Options to be seet on this Message.
The RAW variation of this getter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulates the data. This does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer for the field is the lifetime of the Message. If you need the data to persist longer than the lifetime of the Message, you must copy the Field.
|
inline |
|
inline |
Gets the OrderBy parameter for this Message. For commands that support ordering, this parameter provides the order in which AMPS returns results.
The RAW variation of this getter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulates the data. This does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer for the field is the lifetime of the Message. If you need the data to persist longer than the lifetime of the Message, you must copy the Field.
|
inline |
|
inline |
Returns the Password set on this Message. This field is typically used during the logon sequence.
The RAW variation of this geetter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulates the data. This does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer for the field is the lifetime of the Message. If you need the data to persist longer than the lifetime of the Message, you must copy the Field.
|
inline |
Returns the QueryId for this Message.
The QueryId returned on a message is the CommandId of the command that ran the query. For example, when sending a SOW command to AMPS, messages returned in response to that command will have the QueryId set to the CommandId of the SOW command.
|
inline |
Returns the QueryId for this Message by copying it into the provided CommandId.
The QueryId returned on a message is the CommandId of the command that ran the query. For example, when sending a SOW command to AMPS, messages returned in response to that command will have the QueryId set to the CommandId of the SOW command.
v | The CommandId to be used to copy the QueryId. |
|
inline |
Returns the QueryId for this Message.
The QueryId returned on a message is the CommandId of the command that ran the query. For example, when sending a SOW command to AMPS, messages returned in response to that command will have the QueryId set to the CommandId of the SOW command. The RAW variation of this getter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulates the data. This does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer is the lifetime of the Message. If you need the data to persist longer than the lifetime of the Message, you must copy the Field.
|
inline |
Gets the length of the message within the byte buffer.
|
inline |
Gets the offset into the byte buffer where this message begins.
|
inline |
|
inline |
|
inline |
|
inline |
Returns the number of records inserted for the command that this Message was produced for. This header is provided on an acknowledgement message that includes information on the number of records inserted. See the AMPS Command Reference for details.
|
inline |
|
inline |
|
inline |
Returns the sequence number for this Message.
On outgoing messages, this field is typically set by the AMPS client. The sequence number is used by AMPS for duplicate detection. Each combination of client name and sequence number should be a unique message. In response to a logon, AMPS may return the last sequence number received from a client to assist in recovery.
|
inline |
Returns the sequence number for this Message.
On outgoing messages, this field is typically set by the AMPS client. The sequence number is used by AMPS for duplicate detection. Each combination of client name and sequence number should be a unique message. In response to a login, AMPS may return the last sequence number received from a client to assist in recovery. The Raw variation of this getter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulates the data. This does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer for the field is the lifetime of the Message. If you need the data to persist longer than the lifetime of the Message, you must copy the Field.
|
inline |
|
inline |
Returns the SowKey for this Message.
The SowKey is an opaque identifier used to uniquely identify a SOW record within AMPS> For messages received from a SOW, AMPS provides the SowKey on each message. The Raw variation of this getter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulates the data. This does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer is the lifetime of the Message. If you need the data to persist longer than the lifetime of the Message, you must copy the Field.
|
inline |
|
inline |
Returns the set of SowKeys this message applies to.
The SowKey is an opaque identifier used to uniquely identify a SOW record within AMPS> For messages received from a SOW, AMPS provides the SowKey on each message. The Raw variation of this getter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulates the data. This does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer is the lifetime of the Message. If you need the data to persist longer than the lifetime of the Message, you must copy the Field.
|
inline |
|
inline |
|
inline |
|
inline |
Gets the SubId of this Message.
The SubId is a reference to the CommandId of the command that created the subscription. The Raw variation of this getter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulates the data. This does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer for the field is the lifetime of the Message. If you need the data to persist longer than the lifetime ofthe Message, you must copy the Field.
|
inline |
|
inline |
The set of SubIds for this message. AMPS returns a SubId for each subscription that matches the message as a comma-delimited list.
The SubId is the identifier provided when the subscription was registered with AMPS. The Raw variation of this getter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulates the data. This does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer for the field is the lifetime of the Message. If you need the data to persist longer than the lifetime of the Message, you must copy the Field.
|
inline |
|
inline |
Returns the timestamp for this message, an ISO-8601 formatted string. The timestamp is set by AMPS at the time that AMPS processes the message.
The Raw variation of this getter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulates the data. This does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer for the field is the lifetime of the Message. If you need the data to persist longer than the lifetime of the Message, you must copy the Field.
|
inline |
Return the topic that the message applies to.
|
inline |
Returns the number of matching topics for the command that this message was produced in response to.
This header is provided on an acknowledgement message that includes information on the number of records inserted. See the AMPS Command Reference for details.
|
inline |
Return the topic that the message applies to.
The Raw variation of this getter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulates the data. This does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer for the field is the lifetime of the Message. If you need the data to persist longer than the lifetime of the Message, you must copy the Field.
|
inline |
|
inline |
Get the UserId for this message. This field is typically set during the logon sequence. The field may also be provided on published messages, depending on the authentication used in AMPS. When provided on a published message, AMPS provides the identity of the connection that sent the message, not the value provided with the message as published.
|
inline |
Get the UserId for this message. This field is typically set during the logon sequence. The field may also be provided on published messages, depending on the authentication used in AMPS. When provided on a published message, AMPS provides the identity of the connection that sent the message, not the value provided with the message as published.
The Raw variation of this getter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulates the data. This does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer for the field is the lifetime of the Message. If you need the data to persist longer than the lifetime of the Message, you must copy the Field.
|
inline |
|
inline |
|
inline |
Returns the version of the AMPS server, provided in response to a logon.
The Raw variation of this getter allows for finer-grained performance tuning. It provides direct access to the Field that encapsulates the data. This does not incur any additional allocation or unnecessary decoding of the byte[] in which the data is stored. The lifetime of the underlying buffer for the field is the lifetime of the Message. If you need the data to persist longer than the lifetime of the Message, you must copy the Field.
|
inline |
Checks whether the AckType field is null.
|
inline |
Checks to see if the batch size is null.
|
inline |
Checks to see if the bookmark field is null.
|
inline |
Checks whether the ClientName field is null.
|
inline |
|
inline |
|
inline |
Checks to see if the CorrelationId field is null.
|
inline |
Checks to see if the data field is null.
|
inline |
Checked whether the Expiration is field is null.
|
inline |
Checks to see if the Filter is null on this Message.
|
inline |
Checks whether the GroupSeqNo field is null.
|
inline |
Returns true if the LeasePeriod field is null
|
inline |
Checks whether the Matches field is null.
|
inline |
Checks whether the MessageType field is null.
|
inline |
Checks to see if the Options field is null.
|
inline |
Checks to see if the OrderBy parameter is null.
|
inline |
Checks whether the Password field is null.
|
inline |
Checks whether the QueryId field is null.
|
inline |
Checks whether the Reason is null.
|
inline |
Checks whether the RecordsDeleted field is null.
|
inline |
Checks whether the RecordsInserted field is null.
|
inline |
Checks whether the RecordsReturned field is null.
|
inline |
Checks whether the RecordsUpdated field is null.
|
inline |
Checks whether the Sequence field is null.
|
inline |
Checks whether the SowKey field is null.
|
inline |
Checks whether the SowKeys field is null.
|
inline |
Checks to see whether the Status field is null.
|
inline |
Checks whether the SubId field is null.
|
inline |
Checks whether the SubIds field is null.
|
inline |
Checks to see if the Timestamp field is null.
|
inline |
Checks to see if the topic matches field on this message is null.
|
inline |
Checks whether the Topic field is null.
|
inline |
Checks to see whether the TopN parameter for this message is null. For commands that support limiting the number of messgaes in the result set, this parameter provides the limit to AMPS.
|
inline |
Checks to see if the UserId field is null.
|
inline |
Checks to see if the Version field is null.
|
inline |
Resets all of the Field members to null.
|
inline |
Sets the type of acknowledgement for an acknowledgement message.
v | The value to set as the AckType for the acknowledgement message. |
|
inline |
Sets the batch size for this message.
v | The batch size to set for the message. |
|
inline |
Sets the value of the AMPS bookmark. The bookmark is an identifier assigned by AMPS to locate a message in the transaction log. Setting the bookmark is used for commands that locate messages in the log, such as bookmark subscribe or historical SOW query. Setting the bookmark on a publish message has no effect.
buffer | The byte buffer containing the value for the bookmark. |
offset | The location at which the value begins. |
length | The length of the value in the buffer. |
|
inline |
Sets the value of the AMPS bookmark. The bookmark is an identifier assigned by AMPS to locate a message in the transaction log. Setting the bookmark is used for commands that locate messages in the log, such as bookmark subscribe or historical SOW query. Setting the bookmark on a publish message has no effect.
v | The string used to set the value of the AMPS bookmark. |
|
inline |
Sets the bookmark sequence number for this message. The BookmarkSeqNo is used by bookmark stores to track messages.
val | The value to set as the new BookmarkSeqNo for this message. |
|
inline |
Sets the byte buffer used by the message. It's not common for applications to use this directly.
buffer | the byte buffer to use for the message. |
|
inline |
|
inline |
|
inline |
Sets the CommandId for this Message. CommandId is an identifier set by the client that is used to correlate later Messages and Commands. For example, the client sets a CommandId on a subscription request to AMPS, and can later use that CommandId to unsubscribe. The CommandId is returned on ack messages in response to the command.
buffer | The buffer containing the CommandId on this Message. |
offset | The location at which the CommandId begins. |
length | The length of the CommandId. |
Sets the CommandId for this Message. CommandID is an identifier set by the client that is used to correlate later Messages and Commands. For example, the client sets a CommandId on a subscription request to AMPS, and can later use that CommandId to unsubscribe. The CommandId is returned on ack messages in response to the command.
|
inline |
Sets the CommandId for this Message. CommandId is an identifier set by the client that is used to correlate later Messages and Commands. For example, the client sets a CommandId on a subscription request to AMPS, and can later use that CommandId to unsubscribe. The CommandId is returned on ack messages in response to the command.
|
inline |
Set the CorrelationId on this message. The CorrelationId is an opaque identifier provided by the publisher of a message. AMPS provides the identifier to subscribers of the message without interpreting or changing the identifier.
v | The string used to set the CorrelationId on this message. |
|
inline |
Sets the payload of the Message.
buffer | The buffer containing the data. |
offset | The location at which the data begins. |
length | The length of the data. |
|
inline |
|
inline |
Sets the Expiration for a Message.
The expiration is used on a publish command to set the lifetime of a message. For the lifetime to be processed by AMPS, the message must be published to a SOW topic that supports message expiration. See the AMPS user guide for details.
v | The lifetime of the Message. |
|
inline |
|
inline |
|
inline |
Set the GroupSeqNo. The group sequence number is the number of the batch within the SOW response, and is set on incoming messages by the AMPS client.
v | The number to set as the GroupSeqNo. |
|
inline |
|
inline |
|
inline |
Sets the MessageType on this client. MessageType is used to specify the message type given in the URI.
|
inline |
|
inline |
Set the OrderBy parameter for this Message. For commands that support ordering, this parameter provies the order in which AMPS returns results. See the AMPS User Guide for details.
buffer | The buffer that contains the expression. |
offset | The location at which the expression begins. |
length | The length of the expresson. |
|
inline |
|
inline |
Set the Password on the Message. This field is typically used during the logon sequence.
data | The buffer that contains the Password. |
offset | The location where the Password starts. |
length | The length of the Password. |
|
inline |
|
inline |
|
inline |
|
inline |
Sets the length of the message within the byte buffer.
length | length of message within the buffer. |
|
inline |
Sets the offset into the byte buffer where this message begins.
offset | offset of first byte of message within the buffer. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Sets the sequence number for this Message.
This field is typically set by the AMPS client. The AMPS client uses the sequence number in outgoing messages. The sequence number is used by AMPS for duplicate detection. Each combination of client name and sequence number should be a unique message.
v | The value to set as the sequence number for this Message, in the form of an unsigned long. |
|
inline |
Sets the SowKey for this Message.
The SowKey is an opaque identifier used to uniquely identify a SOW record within AMPS. For messages received from a SOW, AMPS provides the SOW key on each message.
buffer | The buffer that contains the SOW key. |
offset | The location within the buffer where the SOW Key begins. |
length | The length of the SOW Key. |
|
inline |
|
inline |
Sets the set of SowKeys this message applies to, as a comma-delimited list of identifiers. This can be useful for commands that operate on multiple SOW records, such as a sow_delete that specifies a set of keys to remove.
The SowKey is an opaque identifier used to uniquely identify a SOW record within AMPS> For messages received from a SOW, AMPS provides the SOW key on each message.
buffer | The buffer that contains the SOW Key. |
offset | The location within the buffer where the SOW Key begins. |
length | The length of the SOW Key. |
|
inline |
Sets the set of SowKeys this message applies to, as a comma-delimited list of identifiers. This can be useful for commands that operate on multiple SOW records, such as a sow_delete that specifies a set of keys to remove.
The SowKey is an opaque identifier used to uniquely identify a SOW record within AMPS> For messages received from a SOW, AMPS provides the SOW key on each message.
v | A comma-delimited list of identifiers to be set as the SowKeys that this message applies to. |
|
inline |
Sets the SubId of this Message.
The SubId is a reference to the CommandId of the command that created the subscription. For example, messages returned for a subscription contain the SubId of the subscription.
buffer | The buffer that contains the SubId key. |
offset | The location within the buffer where the SubId begins. |
length | The length of the SubId. |
|
inline |
|
inline |
The set of SubIds for this message. AMPS returns a SubId for each subscription that matches the message.
The SubId is the identifier provided when the subscription was registered with AMPS.
buffer | The buffer containing the SubIds for this message. |
offset | The location of where the SubIds begin. |
length | The length of the list of SubIds. |
|
inline |
|
inline |
Sets the timestamp for this message. The timestamp is set by AMPS at the time that AMPS processes the message. There is generally no need to set this field in your application.
buffer | the buffer that contains the timestamp |
offset | the location within the buffer where the timestamp begins |
length | the length of the timestamp |
|
inline |
|
inline |
Set the topic that the message applies to.
buffer | the buffer that contains the Topic |
offset | the location within the buffer where the Topic begins |
length | the length of the Topic |
|
inline |
Set the topic that the message applies to.
v | The string to be set as the Topic that the Message applies to. |
|
inline |
|
inline |
Set the TopN parameter for this message. For commands that support limiting the number of messages in the result set, this parameter provides the limit to AMPS.
v | The value to be set as the TopN parameter. |
|
inline |
Set the UserId for this message. This field is typically set during the logon sequence. The field may also be provided on published messages, depending on the authentication used in AMPS. When provided on a published message, AMPS provides the identity of the connection that sent the message, not the value provided with the message as published. Therefore, applications generally only set this value during logon.
v | The string to be set as the UserId for this Message. |
|
inline |
Sets the version field of this message. This is typically done by the AMPS client API when a message with this field set is received.
buffer | the buffer that contains the version string |
offset | the position where the version string begins |
length | the length of the version string |
|
inline |
|
get |
Returns the value of the LeasePeriod field