|
OSMQ v2.0.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An entity relational message (DataSetMessage) contains entity data values, and supports mapping those data values to/from Java data types, and routing them as a unit to remote processes.
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 |
Method Summary | |
void |
clear(int posn)
Clears the value at the designated position, setting it to null (or zero if numeric) |
void |
clearBody()
Clear all the body elements in the DataSetMessage object to null (or zero if numeric) |
void |
clearHeader()
Clear all the header elements in the DataSetMessage object to null (or zero if numeric) |
java.lang.Object |
clone()
|
java.math.BigDecimal |
getBigDecimal(int posn)
Returns the value at the designated position in the message body as a BigDecimal |
boolean |
getBoolean(int posn)
Returns the value at the designated position in the message body as a boolean |
byte |
getByte(int posn)
Returns the value at the designated position in the message body as a byte |
char |
getChar(int posn)
Returns the value at the designated position in the message body as a char |
byte[] |
getClientBytes()
Returns the client (body) data as an array of bytes. |
long |
getCorrelationNumber()
Gets the identifier used to identify a group of transactions as related. |
java.lang.String |
getCorrelationString()
|
java.util.Date |
getDate(int posn)
Returns the value at the designated position in the message body as a java.util.Date |
double |
getDouble(int posn)
Returns the value at the designated position in the message body as a double |
int |
getElementCount()
Returns the number of positions in the message body (including those that are empty) |
java.lang.String |
getElementsAsString()
Returns the message body as a delimited String. |
float |
getFloat(int posn)
Returns the value at the designated position in the message body as a float |
char |
getFormat()
Identifies the body format as either dataset, text or binary. |
java.lang.String |
getFormattedDateString(int posn)
Returns the value at the designated position in the message object as a formatted date string in CCYY-MM-DD format. |
MessageHeader |
getHeader()
Returns the message header values. |
byte[] |
getHeaderBytes()
Returns the header data as an array of bytes. |
int |
getInt(int posn)
Returns the value at the designated position in the message body as an integer. |
java.lang.String |
getKey()
Returns the unique identifier for the data contained in the message. |
int |
getKeyAsInt()
|
long |
getLong(int posn)
Returns the value at the designated position in the message body as a long integer |
byte[] |
getMessageAsBytes()
Returns the message header and body as an array of bytes. |
java.lang.Object |
getObject(int posn)
Returns the value of the designated position in the message body. |
int |
getOffsetIndex()
Returns the base index currently used to reference elements in the message body. |
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. |
short |
getShort(int posn)
Returns the value at the designated position in the message body as a short integer |
java.sql.Date |
getSQLDate(int posn)
Returns the value at the designated position in the message object as an SQL date |
java.lang.String |
getString(int posn)
Returns the value of the designated position in the message body as a String |
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 the message event type -- normally either MessageType.NOTIFICATION or MessageType.REQUEST. |
java.lang.String |
getUnformattedDateString(int posn)
Returns the value at the designated position in the message object as an unformatted date string in CCYYMMDD format. |
java.lang.String |
getUpperCaseString(int posn)
Returns the value at the designated position in the message body as a String with all characters forced into upper case. |
boolean |
hasAssignedCorrelationNumber()
Determines if there is a correlation identifier value. |
boolean |
hasAssignedKey()
Determines if there is a key value identifier. |
boolean |
hasAssignedOriginator()
Determines if there is an originator identifier. |
boolean |
hasAssignedRecipient()
Determine if there is a recipient identifier value. |
boolean |
hasAssignedTopic()
Determines if there is a topic identifier value. |
boolean |
hasAValue(int posn)
Determines whether a position has a value (versus null) |
boolean |
isEmpty(int posn)
Determines if a position has no value (is empty) |
boolean |
isImmutable()
Returns true if this is an immutable message. |
void |
setBigDecimal(int posn,
java.math.BigDecimal value)
Sets the element at the designated position in the message body to a BigDecimal value |
void |
setBoolean(int posn,
boolean value)
Sets the element at the designated position in the message body to a boolean value |
void |
setByte(int posn,
byte value)
Sets the element at the designated position in the message body to a byte value |
void |
setChar(int posn,
char value)
Sets the element at the designated position in the message body to a char value |
void |
setClientBytes(byte[] data)
Sets the client (body) data from an array of bytes. |
void |
setClientBytes(DataRecord ds)
Sets the client (body) data from values in a message body. |
void |
setCorrelationNumber(long n)
Sets the identifier used to identify a group of transactions as related. |
void |
setCorrelationString(java.lang.String s)
Sets the identifier used to identify a group of transactions as related. |
void |
setDate(int posn,
java.util.Date value)
Sets the element at the designated position in the message body to a Date value |
void |
setDateString(int posn,
java.lang.String value)
Sets the element at the designated position in the message body to an date value. |
void |
setDecimalString(int posn,
java.lang.String value)
Sets the element at the designated position to a String value that represents a decimal value. |
void |
setDouble(int posn,
double value)
Sets the element at the designated position in the message body to a double value |
void |
setElementCount(int sz)
|
void |
setFloat(int posn,
float value)
Sets the element at the designated position in the message body to a float value |
void |
setFormat(char t)
Sets the body format identifier. |
void |
setHeader(MessageHeader header)
Sets the message header values. |
void |
setHeaderBytes(byte[] value)
Sets the header data from an array of bytes. |
void |
setImmutable()
Sets the message state to immutable. The values of an immutable message cannot be modified. |
void |
setInt(int posn,
int value)
Sets the element at the designated position in the message body to an int value |
void |
setKey(java.lang.String s)
Sets the unique identifier for the data contained in the message. |
void |
setKeyAsInt(int n)
Sets the unique identifier for the data contained in the message. |
void |
setLong(int posn,
long value)
Sets the element at the designated position in the message body to a long value |
void |
setNull(int posn)
Sets the value at the designated position in the message body to null |
void |
setObject(int posn,
java.lang.Object value)
Sets the value at the designated position in the message body |
void |
setOffsetIndex(int value)
Sets the base index used to reference elements in the message body. |
void |
setOriginator(java.lang.String t)
Sets the identifier of the message sender (publisher). |
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 |
setShort(int posn,
short value)
Sets the element at the designated position in the message body to a short value |
void |
setString(int posn,
java.lang.String s)
Sets the element at the designated position in the message body to a String value |
void |
setTimeStamp(long n)
Sets the time the message was publisherd. |
void |
setTopic(java.lang.String topic)
Sets the topic that identifies the message contents. |
void |
setTransaction(java.lang.String e)
Sets the transaction identifer. |
void |
setTransactionAsChar(char c)
Sets the transaction identifer to a char value. |
void |
setTrimmedString(int posn,
java.lang.String s)
Sets the element at the designated position to a String value. |
void |
setType(char t)
Sets the message type. |
void |
setUpperCaseString(int posn,
java.lang.String value)
Sets the element at the designated position in the message body to an upper-case String value |
java.lang.String |
toString()
|
boolean |
wasNull()
Returns true if the lastfetched element was a null object, or an object with a string length of zero. |
Methods inherited from interface osmq.datarows.DataRow |
isNull |
Method Detail |
public void setOffsetIndex(int value)
setOffsetIndex
in interface osmq.datarows.DataRow
value
- the new base index valuepublic int getOffsetIndex()
getOffsetIndex
in interface osmq.datarows.DataRow
setOffsetIndex(int)
public boolean isImmutable()
isImmutable
in interface Immutable
setImmutable()
public void clear(int posn)
clear
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...
ImmutableDataException
- if the message is immutable.clearBody()
public java.lang.Object getObject(int posn)
getObject
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public char getChar(int posn)
getChar
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public byte getByte(int posn)
getByte
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public boolean getBoolean(int posn)
getBoolean
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public float getFloat(int posn)
getFloat
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public double getDouble(int posn)
getDouble
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public java.math.BigDecimal getBigDecimal(int posn)
getBigDecimal
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public int getInt(int posn)
getInt
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public long getLong(int posn)
getLong
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if columnIndex is not a valid element position.public short getShort(int posn)
getShort
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if columnIndex is not a valid element position.public java.lang.String getString(int posn)
getString
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public java.lang.String getUpperCaseString(int posn)
getUpperCaseString
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid element position.public java.util.Date getDate(int posn)
getDate
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if columnIndex is not a valid element position.setDate(int, Date)
public java.sql.Date getSQLDate(int posn)
getSQLDate
in interface osmq.datarows.DataRow
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.setDateString(int, String)
public java.lang.String getFormattedDateString(int posn)
getFormattedDateString
in interface osmq.datarows.DataRow
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.setDateString(int, String)
public java.lang.String getUnformattedDateString(int posn)
getUnformattedDateString
in interface osmq.datarows.DataRow
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.setDateString(int, String)
public boolean hasAValue(int posn)
hasAValue
in interface osmq.datarows.DataRow
posn
- the position containing the value to be tested
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public boolean isEmpty(int posn)
isEmpty
in interface osmq.datarows.DataRow
posn
- the position containing the value to be tested
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public void setObject(int posn, java.lang.Object value)
setObject
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if p is not a valid element position.
ImmutableException
- if the message object is immutable.public void setString(int posn, java.lang.String s)
setString
in interface osmq.datarows.DataRow
posn
- the element's relative position (1 to n)s
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if p is not a valid element position.
ImmutableException
- if the message object is immutable.public void setTrimmedString(int posn, java.lang.String s)
osmq.datarows.DataRow
setTrimmedString
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...s
- the element's new valuepublic void setNull(int posn)
setNull
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if p is not a valid element position.
ImmutableException
- if the message object is immutable.public void setByte(int posn, byte value)
setByte
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the message is immutable.public void setBoolean(int posn, boolean value)
setBoolean
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the message is immutable.public void setChar(int posn, char value)
setChar
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the message is immutable.public void setFloat(int posn, float value)
setFloat
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the message is immutable.public void setDouble(int posn, double value)
setDouble
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the message is immutable.public void setDecimalString(int posn, java.lang.String value)
osmq.datarows.DataRow
setDecimalString
in interface osmq.datarows.DataRow
value
- the element's new valuepublic void setBigDecimal(int posn, java.math.BigDecimal value)
setBigDecimal
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the message is immutable.public void setDate(int posn, java.util.Date value)
setDate
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the message is immutable.public void setInt(int posn, int value)
setInt
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the message is immutable.public void setLong(int posn, long value)
setLong
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the message is immutable.public void setShort(int posn, short value)
setShort
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the message is immutable.public void setUpperCaseString(int posn, java.lang.String value)
setUpperCaseString
in interface osmq.datarows.DataRow
posn
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the message object is immutable.public void setDateString(int posn, java.lang.String value)
setDateString
in interface osmq.datarows.DataRow
value
- the element's new value in CCYYMMDD or CCYY-MM-DD format. (If the string
contains hyphens, they are removed.)
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the message object is immutable.public void clearBody()
ImmutableException
- if the message is immutable.public void clearHeader()
ImmutableException
- if the message is immutable.public void setImmutable()
setImmutable
in interface Immutable
ImmutableException
public void setHeader(MessageHeader header)
ImmutableDataException
- if the message is immutable.public MessageHeader getHeader()
public byte[] getHeaderBytes()
public void setHeaderBytes(byte[] value)
ImmutableDataException
- if the message is immutable.public byte[] getClientBytes()
public void setClientBytes(DataRecord ds)
ImmutableDataException
- if the message is immutable.public void setClientBytes(byte[] data)
ImmutableDataException
- if the message is immutable.public byte[] getMessageAsBytes()
getMessageAsBytes
in interface Message
public java.lang.String getElementsAsString()
public boolean wasNull()
getXXX()
method call.)
public java.lang.String getTopic()
getTopic
in interface MessageAttributes
public void setTopic(java.lang.String topic)
setTopic
in interface MessageAttributes
ImmutableDataException
- if the message is immutable.public java.lang.String getKey()
getKey
in interface MessageAttributes
public void setKey(java.lang.String s)
setKey
in interface MessageAttributes
s
- the unique key valuepublic void setKeyAsInt(int n)
setKeyAsInt
in interface MessageAttributes
n
- the unique key valuepublic int getKeyAsInt()
getKeyAsInt
in interface MessageAttributes
public java.lang.String getTransaction()
Standard events used for down-stream subscribers that maintain databases are DataSetMessage.TRANSACTION_ADD, DataSetMessage.TRANSACTION_DELETE and DataSetMessage.and TRANSACTION_UPDATE.
getTransaction
in interface MessageAttributes
public char getTransactionAsChar()
getTransactionAsChar
in interface MessageAttributes
public void setTransaction(java.lang.String e)
setTransaction
in interface MessageAttributes
public void setTransactionAsChar(char c)
setTransactionAsChar
in interface MessageAttributes
setTransaction(String)
public long getCorrelationNumber()
getCorrelationNumber
in interface MessageAttributes
public void setCorrelationNumber(long n)
setCorrelationNumber
in interface MessageAttributes
n
- the correlation identifierpublic java.lang.String getCorrelationString()
getCorrelationString
in interface MessageAttributes
public void setCorrelationString(java.lang.String s)
setCorrelationString
in interface MessageAttributes
s
- the correlation identifiersetCorrelationNumber(long)
public java.lang.String getOriginator()
getOriginator
in interface MessageAttributes
public void setOriginator(java.lang.String t)
Normally, this value is not set by an application, and defaults to the client identifier used to attach to the message broker.
setOriginator
in interface MessageAttributes
t
- the message originator (sender)public java.lang.String getRecipient()
getRecipient
in interface MessageAttributes
public void setRecipient(java.lang.String t)
setRecipient
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 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 void setSequenceNumber(long n)
NOTE This value should be set by the underlying client middleware, and not the application.
setSequenceNumber
in interface MessageAttributes
public long getTimeStamp()
getTimeStamp
in interface MessageAttributes
public long getSequenceNumber()
getSequenceNumber
in interface MessageAttributes
public char getFormat()
MessageAttributes.FORMAT_UNKNOWN
MessageAttributes.FORMAT_TEXT
MessageAttributes.FORMAT_DATASET
MessageAttributes.FORMAT_BINARY
DataSetMessages default to a format of MessageAttributes.FORMAT_DATASET.
getFormat
in interface MessageAttributes
public void setFormat(char t)
MessageAttributes.FORMAT_UNKNOWN
MessageAttributes.FORMAT_TEXT
MessageAttributes.FORMAT_DATASET
MessageAttributes.FORMAT_BINARY
setFormat
in interface MessageAttributes
java.lang.IllegalArgumentException
- if attempt to set value
other than MessageAttributes.FORMAT_DATASETpublic boolean hasAssignedRecipient()
hasAssignedRecipient
in interface MessageAttributes
public boolean hasAssignedTopic()
hasAssignedTopic
in interface MessageAttributes
public boolean hasAssignedCorrelationNumber()
hasAssignedCorrelationNumber
in interface MessageAttributes
public boolean hasAssignedKey()
hasAssignedKey
in interface MessageAttributes
public boolean hasAssignedOriginator()
hasAssignedOriginator
in interface MessageAttributes
public java.lang.String toString()
public int getElementCount()
getElementCount
in interface osmq.datarows.DataRow
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public void setElementCount(int sz)
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 |