com.ibm.mq
Class MQMD
- java.lang.Object
- com.ibm.mq.jmqi.JmqiObject
- com.ibm.mq.MQMD
- public class MQMD
- extends com.ibm.mq.jmqi.JmqiObject
Character data in the message descriptor is in the character set of the queue manager to which the application is connected; this is given by the CodedCharSetId queue manager attribute. Numeric data in the message descriptor is in the native machine encoding (given by MQENC_NATIVE).
If the sending and receiving queue managers use different character sets or encodings, the data in the message descriptor is converted automatically - it is not necessary for the receiving application to perform these conversions.
You can write an exit to convert an application's message data, that will be invoked when an MQGET call retrieves the message.
Field Summary
Modifier and Type | Field and Description |
---|---|
|
accountingToken
The accounting token.
|
|
applicationIdData
Application ID data.
|
|
applicationOriginData
Data about the originating application.
|
|
backoutCount
The number of times the message has been backed out.
|
|
characterSet
The coded character set identifier of character data in the application message data.
|
|
correlationId
Specifies the correlation identifier of the message to be retrieved.
|
|
encoding
Specifies the representation used for numeric values in the application message data.
|
|
expiry
The expiry time (in tenths of a second).
|
|
feedback
The nature of the feedback report.
|
|
format
A name which indicates the nature of the data in the message.
|
|
groupId
The ID of the message group.
|
|
messageFlags
Flags controlling the segmentation and status of the message.
|
|
messageId
Specifies the message identifier of the message to be retrieved.
|
|
messageSequenceNumber
Sequence number of logical message within group.
|
|
messageType
Indicates the type of the message.
|
|
offset
Offset of data in the physical message from the start of the logical message.
|
|
originalLength
Original length of a segmented message.
|
|
persistence
The message persistence.
|
|
priority
The message priority.
|
|
putApplicationName
The name of the application that put the message.
|
|
putApplicationType
The type of application that put the message.
|
|
putDateTime
The time and date when the message was put.
|
|
replyToQueueManagerName
The name of the queue manager to which reply or report messages should be sent.
|
|
replyToQueueName
The name of the queue to which a reply should be sent.
|
|
report
This field enables the application sending the original message to specify which report
messages are required, whether the application message data is to be included in them, and also
how the message and correlation ID in the report or reply are to be set.
|
|
userId
The user ID.
|
Fields inherited from class com.ibm.mq.jmqi.JmqiObject |
---|
COMP_JM, COMP_JN, COMP_JO |
Constructor Summary
Constructor and Description |
---|
MQMD()
The default constructor.
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
getVersion()
Gets the version of the message.
|
|
setVersion(int version)
Sets the version of the message.
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail
report
- public int report
messageType
- public int messageType
Application defined values can also be used; these should be in the range
MQMT_APPL_FIRST
to MQMT_APPL_LAST
.
The default value of this field is MQC.MQMT_DATAGRAM.
expiry
- public int expiry
MQC.MQRO_EXPIRATION
flags, then
a report is generated when the message is discarded.
The default value is MQC.MQEI_UNLIMITED
, which means that the
message never expires.
feedback
- public int feedback
MQC.MQMT_REPORT
to indicate the nature of the report.
The following feedback codes are defined:
-
MQC.MQFB_EXPIRATION
-
MQC.MQFB_COA
-
MQC.MQFB_COD
-
MQC.MQFB_QUIT
-
MQFB_NONE
-
MQC.MQFB_SYSTEM_FIRST
-
MQC.MQFB_APPL_CANNOT_BE_STARTED
-
MQC.MQFB_TM_ERROR
-
MQC.MQFB_APPL_TYPE_ERROR
-
MQC.MQFB_STOPPED_BY_MSG_EXIT
-
MQC.MQFB_XMIT_Q_MSG_ERROR
-
MQC.MQFB_SYSTEM_LAST
-
MQC.MQFB_ACTIVITY
-
MQC.MQFB_MAX_ACTIVITIES
-
MQC.MQFB_NOT_FORWARDED
-
MQC.MQFB_NOT_DELIVERED
-
MQC.MQFB_UNSUPPORTED_FORWARDING
-
MQC.MQFB_UNSUPPORTED_DELIVERY
Application-defined feedback values in the range MQC.MQFB_APPL_FIRST
to MQC.MQFB_APPL_LAST
can also be used.
The default value of this field is MQC.MQFB_NONE
, indicating that no
feedback is provided.
encoding
- public int encoding
The following encodings are defined:
binary | packed decimal | floating point | |
---|---|---|---|
big-endian | MQC.MQENC_INTEGER_NORMAL |
MQC.MQENC_DECIMAL_NORMAL |
MQC.MQENC_FLOAT_IEEE_NORMAL |
little-endian | MQC.MQENC_INTEGER_REVERSED |
MQC.MQENC_DECIMAL_REVERSED |
MQC.MQENC_FLOAT_IEEE_REVERSED |
MQC.MQENC_INTEGER_NORMAL |
MQENC_DECIMAL_NORMAL |
MQC.MQENC_FLOAT_S390 |
Construct a value for the encoding field by combining one value from each row of the table by
use of '+' or '|' operators. The default value is MQC.MQENC_INTEGER_NORMAL |
MQC.MQENC_DECIMAL_NORMAL | MQC.MQENC_FLOAT_IEEE_NORMAL. For convenience this value is also
represented by MQC.MQENC_NATIVE. This setting causes
MQMessage.writeInt()
to write, for example, a big-endian integer,
and MQMessage.readInt()
to read a big-endian integer.
A loss in precision can occur when converting from IEEE format floating point values to
characterSet
- public int characterSet
MQMessage.readString()
,
MQMessage.readLine()
and MQMessage.writeString()
.
The default value for this field is MQC.MQCCSI_Q_MGR
. The following
additional character set values are supported:
- 850
- commonly used ASCII codeset
- 819
- the ISO standard ASCII codeset
- 37
- the American EBCDIC codeset
- 1200
- Unicode
- 1208
- UTF-8
format
- public java.lang.String format
The queue manager built-in formats are:
-
MQC.MQFMT_NONE
-
MQC.MQFMT_ADMIN
-
MQC.MQFMT_COMMAND_1
-
MQC.MQFMT_COMMAND_2
-
MQC.MQFMT_DEAD_LETTER_HEADER
-
MQC.MQFMT_EVENT
-
MQC.MQFMT_MD_EXTENSION
-
MQC.MQFMT_PCF
-
MQC.MQFMT_STRING
-
MQC.MQFMT_TRIGGER
-
MQC.MQFMT_XMIT_Q_HEADER
The default value is MQC.MQFMT_NONE.
priority
- public int priority
The default value is MQC.MQPRI_PRIORITY_AS_Q_DEF
.
persistence
- public int persistence
The default value is MQC.MQPER_PERSISTENCE_AS_Q_DEF
messageId
- public byte[] messageId
MQQueue.get()
. Normally the queue manager returns the first
message whose message identifier and correlation identifier match those specified. The special
value MQC.MQMI_NONE allows any message identifier to match.
For MQQueue.put()
this specifies the message identifier to use.
If MQC.MQMI_NONE is specified, the queue manager generates a unique message identifier when the
message is put. The value of this field is updated after the put to indicate the message
identifier that was used.
The default value is MQC.MQMI_NONE.
correlationId
- public byte[] correlationId
MQQueue.get()
. Normally the queue manager returns the first
message whose message identifier and correlation identifier match those specified. The special
value MQC.MQCI_NONE allows any correlation identifier to match.
For MQQueue.put()
this specifies the correlation identifier to
use.
The default value is MQC.MQCI_NONE.
backoutCount
- public int backoutCount
MQQueue.get()
, as part of a unit of work,
and subsequently backed out.
The default value is zero.
replyToQueueName
- public java.lang.String replyToQueueName
The default value is "" (empty string).
replyToQueueManagerName
- public java.lang.String replyToQueueManagerName
The default value is "" (empty string).
userId
- public java.lang.String userId
The default value is "" (empty string).
accountingToken
- public byte[] accountingToken
The default value is an array of zeros.
applicationIdData
- public java.lang.String applicationIdData
The default value is "" (empty string).
putApplicationType
- public int putApplicationType
The following values are defined by the system:
- MQC.MQAT_AIX
- MQC.MQAT_CICS
- MQC.MQAT_DOS
- MQC.MQAT_IMS
- MQC.MQAT_MVS
- MQC.MQAT_OS2
- MQC.MQAT_OS400
- MQC.MQAT_QMGR
- MQC.MQAT_UNIX
- MQC.MQAT_WINDOWS
- MQC.MQAT_JAVA
- MQC.MQAT_UNKNOWN
- MQC.MQAT_NO_CONTEXT
- MQC.MQAT_CICS_VSE
- MQC.MQAT_VMS
- MQC.MQAT_GUARDIAN
- MQC.MQAT_VOS
- MQC.MQAT_DEFAULT
- MQC.MQAT_NSK
- MQC.MQAT_CICS_BRIDGE
- MQC.MQAT_NOTES_AGENT
- MQC.MQAT_WINDOWS_NT
- MQC.MQAT_IMS_BRIDGE
- MQC.MQAT_XCF
The default value is the special value MQC.MQAT_NO_CONTEXT, which indicates that no context information is present in the message.
putApplicationName
- public java.lang.String putApplicationName
The default value is "" (empty string).
putDateTime
- public java.util.GregorianCalendar putDateTime
applicationOriginData
- public java.lang.String applicationOriginData
The default value is "" (empty string).
groupId
- public byte[] groupId
messageSequenceNumber
- public int messageSequenceNumber
offset
- public int offset
messageFlags
- public int messageFlags
originalLength
- public int originalLength
Constructor Detail
MQMD
- public MQMD()
Method Detail
getVersion
- public int getVersion()
setVersion
- public void setVersion(int version)
- throws MQException
version
- the value to be set - valid values are
- com.ibm.mq.constants.CMQC.MQMD_VERSION_1
- com.ibm.mq.constants.CMQC.MQMD_VERSION_2
MQException
- if the value of the version is invalid.
You can select one type from each row of the following table:
MQC.MQRO_EXCEPTION
MQC.MQRO_EXCEPTION_WITH_DATA
MQC.MQRO_EXCEPTION_WITH_FULL_DATA
MQC.MQRO_EXPIRATION
MQC.MQRO_EXPIRATION_WITH_DATA
MQC.MQRO_EXPIRATION_WITH_FULL_DATA
MQC.MQRO_COA
MQC.MQRO_COA_WITH_DATA
MQC.MQRO_COA_WITH_FULL_DATA
MQC.MQRO_COD
MQC.MQRO_COD_WITH_DATA
MQC.MQRO_COD_WITH_FULL_DATA
You can specify how the message ID is generated for the report or reply message:
MQC.MQRO_NEW_MSG_ID
MQC.MQRO_PASS_MSG_ID
You can specify one of the following to control how to set the correlation ID of the report or reply message:
MQC.MQRO_COPY_MSG_ID_TO_CORREL_ID
MQC.MQRO_PASS_CORREL_ID
You can specify the following to pass the discard option and exiry time of the original message to the report or reply message:
MQC.MQRO_PASS_DISCARD_AND_EXPIRY
You can specify one of the following to control the disposition of the original message when it cannot be deleivered to the destination queue:
MQC.MQRO_DEAD_LETTER_Q
MQC.MQRO_DISCARD_MSG
MQC.MQRO_PASS_DISCARD_AND_EXPIRY
If no report options are specified, the default is
MQC.MQRO_NEW_MSG_ID | MQC.MQRO_COPY_MSG_ID_TO_CORREL_ID | MQC.MQRO_DEAD_LETTER_Q.