public abstract class Message
extends java.lang.Object
Message.Command
API.
The AMPS clients provide named convenience methods for core AMPS
functionality. These named methods work by creating and sending
Messages to AMPS.Modifier and Type | Class and Description |
---|---|
static class |
Message.AckType
Container class of maskable ints that represent the available types of
Message acknowledgement.
|
static class |
Message.Command
Tells AMPS how to interpret a message.
|
static class |
Message.Options
Represents the possible values for message options in an AMPS command.
|
static class |
Message.Reason
Container class of ints that represent the possible
values for Message reason.
|
static class |
Message.SerializationResult
Returned by calls to
serialize(ByteBuffer) |
static class |
Message.Status
Container class of ints that represent the possible
values for Message status.
|
Modifier and Type | Field and Description |
---|---|
protected AckTypeField |
_AckType |
protected IntegerField |
_BatchSize |
protected BookmarkField |
_Bookmark |
protected Client |
_client |
protected StringField |
_ClientName |
protected CommandField |
_Command |
protected StringField |
_CommandId |
protected StringField |
_CorrelationId |
protected StringField |
_Data |
protected IntegerField |
_Expiration |
protected Field[] |
_fields
Need to visit every Field? Use this!
|
protected StringField |
_Filter |
protected LongField |
_GroupSeqNo
When executing a SOW query and AMPS returns a batch of query results,
this sequence number is set on each message within the result batch
to indicate it's postion within the batch.
|
protected StringField |
_LeasePeriod
set by the server messages on messages received from a queue
and indicates the point in time at which the server will break
the lease on the message if the message is still leased to the
subscription.
|
protected IntegerField |
_Length |
protected LongField |
_Matches |
protected StringField |
_MessageType
this is only used for logon commands -- people sometimes try to
use multiple message types over a single connection by setting
message type, but that doesn't work.
|
protected OptionsField |
_Options |
protected StringField |
_OrderBy |
protected StringField |
_Password |
protected StringField |
_QueryId |
protected ReasonField |
_Reason |
protected LongField |
_RecordsDeleted |
protected LongField |
_RecordsInserted |
protected LongField |
_RecordsReturned |
protected LongField |
_RecordsUpdated |
protected LongField |
_Sequence |
protected StringField |
_SowKey |
protected StringField |
_SowKeys |
protected StatusField |
_Status |
protected StringField |
_SubId |
protected StringField |
_SubIds |
protected StringField |
_Timestamp |
protected StringField |
_Topic |
protected LongField |
_TopicMatches |
protected LongField |
_TopN |
protected StringField |
_UserId |
protected StringField |
_Version |
protected java.nio.charset.CharsetDecoder |
decoder
Used by associated
Field classes
to decode byte data |
protected java.nio.charset.CharsetEncoder |
encoder
Used by associated
Field classes
to encode byte data |
Modifier | Constructor and Description |
---|---|
protected |
Message(java.nio.charset.CharsetEncoder encoder,
java.nio.charset.CharsetDecoder decoder) |
Modifier and Type | Method and Description |
---|---|
protected void |
_copyTo(Message destination)
Overwrites destination data with this Message.
|
void |
ack()
Used to acknowledge a queue message is processed.
|
void |
ack(byte[] options,
int optionsPos,
int optionsLen)
Used to acknowledge a queue message is processed.
|
void |
ack(Field options)
Used to acknowledge a queue message is processed.
|
void |
ack(java.lang.String options)
Used to acknowledge a queue message is processed.
|
abstract Message |
copy() |
int |
getAckType()
Returns the type of acknowledgement for an acknowledgement Message.
|
int |
getAckTypeOutgoing()
Returns the type of acknowledgement for an outgoing Message.
|
int |
getBatchSize()
Returns the BatchSize for this Message.
|
java.lang.String |
getBookmark()
Returns the AMPS Bookmark for this Message.
|
BookmarkField |
getBookmarkRaw()
Gets the raw value for the AMPS Bookmark.
|
long |
getBookmarkSeqNo()
Returns the bookmark sequence number for this Message.
|
byte[] |
getBuffer()
Gets the byte buffer used by the Message.
|
Client |
getClient()
Returns the client who allocated this message.
|
java.lang.String |
getClientName()
Gets the ClientName on this Message.
|
Field |
getClientNameRaw()
Gets the ClientName on this Message.
|
int |
getCommand()
Returns the Command for this Message, indicating the type of
of message this is.
|
java.lang.String |
getCommandId()
Gets the CommandId on this Message.
|
boolean |
getCommandId(CommandId v)
Gets the CommandId on this Message by copying it into the provided
CommandId object.
|
Field |
getCommandIdRaw()
Gets the CommandId on this Message.
|
java.lang.String |
getCorrelationId()
Get the CorrelationId on this message.
|
StringField |
getCorrelationIdRaw()
Get the CorrelationId on this message.
|
java.lang.String |
getData()
Returns the payload of the Message.
|
Field |
getDataRaw()
Returns the payload of the Message.
|
java.nio.charset.CharsetDecoder |
getDecoder()
Returns the CharsetDecoder for this Message.
|
java.nio.charset.CharsetEncoder |
getEncoder()
Returns the CharsetEncoder for this Message.
|
int |
getExpiration()
Returns the Expiration field set for this Message.
|
IntegerField |
getExpirationRaw()
Returns the Expiration field set for this Message.
|
java.lang.String |
getFilter()
Returns the Filter field on this Message.
|
Field |
getFilterRaw()
Returns the Filter field on this Message.
|
long |
getGroupSeqNo()
When executing a SOW query and AMPS returns a batch of query results,
this sequence number is set on each message within the result batch
to indicate it's postion within the batch.
|
java.lang.String |
getLeasePeriod()
Gets the decoded version of the LeasePeriod for the Message.
|
StringField |
getLeasePeriodRaw()
Gets the raw version of the LeasePeriod filter for the Message.
|
int |
getLength()
Returns the Length of the Message.
|
long |
getMatches()
Returns the number of matches in the command this Message acknowledges.
|
java.lang.String |
getMessageType()
Returns the MessageType field on this message.
|
java.lang.String |
getOptions()
Returns the Options to be set on this Message.
|
Field |
getOptionsRaw()
Returns the Options to be set on this Message.
|
java.lang.String |
getOrderBy()
Get the OrderBy parameter for this Message.
|
Field |
getOrderByRaw()
Get the OrderBy parameter for this Message.
|
java.lang.String |
getPassword()
Returns the Password set on the Message.
|
Field |
getPasswordRaw()
Returns the Password set on the Message.
|
java.lang.String |
getQueryId()
Returns the QueryId for this Message.
|
boolean |
getQueryId(CommandId v)
Returns the QueryId for this Message by copying it into the provided
CommandId.
|
Field |
getQueryIdRaw()
Returns the QueryId for this Message.
|
int |
getRawBufferLength()
Gets the length of the Message within the byte buffer.
|
int |
getRawBufferOffset()
Gets the offset into the byte buffer where this Message begins.
|
int |
getReason()
Returns the Reason value of this Message.
|
java.lang.String |
getReasonText()
Returns the Reason value of this Message.
|
long |
getRecordsDeleted()
Returns the number of records deleted for the command that this Message
was produced in response to.
|
long |
getRecordsInserted()
Returns the number of records inserted for the command that this Message
was produced in response to.
|
long |
getRecordsReturned()
Returns the number of records returned for the command that this Message
was produced in response to.
|
long |
getRecordsUpdated()
Returns the number of records updated for the command that this Message
was produced in response to.
|
long |
getSequence()
Returns the sequence number for this Message.
|
Field |
getSequenceRaw()
Returns the sequence number for this Message.
|
java.lang.String |
getSowKey()
Returns the SowKey for this Message.
|
Field |
getSowKeyRaw()
Returns the SowKey for this Message.
|
java.lang.String |
getSowKeys()
Gets the set of SowKeys this message applies to.
|
Field |
getSowKeysRaw()
Gets the set of SowKeys this message applies to.
|
int |
getStatus()
Returns the Status of this Message.
|
java.lang.String |
getSubId()
Gets the SubId of this Message.
|
boolean |
getSubId(CommandId v)
Gets the SubId of this Message by copying it into the provided CommandId.
|
Field |
getSubIdRaw()
Gets the SubId of this Message.
|
java.lang.String |
getSubIds()
The set of SubIds for this Message.
|
Field |
getSubIdsRaw()
The set of SubIds for this message.
|
Subscription |
getSubscription()
Gets the Subscription for this Message.
|
java.lang.String |
getTimestamp()
Returns the timestamp for this message, an ISO-8601 formatted string.
|
Field |
getTimestampRaw()
Returns the timestamp for this message, an ISO-8601 formatted string.
|
java.lang.String |
getTopic()
Return the topic that the message applies to.
|
long |
getTopicMatches()
Returns the number of matching topics for the command that this message
was produced in response to.
|
Field |
getTopicRaw()
Return the topic that the message applies to.
|
long |
getTopN()
Get the TopN parameter for this message.
|
java.lang.String |
getUserId()
Get the UserId for this message.
|
Field |
getUserIdRaw()
Get the UserId for this message.
|
java.lang.String |
getVersion()
Returns the version of the AMPS server, provided in response to a logon.
|
int |
getVersionAsInt()
Returns the version of the AMPS server, provided in response to a logon.
|
Field |
getVersionRaw()
Returns the version of the AMPS server, provided in response to a logon.
|
boolean |
isAckTypeNull()
Checks whether the AckType field is null.
|
boolean |
isBatchSizeNull()
Checks whether the BatchSize field is null.
|
boolean |
isBookmarkNull()
Checks whether the Bookmark field is null.
|
boolean |
isClientNameNull()
Checks whether the ClientName field is null.
|
boolean |
isCommandIdNull()
Checks whether the CommandId is null.
|
boolean |
isCommandNull()
Checks whether the Command field is null.
|
boolean |
isCorrelationIdNull()
Checks whether the CorrelationId field is null.
|
boolean |
isDataNull()
Checks whether the Data field is null.
|
boolean |
isExpirationNull()
Checks whether the Expiration field is null.
|
boolean |
isFilterNull()
Checks whether the Filter field is null.
|
boolean |
isGroupSeqNoNull()
Checks whether the GroupSeqNo field is null.
|
boolean |
isIgnoreAutoAck()
Used to check if automatic acking of this Message by the Client
should be skipped.
|
boolean |
isLeasePeriodNull()
Check whether the LeasePeriod field is null.
|
boolean |
isLengthNull()
Checks whether the Length field is null.
|
boolean |
isMatchesNull()
Checks whether the Matches field is Null.
|
boolean |
isMessageTypeNull()
Checks whether the MessageType field is null.
|
boolean |
isOptionsNull()
Checks whether the Options field is null.
|
boolean |
isOrderByNull()
Checks whether the OrderBy field is null.
|
boolean |
isPasswordNull()
Checks whether the Password field is null.
|
boolean |
isQueryIdNull()
Checks whether the QueryId field is null.
|
boolean |
isReasonNull()
Checks whether the Reason is null.
|
boolean |
isRecordsDeletedNull()
Checks whether the RecordsDeleted field is null.
|
boolean |
isRecordsInsertedNull()
Checks whether the RecordsInserted field is null.
|
boolean |
isRecordsReturnedNull()
Checks whether the RecordsReturned field is null.
|
boolean |
isRecordsUpdatedNull()
Checks whether the RecordsUpdated field is null.
|
boolean |
isSequenceNull()
Checks whether the Sequence field is null.
|
boolean |
isSowKeyNull()
Checks whether the SowKey field is null.
|
boolean |
isSowKeysNull()
Checks whether the SowKeys field is null.
|
boolean |
isSubIdNull()
Checks whether the SubId field is null.
|
boolean |
isSubIdsNull()
Checks whether the SubIds field is null.
|
boolean |
isTimestampNull()
Checks whether the Timestamp field is null.
|
boolean |
isTopicMatchesNull()
Checks whether the TopicMatches field is null.
|
boolean |
isTopicNull()
Checks whether the Topic field is null.
|
boolean |
isTopNNull()
Checks whether the TopN field is null.
|
boolean |
isUserIdNull()
Checks whether the UserId field is null.
|
boolean |
isVersionNull()
Checks whether the Version field is null.
|
Message |
reset()
Resets all
Field members to null. |
abstract Message.SerializationResult |
serialize(java.nio.ByteBuffer buffer)
Serializes this message into the provided byte buffer at its current
position.
|
Message |
setAckType(int v)
Sets the type of acknowledgement for an acknowledgement Message.
|
Message |
setAckType(java.lang.String v)
Sets the type of acknowledgement for an acknowledgement Message.
|
Message |
setBatchSize(int v)
Sets the BatchSize for this Message.
|
Message |
setBookmark(byte[] buffer,
int offset,
int length)
Sets the value for the AMPS Bookmark.
|
Message |
setBookmark(java.lang.String v)
Sets the value for the AMPS Bookmark.
|
void |
setBookmarkSeqNo(long val)
This field is only used internally by bookmark store implementations
to cache a tracking index for undiscarded messages, so they can be
looked up quickly when discarded for a bookmark subscription.
|
void |
setBuffer(byte[] buffer)
Sets the byte buffer used for this Message.
|
Message |
setClientName(byte[] buffer,
int offset,
int length)
Sets the name of the Client sending the Message.
|
Message |
setClientName(java.lang.String v)
Sets the name of the Client sending the Message.
|
Message |
setCommand(int v)
Sets the Command for this Message, indicating the type of
of Message this is.
|
Message |
setCommand(java.lang.String v)
Sets the Command for this Message, indicating the type of
of Message this is.
|
Message |
setCommandId(byte[] buffer,
int offset,
int length)
Sets the CommandId on this Message.
|
Message |
setCommandId(CommandId v)
Sets the CommandId on this Message.
|
Message |
setCommandId(java.lang.String v)
Sets the CommandId on this Message.
|
Message |
setCorrelationId(java.lang.String v)
Set the CorrelationId on this message.
|
Message |
setData(byte[] buffer,
int offset,
int length)
Sets the payload of the Message.
|
Message |
setData(java.lang.String v)
Sets the payload of the Message.
|
Message |
setExpiration(int v)
Sets the Expiration field for this Message.
|
Message |
setFilter(byte[] buffer,
int offset,
int length)
Sets the Filter field on this Message.
|
Message |
setFilter(java.lang.String v)
Sets the Filter field on this Message.
|
Message |
setGroupSeqNo(long v)
When executing a SOW query and AMPS returns a batch of query results,
this sequence number is set on each message within the result batch
to indicate it's postion within the batch.
|
void |
setIgnoreAutoAck()
Used to disable automatic acking of this Message by the Client
after the
MessageHandler completes. |
Message |
setLength(int v)
Sets the Length of the Message.
|
Message |
setMatches(long v)
Sets the matches field on this Message.
|
Message |
setMessageType(java.lang.String v)
sets the MessageType field on this message.
|
Message |
setOptions(java.lang.String v)
Sets the Options for the Message.
|
Message |
setOrderBy(byte[] buffer,
int offset,
int length)
Set the OrderBy parameter for this Message.
|
Message |
setOrderBy(java.lang.String v)
Set the OrderBy parameter for this Message.
|
Message |
setPassword(byte[] buffer,
int offset,
int length)
Set the Password on the Message.
|
Message |
setPassword(java.lang.String v)
Set the Password on the Message.
|
Message |
setQueryId(byte[] buffer,
int offset,
int length)
Sets the QueryId for this Message.
|
Message |
setQueryId(CommandId v)
Sets the QueryId field for this Message by copying it from a CommandId
object.
|
Message |
setQueryId(java.lang.String v)
Sets the QueryId field for this Message.
|
void |
setRawBufferLength(int length)
Set the length of the Message within the byte buffer.
|
void |
setRawBufferOffset(int offset)
Sets the Offset into the byte buffer where this Message begins.
|
Message |
setReason(int v)
Sets the Reason value of this Message.
|
Message |
setRecordsDeleted(long v)
Sets the records deleted header field.
|
Message |
setRecordsInserted(long v)
Returns the number of records inserted for the command that this Message
was produced in response to.
|
Message |
setRecordsReturned(long v)
Sets the records returned header field.
|
Message |
setRecordsUpdated(long v)
Sets the records updated header field.
|
Message |
setSequence(long v)
Sets the sequence number for this Message.
|
Message |
setSowKey(byte[] buffer,
int offset,
int length)
Sets the SowKey for this Message.
|
Message |
setSowKey(java.lang.String v)
Sets the SowKey for this Message.
|
Message |
setSowKeys(byte[] buffer,
int offset,
int length)
Sets the set of SowKeys this message applies to, as a comma-delimited
list of identifiers.
|
Message |
setSowKeys(java.lang.String v)
Sets the set of SowKeys this message applies to, as a comma-delimited
list of identifiers.
|
Message |
setStatus(int v)
Sets the Status of this Message.
|
Message |
setSubId(byte[] buffer,
int offset,
int length)
Sets the SubId of this Message.
|
Message |
setSubId(CommandId v)
Sets the SubId of this Message by copying it from a CommandId object.
|
Message |
setSubId(java.lang.String v)
Sets the SubId of this Message.
|
Message |
setSubIds(byte[] buffer,
int offset,
int length)
The set of SubIds for this message.
|
Message |
setSubIds(java.lang.String v)
The set of SubIds for this message.
|
void |
setSubscription(Subscription subscription)
Sets the Subscription for this Message.
|
Message |
setTimestamp(byte[] buffer,
int offset,
int length)
Sets the timestamp for this message.
|
Message |
setTimestamp(java.lang.String v)
Sets the Timestamp for this Message.
|
Message |
setTopic(byte[] buffer,
int offset,
int length)
Set the topic that the message applies to.
|
Message |
setTopic(java.lang.String v)
Set the topic that the message applies to.
|
Message |
setTopicMatches(long v)
Sets the topic matches field on this message.
|
Message |
setTopN(long v)
Set the TopN parameter for this message.
|
Message |
setUserId(byte[] buffer,
int offset,
int length)
Set the UserId for this message.
|
Message |
setUserId(java.lang.String v)
Set the UserId for this message.
|
Message |
setVersion(byte[] buffer,
int offset,
int length)
Sets the version field of this message.
|
Message |
setVersion(java.lang.String v)
Sets the version field of this message.
|
java.lang.String |
toString()
Return the message as a string.
|
protected final java.nio.charset.CharsetEncoder encoder
Field
classes
to encode byte dataprotected final java.nio.charset.CharsetDecoder decoder
Field
classes
to decode byte dataprotected final AckTypeField _AckType
protected final IntegerField _BatchSize
protected final BookmarkField _Bookmark
protected final StringField _ClientName
protected final StringField _CommandId
protected final CommandField _Command
protected final StringField _Data
protected final IntegerField _Expiration
protected final StringField _Filter
protected final StringField _LeasePeriod
protected final StringField _MessageType
protected final StringField _OrderBy
protected final LongField _GroupSeqNo
protected final LongField _Matches
protected final StringField _Password
protected final IntegerField _Length
protected final OptionsField _Options
protected final StringField _QueryId
protected final ReasonField _Reason
protected final LongField _RecordsInserted
protected final LongField _RecordsUpdated
protected final LongField _RecordsDeleted
protected final LongField _RecordsReturned
protected final LongField _Sequence
protected final StringField _SowKey
protected final StringField _SowKeys
protected final StatusField _Status
protected final StringField _SubId
protected final StringField _SubIds
protected final StringField _Timestamp
protected final LongField _TopN
protected final StringField _Topic
protected final LongField _TopicMatches
protected final StringField _UserId
protected final StringField _Version
protected final StringField _CorrelationId
protected Client _client
protected final Field[] _fields
protected Message(java.nio.charset.CharsetEncoder encoder, java.nio.charset.CharsetDecoder decoder)
public java.nio.charset.CharsetEncoder getEncoder()
public java.nio.charset.CharsetDecoder getDecoder()
public void setBookmarkSeqNo(long val)
val
- The value to set as the new BookmarkSeqNo for this Message.public long getBookmarkSeqNo()
public void setSubscription(Subscription subscription)
subscription
- the subscription to setpublic Subscription getSubscription()
public void setBuffer(byte[] buffer)
buffer
- the byte buffer to use for the Message.public byte[] getBuffer()
public void setRawBufferOffset(int offset)
offset
- Offset of first byte of Message within the buffer.public int getRawBufferOffset()
public void setRawBufferLength(int length)
length
- The length of the Message within the buffer.public int getRawBufferLength()
public abstract Message.SerializationResult serialize(java.nio.ByteBuffer buffer)
buffer
- The byte buffer to write into.public Message reset()
Field
members to null.public int getAckType()
public int getAckTypeOutgoing()
public Message setAckType(int v)
v
- The value to set as the AckType for the acknowledgement Message.public Message setAckType(java.lang.String v)
v
- The value to set as the AckType for the acknowledgement Message.public boolean isAckTypeNull()
public int getBatchSize()
public Message setBatchSize(int v)
v
- the batch size to setpublic boolean isBatchSizeNull()
public java.lang.String getBookmark()
public BookmarkField getBookmarkRaw()
Field
that encapsulates the data.
Field
.public Message setBookmark(java.lang.String v)
v
- The string used to set the value of the AMPS Bookmark.public Message setBookmark(byte[] buffer, int offset, int length)
buffer
- The buffer containing the value for the Bookmark.offset
- The location at which the value begins.length
- The length of the value in the buffer.public boolean isBookmarkNull()
public java.lang.String getClientName()
public Field getClientNameRaw()
Field
that encapsulates the data.
Field
.public Message setClientName(java.lang.String v)
v
- The string used to set the ClientName.public Message setClientName(byte[] buffer, int offset, int length)
buffer
- The buffer containing the ClientName.offset
- The location at which the ClientName begins.length
- The length of the ClientName.public boolean isClientNameNull()
public java.lang.String getCommandId()
public Field getCommandIdRaw()
Field
that encapsulates the data.
Field
.public boolean getCommandId(CommandId v)
v
- The object to hold the value of the CommandId object.public Message setCommandId(java.lang.String v)
v
- The string CommandId to set on this Message.public Message setCommandId(CommandId v)
v
- The CommandId object to set on this Message.public Message setCommandId(byte[] buffer, int offset, int length)
buffer
- The buffer containing the CommandId on this Message.offset
- The location at which the CommandId begins.length
- The length of the CommandId.public boolean isCommandIdNull()
public int getCommand()
public Message setCommand(int v)
v
- The integer Command to set on this Message.public Message setCommand(java.lang.String v)
v
- The Command to set on this Message. The value provided must
be a value supported by the AMPS server, or the server will refuse
to process the command.public boolean isCommandNull()
public java.lang.String getData()
public Field getDataRaw()
Field
that encapsulates the data.
Field
.public Message setData(java.lang.String v)
v
- The string to set as the payload of this Message.public Message setData(byte[] buffer, int offset, int length)
buffer
- The buffer containing the Data.offset
- The location at which the Data begins.length
- The length of the data.public boolean isDataNull()
public int getExpiration()
public IntegerField getExpirationRaw()
Field
that encapsulates the data.
Field
.public Message setExpiration(int v)
v
- The lifetime of the Message.public boolean isExpirationNull()
public java.lang.String getFilter()
public Field getFilterRaw()
Field
that encapsulates the data.
Field
.public Message setFilter(java.lang.String v)
v
- The string to set as the Filter on this Message.public Message setFilter(byte[] buffer, int offset, int length)
buffer
- The buffer containing the Filter for this Message.offset
- The location at which the Filter begins.length
- The length of the Filter.public boolean isFilterNull()
public boolean isLeasePeriodNull()
public java.lang.String getLeasePeriod()
public StringField getLeasePeriodRaw()
public java.lang.String getMessageType()
public Message setMessageType(java.lang.String v)
v
- The string MessageType to set on this message.public boolean isMessageTypeNull()
public java.lang.String getOrderBy()
public Field getOrderByRaw()
Field
that encapsulates the data.
Field
.public Message setOrderBy(java.lang.String v)
v
- The ordering expression to set for this Message.public Message setOrderBy(byte[] buffer, int offset, int length)
buffer
- The buffer that contains the expression.offset
- The location at which the expression begins.length
- The length of the expression.public boolean isOrderByNull()
public long getGroupSeqNo()
public Message setGroupSeqNo(long v)
v
- The number set as the group sequence number.public boolean isGroupSeqNoNull()
public long getMatches()
public Message setMatches(long v)
v
- The number to set as the Matches field in this Message.public boolean isMatchesNull()
public java.lang.String getPassword()
public Field getPasswordRaw()
Field
that encapsulates the data.
Field
.public Message setPassword(java.lang.String v)
v
- The string Password to set.public Message setPassword(byte[] buffer, int offset, int length)
buffer
- The buffer that contains the Password.offset
- The location where the Password starts.length
- The length of the Password.public boolean isPasswordNull()
public int getLength()
public Message setLength(int v)
v
- The value to be set as the Length of the Message.public boolean isLengthNull()
public java.lang.String getOptions()
public Field getOptionsRaw()
Field
that encapsulates the data.
Field
.public Message setOptions(java.lang.String v)
v
- The string to be used as the Options for this Message.public boolean isOptionsNull()
public java.lang.String getQueryId()
public Field getQueryIdRaw()
Field
that encapsulates the data.
Field
.public boolean getQueryId(CommandId v)
v
- The CommandId to be used to copy the QueryId.public Message setQueryId(java.lang.String v)
v
- The string to be set as the QueryId for this Message.public Message setQueryId(CommandId v)
v
- The CommandId to be set as the QueryId for this Message.public Message setQueryId(byte[] buffer, int offset, int length)
buffer
- The buffer containing the QueryId.offset
- The location in the buffer where the QueryId begins.length
- The length of the QueryId to be set.public boolean isQueryIdNull()
public int getReason()
public java.lang.String getReasonText()
public Message setReason(int v)
v
- The Reason value to set for this Message.public boolean isReasonNull()
public long getRecordsInserted()
public Message setRecordsInserted(long v)
v
- The value to set as the RecordsInserted field of the Message.public boolean isRecordsInsertedNull()
public long getRecordsUpdated()
public Message setRecordsUpdated(long v)
v
- Value to set the RecordsUpdated field to.public boolean isRecordsUpdatedNull()
public long getRecordsDeleted()
public Message setRecordsDeleted(long v)
v
- Value to set as the RecordsDeleted field.public boolean isRecordsDeletedNull()
public long getRecordsReturned()
public Message setRecordsReturned(long v)
v
- Value to set as the RecordsReturn field.public boolean isRecordsReturnedNull()
public Field getSequenceRaw()
Field
that encapsulates the data.
Field
.public long getSequence()
public Message setSequence(long v)
v
- The value to set as the sequence number for this Message.public boolean isSequenceNull()
public java.lang.String getSowKey()
public Field getSowKeyRaw()
Field
that encapsulates the data.
Field
.public Message setSowKey(java.lang.String v)
v
- The string to be used for the SowKey.public Message setSowKey(byte[] buffer, int offset, int length)
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.public boolean isSowKeyNull()
public java.lang.String getSowKeys()
public Field getSowKeysRaw()
Field
that encapsulates the data.
Field
.public Message setSowKeys(java.lang.String v)
v
- A comma-delimited list of identifiers to be set as the SowKeys that
this message applies to.public Message setSowKeys(byte[] buffer, int offset, int length)
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.public boolean isSowKeysNull()
public int getStatus()
public Message setStatus(int v)
v
- The value to be set as the Status of the Message.public java.lang.String getSubId()
public Field getSubIdRaw()
Field
that encapsulates the data.
Field
.public boolean getSubId(CommandId v)
v
- The CommandId into which to copy the SubId.public Message setSubId(java.lang.String v)
v
- The string used to set the SubId of this Message.public Message setSubId(CommandId v)
v
- The CommandId to be set as the SubId for this Message.public Message setSubId(byte[] buffer, int offset, int length)
buffer
- The buffer that contains the SubId key.offset
- The location within the buffer where the SubId begins.length
- The length of the SubId.public boolean isSubIdNull()
public java.lang.String getSubIds()
public Field getSubIdsRaw()
Field
that encapsulates the data.
Field
.public Message setSubIds(java.lang.String v)
v
- The comma-delimited list to be set as the SubIds for this message.public Message setSubIds(byte[] buffer, int offset, int length)
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.public boolean isSubIdsNull()
public java.lang.String getTimestamp()
public Field getTimestampRaw()
Field
that encapsulates the data.
Field
.public Message setTimestamp(java.lang.String v)
v
- The string to set as the Timestamp for this Message.public Message setTimestamp(byte[] buffer, int offset, int length)
buffer
- the buffer that contains the timestampoffset
- the location within the buffer where the timestamp beginslength
- the length of the timestamppublic boolean isTimestampNull()
public long getTopN()
public Message setTopN(long v)
v
- The value to be set as the TopN parameter.public boolean isTopNNull()
public java.lang.String getTopic()
public Field getTopicRaw()
Field
that encapsulates the data.
Field
.public Message setTopic(java.lang.String v)
v
- The string to be set as the Topic that the Message applies to.public Message setTopic(byte[] buffer, int offset, int length)
buffer
- the buffer that contains the Topicoffset
- the location within the buffer where the Topic beginslength
- the length of the Topicpublic boolean isTopicNull()
public long getTopicMatches()
public boolean isTopicMatchesNull()
public Message setTopicMatches(long v)
v
- The value to set as the TopicMatches field on this Message.public java.lang.String getUserId()
public boolean isUserIdNull()
public Field getUserIdRaw()
Field
that encapsulates the data.
Field
.public Message setUserId(java.lang.String v)
v
- The string to be set as the UserId for this Message.public Message setUserId(byte[] buffer, int offset, int length)
buffer
- the buffer that contains the UserIdoffset
- the position where the UserId beginslength
- the length of the UserIdpublic java.lang.String getVersion()
public Field getVersionRaw()
Field
that encapsulates the data.
Field
.public boolean isVersionNull()
public int getVersionAsInt()
public Message setVersion(java.lang.String v)
v
- The string used to set the Version field of this Message.public Message setVersion(byte[] buffer, int offset, int length)
buffer
- the buffer that contains the version stringoffset
- the position where the version string beginslength
- the length of the version stringpublic Message setCorrelationId(java.lang.String v)
v
- The string used to set the CorrelationId on this message.public java.lang.String getCorrelationId()
public StringField getCorrelationIdRaw()
Field
that encapsulates the data.
Field
.public boolean isCorrelationIdNull()
public java.lang.String toString()
toString
in class java.lang.Object
public abstract Message copy()
public Client getClient()
Client
instance.public void ack() throws AMPSException
AMPSException
- An error occurred sending this acknowledgement to AMPS.public void ack(byte[] options, int optionsPos, int optionsLen) throws AMPSException
options
- The bytes of the options for the ackoptionsPos
- The starting position in optionsoptionsLen
- The length of the optionsAMPSException
- An error occurred sending this acknowledgement to AMPS.public void ack(Field options) throws AMPSException
options
- The options to include with the ack.AMPSException
- An error occurred sending this acknowledgement to AMPS.public void ack(java.lang.String options) throws AMPSException
options
- The options to include with the ack.AMPSException
- An error occurred sending this acknowledgement to AMPS.public boolean isIgnoreAutoAck()
public void setIgnoreAutoAck()
MessageHandler
completes.protected void _copyTo(Message destination)
destination
- overwritten with this Message's data.