|
OSMQ v2.0.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectosmq.util.ImmutableImpl
osmq.messages.MessageHeader
Field Summary |
Fields inherited from interface osmq.messages.MessageAttributes |
CONTENT_FORMAT, CORRELATION_ID, DATA_KEY, ORIGINATOR, RECIPIENT, SEND_TIMESTAMP, SENDER_SEQ, TOPIC, TOTAL_ATTRIBUTES, TRANS_ADD, TRANS_DELETE, TRANS_UPDATE, TRANSACTION, TYPE |
Constructor Summary | |
MessageHeader()
|
|
MessageHeader(byte[] value)
|
|
MessageHeader(DataRecord ds)
|
|
MessageHeader(java.lang.String s)
|
Method Summary | |
void |
clearAll()
|
java.lang.Object |
clone()
|
byte[] |
getBytes()
|
long |
getCorrelationNumber()
Gets the identifier used to identify a group of transactions as related. |
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. |
java.lang.String |
getText()
|
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 event identifer, or a null character if there is no event identifer |
char |
getType()
Identifies whether the event type is a NOTIFICATION or 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()
Determine 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 t)
|
void |
setKeyAsInt(int n)
|
void |
setOriginator(java.lang.String t)
Sets the identifier of the message sender/originator. |
void |
setRecipient(java.lang.String s)
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 t)
|
void |
setTransaction(java.lang.String t)
|
void |
setTransactionAsChar(char c)
|
void |
setType(char t)
Sets the message type. |
Methods inherited from class osmq.util.ImmutableImpl |
isImmutable, setImmutable |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface osmq.util.Immutable |
isImmutable, setImmutable |
Constructor Detail |
public MessageHeader()
public MessageHeader(DataRecord ds)
public MessageHeader(java.lang.String s)
public MessageHeader(byte[] value)
Method Detail |
public long getCorrelationNumber()
getCorrelationNumber
in interface MessageAttributes
public void setCorrelationNumber(long n)
setCorrelationNumber
in interface MessageAttributes
public java.lang.String getCorrelationString()
getCorrelationString
in interface MessageAttributes
public void setCorrelationString(java.lang.String s)
setCorrelationString
in interface MessageAttributes
public java.lang.String getTopic()
getTopic
in interface MessageAttributes
public void setTopic(java.lang.String t)
setTopic
in interface MessageAttributes
public java.lang.String getKey()
getKey
in interface MessageAttributes
public void setKey(java.lang.String t)
setKey
in interface MessageAttributes
public void setKeyAsInt(int n)
setKeyAsInt
in interface MessageAttributes
public int getKeyAsInt()
getKeyAsInt
in interface MessageAttributes
public java.lang.String getTransaction()
Standard events used for down-stream subscribers that maintain databases are DataSetMessage.EVENT_ADD, DataSetMessage.EVENT_DELETE and DataSetMessage.and EVENT_UPDATE.
getTransaction
in interface MessageAttributes
public char getTransactionAsChar()
getTransactionAsChar
in interface MessageAttributes
public void setTransaction(java.lang.String t)
setTransaction
in interface MessageAttributes
public void setTransactionAsChar(char c)
setTransactionAsChar
in interface MessageAttributes
public java.lang.String getOriginator()
getOriginator
in interface MessageAttributes
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.
setOriginator
in interface MessageAttributes
public char getType()
getType
in interface MessageAttributes
MessageAttributes.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 TYPE_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.)
setType
in interface MessageAttributes
setRecipient(String t)
public java.lang.String getRecipient()
getRecipient
in interface MessageAttributes
public void setRecipient(java.lang.String s)
setRecipient
in interface MessageAttributes
public char getFormat()
MessageAttributes
FORMAT_UNKNOWN ('U')
FORMAT_TEXT ('T')
FORMAT_DATASET ('D')
FORMAT_BINARY ('B')
getFormat
in interface MessageAttributes
public void setFormat(char t)
MessageAttributes
Valid values include
FORMAT_UNKNOWN ('U')
FORMAT_TEXT ('T')
FORMAT_DATASET ('D')
FORMAT_BINARY ('B')
DataSetMessages default to a format of FORMAT_DATASET.
setFormat
in interface MessageAttributes
public long getTimeStamp()
getTimeStamp
in interface MessageAttributes
public void setTimeStamp(long n)
NOTE This value should be set by the underlying client middleware, and not the application.
setTimeStamp
in interface MessageAttributes
n
- the time as a long.public long getSequenceNumber()
getSequenceNumber
in interface MessageAttributes
public void setSequenceNumber(long n)
NOTE This value should be set by the underlying client middleware, and not the application.
setSequenceNumber
in interface MessageAttributes
public boolean hasAssignedRecipient()
hasAssignedRecipient
in interface MessageAttributes
public boolean hasAssignedTopic()
hasAssignedTopic
in interface MessageAttributes
public boolean hasAssignedKey()
MessageAttributes
hasAssignedKey
in interface MessageAttributes
public boolean hasAssignedCorrelationNumber()
MessageAttributes
hasAssignedCorrelationNumber
in interface MessageAttributes
public boolean hasAssignedOriginator()
MessageAttributes
hasAssignedOriginator
in interface MessageAttributes
public byte[] getBytes()
public java.lang.String getText()
public void clearAll()
public java.lang.Object clone()
clone
in interface MessageAttributes
|
(c) 2000 - 2003 MQue Systems All Rights Reserved |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |