Class MQDH
java.lang.Object
com.ibm.mq.jmqi.JmqiObject
com.ibm.mq.headers.internal.Header
com.ibm.mq.headers.MQDH
- All Implemented Interfaces:
MQChainable, MQData, MQHeader
MQDH (distribution list header) header class.
struct tagMQDH {
MQCHAR4 StrucId; /* Structure identifier
MQLONG Version; /* Structure version number
MQLONG StrucLength; /* Length of MQDH structure plus following MQOR and MQPMR records
MQLONG Encoding; /* Numeric encoding of data that follows the MQOR and MQPMR records
MQLONG CodedCharSetId; /* Character set identifier of data that follows the MQOR and MQPMR records
MQCHAR8 Format; /* Format name of data that follows the MQOR and MQPMR records
MQLONG Flags; /* General flags
MQLONG PutMsgRecFields; /* Flags indicating which MQPMR fields are present
MQLONG RecsPresent; /* Number of MQOR records present
MQLONG ObjectRecOffset; /* Offset of first MQOR record from start of MQDH
MQLONG PutMsgRecOffset; /* Offset of first MQPMR record from start of MQDH
};
-
Nested Class Summary
Nested classes/interfaces inherited from interface MQHeader
MQHeader.Field -
Field Summary
FieldsFields inherited from class com.ibm.mq.headers.internal.Header
DEFAULT_CCSID, DEFAULT_ENCODING, delegateFields inherited from class com.ibm.mq.jmqi.JmqiObject
COMP_JM, COMP_JN, COMP_JO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformat()intGet the Character set identifier of data that follows.intGet the numeric encoding of the data that follows.intgetFlags()get the General flagsget the Format name of data that follows the MQOR and MQPMR recordsintget the Offset of first MQOR record from start of MQDHintget the Flags indicating which MQPMR fields are presentintget the Offset of first MQPMR record from start of MQDHintget the Number of MQOR records presentGet the structure identifier; the value will be MQDH_STRUC_IDintGet the length of the structure.intGet the Structure version numberintvoidnextCharacterSet(int value) Sets the CCSID of the next header or message content.intvoidnextEncoding(int value) Sets the numeric encoding of the next header or message content.voidnextFormat(String value) Sets the format of the next header or message content.voidsetCodedCharSetId(int value) Set the Character set identifier of data that follows.voidsetEncoding(int value) Set the numeric encoding of the data that follows.voidsetFlags(int value) set the General flagsvoidset the Format name of data that follows the MQOR and MQPMR recordsvoidsetObjectRecOffset(int value) set the Offset of first MQOR record from start of MQDHvoidsetPutMsgRecFields(int value) set the Flags indicating which MQPMR fields are presentvoidsetPutMsgRecOffset(int value) set the Offset of first MQPMR record from start of MQDHvoidsetRecsPresent(int value) set the Number of MQOR records presentMethods inherited from class com.ibm.mq.headers.internal.Header
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, writeMethods inherited from class com.ibm.mq.jmqi.JmqiObject
getJmqiEnvironment
-
Field Details
-
MQDH_STRUC_LENGTH_FIXED
public static final int MQDH_STRUC_LENGTH_FIXEDDeprecated.usegetStrucLength()to get the length of the structureLength in bytes of the fixed portion of this header- See Also:
-
-
Constructor Details
-
MQDH
public MQDH()Constructs an MQDH instance with default field values. -
MQDH
Constructs an MQDH instance populated from an DataInput.- Parameters:
message- the message to read- Throws:
MQDataException- if the message content does not yield a valid MQDH structureIOException- if there is a problem reading the message content
-
MQDH
Constructs an MQDH instance populated from a DataInput source.- Parameters:
message- the DataInput or other DataInput source to readencoding- the initial numeric encoding of the data in the messagecharacterSet- the initial CCSID of the data in the message- Throws:
MQDataException- if the message content does not yield a valid MQDH stucture
-
-
Method Details
-
getStrucId
Get the structure identifier; the value will be MQDH_STRUC_ID- Returns:
- the structure identifier
-
getVersion
public int getVersion()Get the Structure version number- Returns:
- the Structure version number
-
getStrucLength
public int getStrucLength()Get the length of the structure.- Returns:
- the structure length.
-
getEncoding
public int getEncoding()Get the numeric encoding of the data that follows.- Returns:
- the numeric encoding. A combination of MQENC_* values.
-
setEncoding
public void setEncoding(int value) Set the numeric encoding of the data that follows.- Parameters:
value- the numeric encoding. A combination of MQENC_* values.
-
getCodedCharSetId
public int getCodedCharSetId()Get the Character set identifier of data that follows.- Returns:
- the Character set identifier.
-
setCodedCharSetId
public void setCodedCharSetId(int value) Set the Character set identifier of data that follows.- Parameters:
value- the Character set identifier.
-
getFormat
get the Format name of data that follows the MQOR and MQPMR records- Returns:
- the Format name of data that follows the MQOR and MQPMR records
-
setFormat
set the Format name of data that follows the MQOR and MQPMR records- Parameters:
value- the Format name of data that follows the MQOR and MQPMR records
-
getFlags
public int getFlags()get the General flags- Returns:
- the General flags
-
setFlags
public void setFlags(int value) set the General flags- Parameters:
value- the General flags
-
getPutMsgRecFields
public int getPutMsgRecFields()get the Flags indicating which MQPMR fields are present- Returns:
- the Flags indicating which MQPMR fields are present
-
setPutMsgRecFields
public void setPutMsgRecFields(int value) set the Flags indicating which MQPMR fields are present- Parameters:
value- the Flags indicating which MQPMR fields are present
-
getRecsPresent
public int getRecsPresent()get the Number of MQOR records present- Returns:
- the Number of MQOR records present
-
setRecsPresent
public void setRecsPresent(int value) set the Number of MQOR records present- Parameters:
value- the Number of MQOR records present
-
getObjectRecOffset
public int getObjectRecOffset()get the Offset of first MQOR record from start of MQDH- Returns:
- the Offset of first MQOR record from start of MQDH
-
setObjectRecOffset
public void setObjectRecOffset(int value) set the Offset of first MQOR record from start of MQDH- Parameters:
value- the Offset of first MQOR record from start of MQDH
-
getPutMsgRecOffset
public int getPutMsgRecOffset()get the Offset of first MQPMR record from start of MQDH- Returns:
- the Offset of first MQPMR record from start of MQDH
-
setPutMsgRecOffset
public void setPutMsgRecOffset(int value) set the Offset of first MQPMR record from start of MQDH- Parameters:
value- the Offset of first MQPMR record from start of MQDH
-
nextEncoding
public int nextEncoding()- Specified by:
nextEncodingin interfaceMQChainable- Returns:
- the numeric encoding of the next header or message content.
- See Also:
-
nextEncoding
public void nextEncoding(int value) Description copied from interface:MQChainableSets the numeric encoding of the next header or message content.- Specified by:
nextEncodingin interfaceMQChainable- Parameters:
value- numeric encoding- See Also:
-
nextCharacterSet
public int nextCharacterSet()- Specified by:
nextCharacterSetin interfaceMQChainable- Returns:
- the CCSID of the next header or message content.
- See Also:
-
nextCharacterSet
public void nextCharacterSet(int value) Description copied from interface:MQChainableSets the CCSID of the next header or message content.- Specified by:
nextCharacterSetin interfaceMQChainable- Parameters:
value- character set- See Also:
-
nextFormat
- Specified by:
nextFormatin interfaceMQChainable- Returns:
- the format of the next header or message content.
- See Also:
-
nextFormat
Description copied from interface:MQChainableSets the format of the next header or message content.- Specified by:
nextFormatin interfaceMQChainable- Parameters:
value- format of the header or message content- See Also:
-
format
- Specified by:
formatin interfaceMQChainable- Returns:
- the format associated with this header object or message content.
- See Also:
-
getStrucLength()to get the length of the structure