com.ibm.mq.headers
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
public class MQDH extends com.ibm.mq.headers.internal.Header implements MQChainable
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 com.ibm.mq.headers.MQHeader
MQHeader.Field
-
-
Field Summary
Fields Modifier and Type Field and Description static int
MQDH_STRUC_LENGTH_FIXED
Deprecated.usegetStrucLength()
to get the length of the structure
-
Constructor Summary
Constructors Constructor and Description MQDH()
Constructs an MQDH instance with default field values.MQDH(java.io.DataInput message)
Constructs an MQDH instance populated from an DataInput.MQDH(java.io.DataInput message, int encoding, int characterSet)
Constructs an MQDH instance populated from a DataInput source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.String
format()
int
getCodedCharSetId()
Get the Character set identifier of data that follows.int
getEncoding()
Get the numeric encoding of the data that follows.int
getFlags()
get the General flagsjava.lang.String
getFormat()
get the Format name of data that follows the MQOR and MQPMR recordsint
getObjectRecOffset()
get the Offset of first MQOR record from start of MQDHint
getPutMsgRecFields()
get the Flags indicating which MQPMR fields are presentint
getPutMsgRecOffset()
get the Offset of first MQPMR record from start of MQDHint
getRecsPresent()
get the Number of MQOR records presentjava.lang.String
getStrucId()
Get the structure identifier; the value will be MQDH_STRUC_IDint
getStrucLength()
Get the length of the structure.int
getVersion()
Get the Structure version numberint
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
setCodedCharSetId(int value)
Set the Character set identifier of data that follows.void
setEncoding(int value)
Set the numeric encoding of the data that follows.void
setFlags(int value)
set the General flagsvoid
setFormat(java.lang.String value)
set the Format name of data that follows the MQOR and MQPMR recordsvoid
setObjectRecOffset(int value)
set the Offset of first MQOR record from start of MQDHvoid
setPutMsgRecFields(int value)
set the Flags indicating which MQPMR fields are presentvoid
setPutMsgRecOffset(int value)
set the Offset of first MQPMR record from start of MQDHvoid
setRecsPresent(int value)
set the Number of MQOR records present-
Methods 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, write
-
-
-
-
Field Detail
-
MQDH_STRUC_LENGTH_FIXED
public static final int MQDH_STRUC_LENGTH_FIXED
Deprecated. usegetStrucLength()
to get the length of the structureLength in bytes of the fixed portion of this header- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MQDH
public MQDH()
Constructs an MQDH instance with default field values.
-
MQDH
public MQDH(java.io.DataInput message) throws MQDataException, java.io.IOException
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 structurejava.io.IOException
- if there is a problem reading the message content
-
MQDH
public MQDH(java.io.DataInput message, int encoding, int characterSet) throws MQDataException
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 Detail
-
getStrucId
public java.lang.String 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
public java.lang.String 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
public void setFormat(java.lang.String value)
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:
nextEncoding
in interfaceMQChainable
- Returns:
- the numeric encoding of the next header or message content.
- See Also:
MQChainable.nextEncoding()
-
nextEncoding
public void nextEncoding(int value)
Description copied from interface:MQChainable
Sets the numeric encoding of the next header or message content.- Specified by:
nextEncoding
in interfaceMQChainable
- See Also:
MQChainable.nextEncoding(int)
-
nextCharacterSet
public int nextCharacterSet()
- Specified by:
nextCharacterSet
in interfaceMQChainable
- Returns:
- the CCSID of the next header or message content.
- See Also:
MQChainable.nextCharacterSet()
-
nextCharacterSet
public void nextCharacterSet(int value)
Description copied from interface:MQChainable
Sets the CCSID of the next header or message content.- Specified by:
nextCharacterSet
in interfaceMQChainable
- See Also:
MQChainable.nextCharacterSet(int)
-
nextFormat
public java.lang.String nextFormat()
- Specified by:
nextFormat
in interfaceMQChainable
- Returns:
- the format of the next header or message content.
- See Also:
MQChainable.nextFormat()
-
nextFormat
public void nextFormat(java.lang.String value)
Description copied from interface:MQChainable
Sets the format of the next header or message content.- Specified by:
nextFormat
in interfaceMQChainable
- See Also:
MQChainable.nextFormat(java.lang.String)
-
format
public java.lang.String format()
- Specified by:
format
in interfaceMQChainable
- Returns:
- the format associated with this header object or message content.
- See Also:
MQChainable.format()
-
-