|
OSMQ v2.0.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A multi-element data set (record) that includes identifying attributes such as a topic, action, data key, and correlation ID. Application data elements are referenced positionally, using an API similar to that empolyed by JDBC. An element can be put or retrieved as a String, int, double, long or char. The first element is reference as position 1, and the last as position n.
Field Summary | |
static int |
CONTENT_FORMAT
|
static int |
CORRELATION_ID
|
static int |
DATA_KEY
|
static int |
ORIGINATOR
|
static int |
RECIPIENT
|
static int |
SEND_TIMESTAMP
|
static int |
SENDER_SEQ
|
static int |
TOPIC
|
static int |
TOTAL_ATTRIBUTES
|
static char |
TRANS_ADD
|
static char |
TRANS_DELETE
|
static char |
TRANS_UPDATE
|
static int |
TRANSACTION
|
static int |
TYPE
|
Method Summary | |
java.lang.Object |
clone()
|
long |
getCorrelationNumber()
Gets the message attribute used to identify a group of related transactions. |
java.lang.String |
getCorrelationString()
|
char |
getFormat()
Identifies the body format as either dataset, text or binary. |
java.lang.String |
getKey()
Returns the unique identifier for the data contained in the message. |
int |
getKeyAsInt()
|
java.lang.String |
getOriginator()
Returns the identifier of the message sender (publisher). |
java.lang.String |
getRecipient()
Returns the identifier of the message recipient, or null if the message is intended for all subscriber to the message topic. |
long |
getSequenceNumber()
Returns the relative sequence number of this message. |
long |
getTimeStamp()
Returns a timestamp indicating when the message was sent. |
java.lang.String |
getTopic()
Returns the topic of the message. |
java.lang.String |
getTransaction()
Returns the identifier of the event or activity that caused the transaction to be generated. |
char |
getTransactionAsChar()
Returns the first character of the transaction identifer, or a null character if there is no transaction identifer. |
char |
getType()
Identifies whether the message type is a MessageType.NOTIFICATION or MessageType.REQUEST . |
boolean |
hasAssignedCorrelationNumber()
Determines if there is a correlation identifier value. |
boolean |
hasAssignedKey()
Determines if there is a key value identifier. |
boolean |
hasAssignedOriginator()
Determines whether a position has a value (versus null) |
boolean |
hasAssignedRecipient()
Determine if there is a recipient identifier value. |
boolean |
hasAssignedTopic()
Determines if there is a topic identifier value. |
void |
setCorrelationNumber(long n)
|
void |
setCorrelationString(java.lang.String s)
|
void |
setFormat(char t)
Sets the attributes that identifies the type of data contained in the message body. |
void |
setKey(java.lang.String s)
|
void |
setKeyAsInt(int n)
|
void |
setOriginator(java.lang.String t)
Sets the identifier of the message sender/originator. |
void |
setRecipient(java.lang.String t)
Sets the unique recipient that will receive the message. |
void |
setSequenceNumber(long n)
Sets the sequence number for this message. |
void |
setTimeStamp(long n)
Sets the time the message was publisherd. |
void |
setTopic(java.lang.String topic)
|
void |
setTransaction(java.lang.String e)
|
void |
setTransactionAsChar(char c)
|
void |
setType(char t)
Sets the message type. |
Methods inherited from interface osmq.util.Immutable |
isImmutable, setImmutable |
Field Detail |
public static final int TOTAL_ATTRIBUTES
public static final int RECIPIENT
public static final int TOPIC
public static final int TYPE
public static final int ORIGINATOR
public static final int CONTENT_FORMAT
public static final int DATA_KEY
public static final int TRANSACTION
public static final int CORRELATION_ID
public static final int SEND_TIMESTAMP
public static final int SENDER_SEQ
public static final char TRANS_ADD
public static final char TRANS_DELETE
public static final char TRANS_UPDATE
Method Detail |
public java.lang.String getTopic()
public void setTopic(java.lang.String topic)
public java.lang.String getKey()
getKey
in interface KeyedData
public void setKey(java.lang.String s)
public void setKeyAsInt(int n)
public int getKeyAsInt()
public java.lang.String getTransaction()
Standard events used for down-stream subscribers that maintain databases are TRANS_ADD, TRANS_DELETE, and TRANS_UPDATE.
public char getTransactionAsChar()
public void setTransaction(java.lang.String e)
public void setTransactionAsChar(char c)
public long getCorrelationNumber()
public void setCorrelationNumber(long n)
public java.lang.String getCorrelationString()
public void setCorrelationString(java.lang.String s)
public java.lang.String getOriginator()
public void setOriginator(java.lang.String t)
NOTE This method should not be called by an application, since the value will be overridden by the message publisher adapter.
public java.lang.String getRecipient()
public void setRecipient(java.lang.String t)
public char getType()
setType(char)
public void setType(char t)
TYPE_NOTIFICATION messages are published by OLTP systems after it commits a transaction. (Batch applications can also publisher MessageType.NOTIFICATION messages.)
TYPE_REQUEST messages are point-to-point routed client requests for service. (Point-to-point messages are sent to a single recipient, and have the recipient identified in the message header, verus publish-subscribe messages that have no recipeint and are published to all subscribers to the message topic.)
MessageType.DENIAL messages are a point-to-point messages, routed to the originator by the service provider. They indicate a request for service has been denied.
MessageType.TOPIC_CHG messages are used internally to identify a TOPIC CHANGE EVENT.
MessageType.BATCH_CONTROL message are sent immediately before and after a batch of related messages. They are used to delimit the batch, so that subscribers can determine an action to be taken (such as creating export files, or updating database tables). The terminating CONTROL message will normally contain totals that should be considered a checksum.
setRecipient(String t)
public void setTimeStamp(long n)
NOTE This value should be set by the underlying client middleware, and not the application.
n
- the time as a long.public void setSequenceNumber(long n)
NOTE This value should be set by the underlying client middleware, and not the application.
public long getTimeStamp()
public long getSequenceNumber()
public char getFormat()
FORMAT_UNKNOWN ('U')
FORMAT_TEXT ('T')
FORMAT_DATASET ('D')
FORMAT_BINARY ('B')
public void setFormat(char t)
Valid values include
FORMAT_UNKNOWN ('U')
FORMAT_TEXT ('T')
FORMAT_DATASET ('D')
FORMAT_BINARY ('B')
DataSetMessages default to a format of FORMAT_DATASET.
public boolean hasAssignedRecipient()
public boolean hasAssignedTopic()
public boolean hasAssignedCorrelationNumber()
public boolean hasAssignedKey()
public boolean hasAssignedOriginator()
java.lang.ArrayIndexOutOfBoundsException
- if p is not a valid element position.public java.lang.Object clone()
|
(c) 2000 - 2003 MQue Systems All Rights Reserved |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |