public class MQMD extends MQMD1
In addition to being able to read or write its content from a message body or byte stream, this class can get or set field values from the MQMD portion of an MQMessage object using the copyFrom or copyTo methods.
struct tag MQMD {
MQCHAR4 StrucId; // Structure identifier
MQLONG Version; // Structure version number
MQLONG Report; // Options for report messages
MQLONG MsgType; // Message type
MQLONG Expiry; // Message lifetime
MQLONG Feedback; // Feedback or reason code
MQLONG Encoding; // Numeric encoding of message data
MQLONG CodedCharSetId; // Character set identifier of message data
MQCHAR8 Format; // Format name of message data
MQLONG Priority; // Message priority
MQLONG Persistence; // Message persistence
MQBYTE24 MsgId; // Message identifier
MQBYTE24 CorrelId; // Correlation identifier
MQLONG BackoutCount; // Backout counter
MQCHAR48 ReplyToQ; // Name of reply queue
MQCHAR48 ReplyToQMgr; // Name of reply queue manager
MQCHAR12 UserIdentifier; // User identifier
MQBYTE32 AccountingToken; // Accounting token
MQCHAR32 ApplIdentityData; // Application data relating to identity
MQLONG PutApplType; // Type of application that put the message
MQCHAR28 PutApplName; // Name of application that put the message
MQCHAR8 PutDate; // Date when message was put
MQCHAR8 PutTime; // Time when message was put
MQCHAR4 ApplOriginData; // Application data relating to origin
MQBYTE24 GroupId; // Group identifier
MQLONG MsgSeqNumber; // Sequence number of logical message within group
MQLONG Offset; // Offset of data in physical message from start of logical message
MQLONG MsgFlags; // Message flags
MQLONG OriginalLength; // Length of original message
}
MQHeader.Field| Modifier and Type | Field and Description |
|---|---|
static int |
SIZE1
Size of a Version 1 MQMD structure in bytes
|
static int |
SIZE2
Size of a version 2 MQMD structure in bytes
|
| Constructor and Description |
|---|
MQMD()
Constructs an MQMD instance with default field values.
|
MQMD(java.io.DataInput message)
Constructs an MQMD instance populated from an MQMessage.
|
MQMD(java.io.DataInput message,
int encoding,
int characterSet)
Constructs an MQMD instance populated from a DataInput source.
|
MQMD(int version)
Constructs an MQMD instance of the given version with default field values.
|
MQMD(MQMD1 md)
Constucts an MQMD populated from the content of an MQMD or MQMD1 instance.
|
| Modifier and Type | Method and Description |
|---|---|
MQMD |
coalesce(MQMDE mde,
boolean relink)
Sets the MQMD extension fields in this MQMD from an MQMDE.
|
void |
copyFrom(MQMD md)
duplicate the content of an MQMD header into this header
|
void |
copyTo(MQMD md)
duplicate the content of this header into an MQMD header
|
byte[] |
getGroupId()
gets the Group identifier
|
int |
getMsgFlags()
gets the Message flags
|
int |
getMsgSeqNumber()
gets the Sequence number of logical message within group
|
int |
getOffset()
gets the Offset of data in physical message from start of logical message
|
int |
getOriginalLength()
gets the Length of original message
|
boolean |
hasExtensionContent()
indicates whether the header has extension content
|
void |
setGroupId(byte[] value)
sets the Group identifier
|
void |
setMsgFlags(int value)
sets the Message flags
|
void |
setMsgSeqNumber(int value)
sets the Sequence number of logical message within group
|
void |
setOffset(int value)
sets the Offset of data in physical message from start of logical message
|
void |
setOriginalLength(int value)
sets the Length of original message
|
format, getAccountingToken, getApplIdentityData, getApplOriginData, getBackoutCount, getCodedCharSetId, getCorrelId, getEncoding, getExpiry, getFeedback, getFormat, getMsgId, getMsgType, getPersistence, getPriority, getPutApplName, getPutApplType, getPutDate, getPutDateTime, getPutTime, getReplyToQ, getReplyToQMgr, getReport, getStrucId, getUserIdentifier, getVersion, nextCharacterSet, nextCharacterSet, nextEncoding, nextEncoding, nextFormat, nextFormat, setAccountingToken, setApplIdentityData, setApplOriginData, setBackoutCount, setCodedCharSetId, setCorrelId, setEncoding, setExpiry, setFeedback, setFormat, setMsgId, setMsgType, setPersistence, setPriority, setPutApplName, setPutApplType, setPutDate, setPutDateTime, setPutTime, setReplyToQ, setReplyToQMgr, setReport, setUserIdentifiercharacterSet, encoding, fields, getBytesValue, getCharValue, getCharValue, getIntValue, getJmqiEnv, getStringValue, getValue, headerType, read, read, read, setBytesValue, setCharValue, setCharValue, setIntValue, setStringValue, setValue, size, store, store, toString, type, validate, write, writepublic static final int SIZE1
public static final int SIZE2
public MQMD()
public MQMD(java.io.DataInput message)
throws MQDataException,
java.io.IOException
message - the message to readMQDataException - if the message content does not yield a valid MQMD stucturejava.io.IOException - if there is a problem reading the message contentpublic MQMD(java.io.DataInput message,
int encoding,
int characterSet)
throws MQDataException,
java.io.IOException
message - the MQMessage or other DataInput source to readencoding - the initial numeric encoding of the data in the messagecharacterSet - the initial CCSID of the data in the messageMQDataException - if the message content does not yield a valid MQMD stucturejava.io.IOException - if there is a problem reading the message contentpublic MQMD(MQMD1 md) throws java.io.IOException
md - java.io.IOExceptionpublic MQMD(int version)
version - public byte[] getGroupId()
public void setGroupId(byte[] value)
value - the Group identifierpublic int getMsgSeqNumber()
public void setMsgSeqNumber(int value)
value - the Sequence number of logical message within grouppublic int getOffset()
public void setOffset(int value)
value - the Offset of data in physical message from start of logical messagepublic int getMsgFlags()
public void setMsgFlags(int value)
value - the Message flagspublic int getOriginalLength()
public void setOriginalLength(int value)
value - the Length of original messagepublic void copyFrom(MQMD md)
MQMD1copyFrom in class MQMD1md - - the header to copyMQMD1.copyFrom(com.ibm.mq.MQMD)public void copyTo(MQMD md) throws MQDataException
MQMD1copyTo in class MQMD1md - - the header to copy intoMQDataExceptionMQMD1.copyTo(com.ibm.mq.MQMD)public MQMD coalesce(MQMDE mde, boolean relink)
mde - relink - public boolean hasExtensionContent()
MQMD1hasExtensionContent in class MQMD1