public class MQMD1 extends com.ibm.mq.headers.internal.Header implements MQChainable
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 tagMQMD {
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
}
MQMDMQHeader.Field| Modifier and Type | Field and Description |
|---|---|
static int |
SIZE
size of an MQMD1 Header in bytes
|
| Constructor and Description |
|---|
MQMD1()
Constructs an MQMD1 instance with default field values.
|
MQMD1(java.io.DataInput message)
Constructs an MQMD1 instance populated from an MQMessage.
|
MQMD1(java.io.DataInput message,
int encoding,
int characterSet)
Constructs an MQMD1 instance populated from a DataInput source.
|
| Modifier and Type | Method and Description |
|---|---|
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
|
java.lang.String |
format() |
byte[] |
getAccountingToken()
gets the Accounting token
|
java.lang.String |
getApplIdentityData()
gets the Application data relating to identity
|
java.lang.String |
getApplOriginData()
gets the Application data relating to origin
|
int |
getBackoutCount()
gets the Backout counter
|
int |
getCodedCharSetId()
Get the Character set identifier of data that follows.
|
byte[] |
getCorrelId()
gets the Correlation identifier
|
int |
getEncoding()
Get the numeric encoding of the data that follows.
|
int |
getExpiry()
gets the Message lifetime
|
int |
getFeedback()
gets the Feedback or reason code
|
java.lang.String |
getFormat()
gets the Format name of message data
|
byte[] |
getMsgId()
gets the Message identifier
|
int |
getMsgType()
gets the Message type
|
int |
getPersistence()
gets the Message persistence
|
int |
getPriority()
get the Message priority
|
java.lang.String |
getPutApplName()
gets the Name of application that put the message
|
int |
getPutApplType()
gets the Type of application that put the message
|
java.lang.String |
getPutDate()
gets the Date when message was put
|
long |
getPutDateTime()
gets the Date and Time when message was put
|
java.lang.String |
getPutTime()
gets the Time when message was put
|
java.lang.String |
getReplyToQ()
gets the Name of reply queue
|
java.lang.String |
getReplyToQMgr()
gets the Name of reply queue manager
|
int |
getReport()
gets the Options for report messages
|
java.lang.String |
getStrucId()
Get the structure identifier; the value will be MQMD_STRUC_ID
|
java.lang.String |
getUserIdentifier()
gets the User identifier
|
int |
getVersion()
Get the Structure version number
|
boolean |
hasExtensionContent()
indicates whether the header has extension content
|
int |
nextCharacterSet() |
void |
nextCharacterSet(int value)
Sets the CCSID of the next header or message content.
|
int |
nextEncoding() |
void |
nextEncoding(int value)
Sets the numeric encoding of the next header or message content.
|
java.lang.String |
nextFormat() |
void |
nextFormat(java.lang.String value)
Sets the format of the next header or message content.
|
void |
setAccountingToken(byte[] value)
sets the Accounting token
|
void |
setApplIdentityData(java.lang.String value)
sets the Application data relating to identity
|
void |
setApplOriginData(java.lang.String value)
sets the Application data relating to origin
|
void |
setBackoutCount(int value)
sets the Backout counter
|
void |
setCodedCharSetId(int value)
Set the Character set identifier of data that follows.
|
void |
setCorrelId(byte[] value)
sets the Correlation identifier
|
void |
setEncoding(int value)
Set the numeric encoding of the data that follows.
|
void |
setExpiry(int value)
sets the Message lifetime
|
void |
setFeedback(int value)
sets the Feedback or reason code
|
void |
setFormat(java.lang.String value)
sets the Format name of message data
|
void |
setMsgId(byte[] value)
sets the Message identifier
|
void |
setMsgType(int value)
sets the Message type
|
void |
setPersistence(int value)
sets the Message persistence
|
void |
setPriority(int value)
sets the Message priority
|
void |
setPutApplName(java.lang.String value)
sets the Name of application that put the message
|
void |
setPutApplType(int value)
sets the Type of application that put the message
|
void |
setPutDate(java.lang.String value)
sets the Date when message was put
|
void |
setPutDateTime(long millis)
sets the Date and Time when message was put
|
void |
setPutTime(java.lang.String value)
sets the Time when message was put
|
void |
setReplyToQ(java.lang.String value)
sets the Name of reply queue
|
void |
setReplyToQMgr(java.lang.String value)
sets the Name of reply queue manager
|
void |
setReport(int value)
sets the Options for report messages
|
void |
setUserIdentifier(java.lang.String value)
sets the User identifier
|
characterSet, 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 SIZE
public MQMD1()
public MQMD1(java.io.DataInput message)
throws MQDataException,
java.io.IOException
message - the message to readMQDataException - if the message content does not yield a valid MQMD1 stucturejava.io.IOException - if there is a problem reading the message contentpublic MQMD1(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 MQMD1 stucturejava.io.IOException - if there is a problem reading the message contentpublic java.lang.String getStrucId()
public int getVersion()
public int getReport()
public void setReport(int value)
value - the Options for report messagespublic int getMsgType()
public void setMsgType(int value)
value - the Message typepublic int getExpiry()
public void setExpiry(int value)
value - the Message lifetimepublic int getFeedback()
public void setFeedback(int value)
value - the Feedback or reason codepublic int getEncoding()
public void setEncoding(int value)
value - the numeric encoding. A combination of MQENC_* values.public int getCodedCharSetId()
public void setCodedCharSetId(int value)
value - the Character set identifier.public java.lang.String getFormat()
public void setFormat(java.lang.String value)
value - the Format name of message datapublic int getPriority()
public void setPriority(int value)
value - the Message prioritypublic int getPersistence()
public void setPersistence(int value)
value - the Message persistencepublic byte[] getMsgId()
public void setMsgId(byte[] value)
value - the Message identifierpublic byte[] getCorrelId()
public void setCorrelId(byte[] value)
value - the Correlation identifierpublic int getBackoutCount()
public void setBackoutCount(int value)
value - the Backout counterpublic java.lang.String getReplyToQ()
public void setReplyToQ(java.lang.String value)
value - the Name of reply queuepublic java.lang.String getReplyToQMgr()
public void setReplyToQMgr(java.lang.String value)
value - the Name of reply queue managerpublic java.lang.String getUserIdentifier()
public void setUserIdentifier(java.lang.String value)
value - the User identifierpublic byte[] getAccountingToken()
public void setAccountingToken(byte[] value)
value - the Accounting tokenpublic java.lang.String getApplIdentityData()
public void setApplIdentityData(java.lang.String value)
value - the Application data relating to identitypublic int getPutApplType()
public void setPutApplType(int value)
value - the Type of application that put the messagepublic java.lang.String getPutApplName()
public void setPutApplName(java.lang.String value)
value - the Name of application that put the messagepublic java.lang.String getPutDate()
public void setPutDate(java.lang.String value)
value - the Date when message was putpublic java.lang.String getPutTime()
public void setPutTime(java.lang.String value)
value - the Time when message was putpublic long getPutDateTime()
public void setPutDateTime(long millis)
millis - the Date and Time when message was put, represented as the number of milliseconds
since January 1, 1970, 00:00:00 GMTpublic java.lang.String getApplOriginData()
public void setApplOriginData(java.lang.String value)
value - the Application data relating to originpublic int nextEncoding()
nextEncoding in interface MQChainableMQChainable.nextEncoding()public void nextEncoding(int value)
MQChainablenextEncoding in interface MQChainableMQChainable.nextEncoding(int)public int nextCharacterSet()
nextCharacterSet in interface MQChainableMQChainable.nextCharacterSet()public void nextCharacterSet(int value)
MQChainablenextCharacterSet in interface MQChainableMQChainable.nextCharacterSet(int)public java.lang.String nextFormat()
nextFormat in interface MQChainableMQChainable.nextFormat()public void nextFormat(java.lang.String value)
MQChainablenextFormat in interface MQChainableMQChainable.nextFormat(java.lang.String)public java.lang.String format()
format in interface MQChainableMQChainable.format()public boolean hasExtensionContent()
public void copyFrom(MQMD md)
md - - the header to copypublic void copyTo(MQMD md) throws MQDataException
md - - the header to copy intoMQDataException