|
OSMQ v2.0.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectosmq.messages.DataSetMessageBean
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 |
Constructor Summary | |
DataSetMessageBean()
|
|
DataSetMessageBean(int sz)
|
|
DataSetMessageBean(MessageHeader header,
byte[] body)
|
|
DataSetMessageBean(MessageHeader header,
DataRecord body)
|
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 DataRecord (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 whether the event type is a MessageAttributes.NOTIFICATION or MessageAttributes.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 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. |
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. |
boolean |
isNull(int posn)
Determines if a position has no value (has a null value). |
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 class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DataSetMessageBean(MessageHeader header, DataRecord body)
public DataSetMessageBean(MessageHeader header, byte[] body)
public DataSetMessageBean()
public DataSetMessageBean(int sz)
Method Detail |
public void setOffsetIndex(int value)
setOffsetIndex
in interface DataSetMessage
value
- the new base index valuepublic int getOffsetIndex()
getOffsetIndex
in interface DataSetMessage
setOffsetIndex(int)
public boolean isImmutable()
isImmutable
in interface DataSetMessage
setImmutable()
public void clear(int posn)
clear
in interface DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.setDateString(int, String)
public java.lang.String getFormattedDateString(int posn)
getFormattedDateString
in interface DataSetMessage
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.setDateString(int, String)
public java.lang.String getUnformattedDateString(int posn)
getUnformattedDateString
in interface DataSetMessage
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.setDateString(int, String)
public boolean hasAValue(int posn)
hasAValue
in interface DataSetMessage
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 DataSetMessage
posn
- the position containing the value to be tested
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public boolean isNull(int posn)
isNull
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 DataSetMessage
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 DataSetMessage
posn
- the element's relative position (1 to n)
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 DataSetMessage
public void setNull(int posn)
setNull
in interface DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
public void setBigDecimal(int posn, java.math.BigDecimal value)
setBigDecimal
in interface DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
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()
clearBody
in interface DataSetMessage
ImmutableException
- if the message is immutable.public void clearHeader()
clearHeader
in interface DataSetMessage
ImmutableException
- if the message is immutable.public void setImmutable()
setImmutable
in interface DataSetMessage
ImmutableException
public void setHeader(MessageHeader header)
setHeader
in interface DataSetMessage
ImmutableDataException
- if the message is immutable.public MessageHeader getHeader()
getHeader
in interface DataSetMessage
public byte[] getHeaderBytes()
getHeaderBytes
in interface DataSetMessage
public void setHeaderBytes(byte[] value)
setHeaderBytes
in interface DataSetMessage
ImmutableDataException
- if the message is immutable.public byte[] getClientBytes()
getClientBytes
in interface DataSetMessage
public void setClientBytes(DataRecord ds)
setClientBytes
in interface DataSetMessage
ImmutableDataException
- if the message is immutable.public void setClientBytes(byte[] data)
setClientBytes
in interface DataSetMessage
ImmutableDataException
- if the message is immutable.public byte[] getMessageAsBytes()
getMessageAsBytes
in interface DataSetMessage
public java.lang.String getElementsAsString()
getElementsAsString
in interface DataSetMessage
public boolean wasNull()
getXXX()
method call.)
wasNull
in interface DataSetMessage
public java.lang.String getTopic()
getTopic
in interface DataSetMessage
public void setTopic(java.lang.String topic)
setTopic
in interface DataSetMessage
ImmutableDataException
- if the message is immutable.public java.lang.String getKey()
getKey
in interface DataSetMessage
public void setKey(java.lang.String s)
setKey
in interface DataSetMessage
s
- the unique key valuepublic void setKeyAsInt(int n)
setKeyAsInt
in interface DataSetMessage
n
- the unique key valuepublic int getKeyAsInt()
getKeyAsInt
in interface DataSetMessage
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 DataSetMessage
public char getTransactionAsChar()
getTransactionAsChar
in interface DataSetMessage
public void setTransaction(java.lang.String e)
setTransaction
in interface DataSetMessage
public void setTransactionAsChar(char c)
setTransactionAsChar
in interface DataSetMessage
setTransaction(String)
public long getCorrelationNumber()
getCorrelationNumber
in interface DataSetMessage
public void setCorrelationNumber(long n)
setCorrelationNumber
in interface DataSetMessage
n
- the correlation identifierpublic java.lang.String getCorrelationString()
getCorrelationString
in interface DataSetMessage
public void setCorrelationString(java.lang.String s)
setCorrelationString
in interface DataSetMessage
s
- the correlation identifiersetCorrelationNumber(long)
public java.lang.String getOriginator()
getOriginator
in interface DataSetMessage
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 DataSetMessage
t
- the message originator (sender)public java.lang.String getRecipient()
getRecipient
in interface DataSetMessage
public void setRecipient(java.lang.String t)
setRecipient
in interface DataSetMessage
public char getType()
getType
in interface DataSetMessage
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 DataSetMessage
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 DataSetMessage
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 DataSetMessage
public long getTimeStamp()
getTimeStamp
in interface DataSetMessage
public long getSequenceNumber()
getSequenceNumber
in interface DataSetMessage
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 DataSetMessage
public void setFormat(char t)
MessageAttributes.FORMAT_UNKNOWN
MessageAttributes.FORMAT_TEXT
MessageAttributes.FORMAT_DATASET
MessageAttributes.FORMAT_BINARY
setFormat
in interface DataSetMessage
java.lang.IllegalArgumentException
- if attempt to set value
other than MessageAttributes.FORMAT_DATASETpublic boolean hasAssignedRecipient()
hasAssignedRecipient
in interface DataSetMessage
public boolean hasAssignedTopic()
hasAssignedTopic
in interface DataSetMessage
public boolean hasAssignedCorrelationNumber()
hasAssignedCorrelationNumber
in interface DataSetMessage
public boolean hasAssignedKey()
hasAssignedKey
in interface DataSetMessage
public boolean hasAssignedOriginator()
hasAssignedOriginator
in interface DataSetMessage
java.lang.ArrayIndexOutOfBoundsException
- if p is not a valid element position.public java.lang.String toString()
toString
in interface DataSetMessage
public int getElementCount()
getElementCount
in interface DataSetMessage
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public void setElementCount(int sz)
setElementCount
in interface DataSetMessage
public java.lang.Object clone()
clone
in interface DataSetMessage
|
(c) 2000 - 2003 MQue Systems All Rights Reserved |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |