|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.crankuptheamps.client.Message
public abstract class Message
| Nested Class Summary | |
|---|---|
static class |
Message.AckType
|
static class |
Message.Command
|
static class |
Message.Options
Represents the options for an AMPS command. |
static class |
Message.Reason
|
static class |
Message.Status
|
| Field Summary | |
|---|---|
protected CharsetDecoder |
decoder
|
protected CharsetEncoder |
encoder
|
protected static int |
MINIMUM_SERVER_VERSION
|
| Constructor Summary | |
|---|---|
Message(CharsetEncoder encoder,
CharsetDecoder decoder)
|
|
| Method Summary | |
|---|---|
protected void |
_copyTo(Message destination)
|
abstract Message |
copy()
|
int |
getAckType()
Returns the type of acknowledgement for an acknowledgement message. |
int |
getBatchSize()
Returns the batch size for this message. |
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. |
String |
getClientName()
Gets the client name on this message. |
Field |
getClientNameRaw()
Gets the client name on this message. |
int |
getCommand()
Returns the command for this message, indicating the type of of message this is. |
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. |
String |
getCorrelationId()
Get the CorrelationId on this message. |
StringField |
getCorrelationIdRaw()
Get the CorrelationId on this message. |
String |
getData()
Returns the payload of the message. |
Field |
getDataRaw()
Returns the payload of the message. |
int |
getExpiration()
Returns the expiration set for this message. |
String |
getFilter()
|
Field |
getFilterRaw()
Returns the filter on this message. |
long |
getGroupSeqNo()
Get the group sequence number. |
int |
getLength()
Returns the length of the message. |
long |
getMatches()
Returns the number of matches in the command this message acknowledges. |
long |
getMaxMessages()
Deprecated. This header is no longer used by AMPS. |
String |
getMessageId()
Deprecated. This header is no longer used by AMPS. |
Field |
getMessageIdRaw()
Deprecated. This header is no longer used by AMPS. |
String |
getOptions()
Returns the options set on this message. |
String |
getOrderBy()
Get the OrderBy parameter for this message. |
Field |
getOrderByRaw()
Get the OrderBy parameter for this message. |
String |
getPassword()
Returns the password set on the message. |
Field |
getPasswordRaw()
Returns the password set on the message. |
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. |
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. |
boolean |
getSendEmpties()
Gets the value of the send empties header. |
boolean |
getSendMatchingIds()
Gets the value of the send keys header. |
boolean |
getSendOOF()
Gets the value of the send OOF header. |
long |
getSequence()
Returns the sequence number for this message. |
Field |
getSequenceRaw()
Returns the sequence number for this message. |
String |
getSowKey()
Returns the SowKey for this message. |
Field |
getSowKeyRaw()
Returns the SowKey for this message. |
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. |
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. |
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. |
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. |
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. |
String |
getUserId()
Get the UserId for this message. |
Field |
getUserIdRaw()
Get the UserId for this message. |
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. |
void |
reset()
|
void |
setAckType(int v)
Sets the type of acknowledgement for an acknowledgement message. |
void |
setAckType(String v)
Sets the type of acknowledgement for an acknowlegdement message. |
void |
setBatchSize(int v)
Sets the batch size for this message. |
void |
setBookmark(byte[] buffer,
int offset,
int length)
Sets the value for the AMPS bookmark. |
void |
setBookmark(String v)
Sets the value for the AMPS bookmark. |
void |
setBookmarkSeqNo(long val)
Sets the bookmark sequence number for this message. |
void |
setBuffer(byte[] buffer)
Sets the byte buffer used by the message. |
void |
setClientName(byte[] buffer,
int offset,
int length)
Sets the name of the client sending the message. |
void |
setClientName(String v)
Sets the name of the client sending the message. |
void |
setCommand(int v)
Sets the command for this message, indicating the type of of message this is. |
void |
setCommand(String v)
Sets the command for this message, indicating the type of of message this is. |
void |
setCommandId(byte[] buffer,
int offset,
int length)
Sets the CommandId on this message. |
void |
setCommandId(CommandId v)
Sets the CommandId on this message. |
void |
setCommandId(String v)
Sets the CommandId on this message. |
void |
setCorrelationId(String v)
Set the CorrelationId on this message. |
void |
setData(byte[] buffer,
int offset,
int length)
Sets the payload of the message. |
void |
setData(String v)
Sets the payload of the message. |
void |
setExpiration(int v)
Sets the expiration set for this message. |
void |
setFilter(byte[] buffer,
int offset,
int length)
Sets the filter on this message. |
void |
setFilter(String v)
Sets the filter on this message. |
void |
setGroupSeqNo(long v)
Set the group sequence number. |
void |
setLength(int v)
Sets the length of the message. |
void |
setMatches(long v)
Sets the matches field on this message. |
void |
setMaxMessages(long v)
Deprecated. This header is no longer used by AMPS. |
void |
setMessageId(byte[] buffer,
int offset,
int position)
Deprecated. This header is no longer used by AMPS. |
void |
setMessageId(String v)
Deprecated. This header is no longer used by AMPS. |
void |
setOptions(String v)
Sets the options for this message. |
void |
setOrderBy(byte[] buffer,
int offset,
int length)
Set the OrderBy parameter for this message. |
void |
setOrderBy(String v)
Set the OrderBy parameter for this message. |
void |
setPassword(byte[] buffer,
int offset,
int length)
Set the password on the message. |
void |
setPassword(String v)
Set the password on the message. |
void |
setQueryId(byte[] buffer,
int offset,
int position)
Sets the QueryId for this message. |
void |
setQueryId(CommandId v)
Sets the QueryId for this message. |
void |
setQueryId(String v)
Sets the QueryId for this message. |
void |
setRawBufferLength(int length)
Sets the length of the message within the byte buffer. |
void |
setRawBufferOffset(int offset)
Sets the offset into the byte buffer where this message begins. |
void |
setReason(int v)
Sets the reason value of this message. |
void |
setRecordsDeleted(long v)
Sets the records deleted header field. |
void |
setRecordsInserted(long v)
Returns the number of records inserted for the command that this message was produced in response to. |
void |
setRecordsReturned(long v)
Sets the records returned header field. |
void |
setRecordsUpdated(long v)
Sets the records updated header field. |
void |
setSendEmpties(boolean v)
Sets the value of the send empties header. |
void |
setSendMatchingIds(boolean v)
Gets the value of the send keys header. |
void |
setSendOOF(boolean v)
Sets the value of the send OOF header. |
void |
setSequence(long v)
Returns the sequence number for this message. |
void |
setSowKey(byte[] buffer,
int offset,
int length)
Sets the SowKey for this message. |
void |
setSowKey(String v)
Sets the SowKey for this message. |
void |
setSowKeys(byte[] buffer,
int offset,
int length)
Sets the set of SowKeys this message applies to, as a comma-delimited list of identifiers. |
void |
setSowKeys(String v)
Sets the set of SowKeys this message applies to, as a comma-delimited list of identifiers. |
void |
setStatus(int v)
Sets the status of this message. |
void |
setSubId(byte[] buffer,
int offset,
int length)
Sets the SubId of this message. |
void |
setSubId(CommandId v)
Sets the SubId of this message. |
void |
setSubId(String v)
Sets the SubId of this message. |
void |
setSubIds(byte[] buffer,
int offset,
int length)
The set of SubIds for this message. |
void |
setSubIds(String v)
The set of SubIds for this message. |
void |
setSubscription(Subscription subscription)
Sets the subscription for this message. |
void |
setTimestamp(byte[] buffer,
int offset,
int length)
Sets the timestamp for this message. |
void |
setTimestamp(String v)
Sets the timestamp for this message. |
void |
setTopic(byte[] buffer,
int offset,
int length)
Set the topic that the message applies to. |
void |
setTopic(String v)
Set the topic that the message applies to. |
void |
setTopicMatches(long v)
Sets the topic matches field on this message. |
void |
setTopN(long v)
Set the TopN parameter for this message. |
void |
setUserId(byte[] buffer,
int offset,
int length)
Set the UserId for this message. |
void |
setUserId(String v)
Set the UserId for this message. |
void |
setVersion(byte[] buffer,
int offset,
int length)
Sets the version field of this message. |
void |
setVersion(String v)
Sets the version field of this message. |
String |
toString()
Return the message as a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final CharsetEncoder encoder
protected final CharsetDecoder decoder
protected static final int MINIMUM_SERVER_VERSION
| Constructor Detail |
|---|
public Message(CharsetEncoder encoder,
CharsetDecoder decoder)
| Method Detail |
|---|
public void setBookmarkSeqNo(long val)
public long getBookmarkSeqNo()
public void setSubscription(Subscription subscription)
public 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 - length of message within the buffer.public int getRawBufferLength()
public void reset()
public int getAckType()
public void setAckType(int v)
public void setAckType(String v)
public int getBatchSize()
public void setBatchSize(int v)
public String getBookmark()
public BookmarkField getBookmarkRaw()
public void setBookmark(String v)
public void setBookmark(byte[] buffer,
int offset,
int length)
public String getClientName()
public Field getClientNameRaw()
public void setClientName(String v)
public void setClientName(byte[] buffer,
int offset,
int length)
public String getCommandId()
public Field getCommandIdRaw()
public boolean getCommandId(CommandId v)
v - the object to hold the value of the CommandIdpublic void setCommandId(String v)
public void setCommandId(CommandId v)
public void setCommandId(byte[] buffer,
int offset,
int length)
public int getCommand()
public void setCommand(int v)
v - the command to set on this messagepublic void setCommand(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 String getData()
public Field getDataRaw()
public void setData(String v)
public void setData(byte[] buffer,
int offset,
int length)
public int getExpiration()
public void setExpiration(int v)
v - the lifetime of the messagepublic String getFilter()
public Field getFilterRaw()
public void setFilter(String v)
public void setFilter(byte[] buffer,
int offset,
int length)
public String getOrderBy()
public Field getOrderByRaw()
public void setOrderBy(String v)
v - the ordering expression
public void setOrderBy(byte[] buffer,
int offset,
int length)
buffer - the buffer that contains the expressionoffset - the location at which the expression beginslength - the length of the expressionpublic long getGroupSeqNo()
public void setGroupSeqNo(long v)
public long getMatches()
public void setMatches(long v)
v - the value to setpublic long getMaxMessages()
public void setMaxMessages(long v)
public String getMessageId()
public Field getMessageIdRaw()
public void setMessageId(String v)
public void setMessageId(byte[] buffer,
int offset,
int position)
public String getPassword()
public Field getPasswordRaw()
public void setPassword(String v)
v - the password to set
public void setPassword(byte[] buffer,
int offset,
int length)
buffer - the buffer that contains the passwordoffset - the location where the password startslength - the length of the passwordpublic int getLength()
public void setLength(int v)
public String getOptions()
public void setOptions(String v)
public String getQueryId()
public Field getQueryIdRaw()
public boolean getQueryId(CommandId v)
v - the CommandId to copy the QueryId intopublic void setQueryId(String v)
v - the value to setpublic void setQueryId(CommandId v)
v - the value to set
public void setQueryId(byte[] buffer,
int offset,
int position)
buffer - the buffer containing the QueryId to setoffset - the location where the QueryId beginsposition - the length of the QueryId to setpublic int getReason()
public String getReasonText()
public void setReason(int v)
public long getRecordsInserted()
public void setRecordsInserted(long v)
public long getRecordsUpdated()
public void setRecordsUpdated(long v)
public long getRecordsDeleted()
public void setRecordsDeleted(long v)
public long getRecordsReturned()
public void setRecordsReturned(long v)
public boolean getSendEmpties()
public void setSendEmpties(boolean v)
v - the new valuepublic boolean getSendMatchingIds()
public void setSendMatchingIds(boolean v)
v - the new valuepublic boolean getSendOOF()
public void setSendOOF(boolean v)
v - the new valuepublic Field getSequenceRaw()
public long getSequence()
public void setSequence(long v)
public String getSowKey()
public Field getSowKeyRaw()
public void setSowKey(String v)
v - the new value for the SOW key
public void setSowKey(byte[] buffer,
int offset,
int length)
buffer - the buffer that contains the SOW keyoffset - the location within the buffer where the SOW key beginsthe - length of the SOW keypublic String getSowKeys()
public Field getSowKeysRaw()
public void setSowKeys(String v)
v - the new value
public void setSowKeys(byte[] buffer,
int offset,
int length)
buffer - the buffer that contains the SOW keyoffset - the location within the buffer where the SOW key beginslength - the length of the SOW keypublic int getStatus()
public void setStatus(int v)
public String getSubId()
public Field getSubIdRaw()
public boolean getSubId(CommandId v)
public void setSubId(String v)
public void setSubId(CommandId v)
v - the new value of the SubId
public void setSubId(byte[] buffer,
int offset,
int length)
buffer - the buffer that contains the SubId keyoffset - the location within the buffer where the SubId beginsthe - length of the SubIdpublic String getSubIds()
public Field getSubIdsRaw()
public void setSubIds(String v)
public void setSubIds(byte[] buffer,
int offset,
int length)
public String getTimestamp()
public Field getTimestampRaw()
public void setTimestamp(String v)
v - the timestamp to set
public void 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 long getTopN()
public void setTopN(long v)
v - the value to setpublic String getTopic()
public Field getTopicRaw()
public void setTopic(String v)
v - the topic to set
public void setTopic(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 long getTopicMatches()
public void setTopicMatches(long v)
v - the value to setpublic String getUserId()
public Field getUserIdRaw()
public void setUserId(String v)
v - the UserId to set
public void 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 String getVersion()
public Field getVersionRaw()
public int getVersionAsInt()
public void setVersion(String v)
v - the version to set
public void 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 void setCorrelationId(String v)
v - the value to setpublic String getCorrelationId()
public StringField getCorrelationIdRaw()
public String toString()
toString in class Objectpublic abstract Message copy()
protected void _copyTo(Message destination)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||