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 MQHeader

    MQHeader.Field
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Deprecated.
    use getStrucLength() to get the length of the structure

    Fields inherited from class com.ibm.mq.headers.internal.Header

    DEFAULT_CCSID, DEFAULT_ENCODING, delegate

    Fields inherited from class com.ibm.mq.jmqi.JmqiObject

    COMP_JM, COMP_JN, COMP_JO
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs an MQDH instance with default field values.
    MQDH(DataInput message)
    Constructs an MQDH instance populated from an DataInput.
    MQDH(DataInput message, int encoding, int characterSet)
    Constructs an MQDH instance populated from a DataInput source.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    int
    Get the Character set identifier of data that follows.
    int
    Get the numeric encoding of the data that follows.
    int
    get the General flags
    get the Format name of data that follows the MQOR and MQPMR records
    int
    get the Offset of first MQOR record from start of MQDH
    int
    get the Flags indicating which MQPMR fields are present
    int
    get the Offset of first MQPMR record from start of MQDH
    int
    get the Number of MQOR records present
    Get the structure identifier; the value will be MQDH_STRUC_ID
    int
    Get the length of the structure.
    int
    Get the Structure version number
    int
     
    void
    nextCharacterSet(int value)
    Sets the CCSID of the next header or message content.
    int
     
    void
    nextEncoding(int value)
    Sets the numeric encoding of the next header or message content.
     
    void
    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 flags
    void
    set the Format name of data that follows the MQOR and MQPMR records
    void
    setObjectRecOffset(int value)
    set the Offset of first MQOR record from start of MQDH
    void
    setPutMsgRecFields(int value)
    set the Flags indicating which MQPMR fields are present
    void
    setPutMsgRecOffset(int value)
    set the Offset of first MQPMR record from start of MQDH
    void
    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

    Methods inherited from class com.ibm.mq.jmqi.JmqiObject

    getJmqiEnvironment

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • MQDH_STRUC_LENGTH_FIXED

      public static final int MQDH_STRUC_LENGTH_FIXED
      Deprecated.
      use getStrucLength() to get the length of the structure
      Length 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

      public MQDH(DataInput message) throws MQDataException, 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 structure
      IOException - if there is a problem reading the message content
    • MQDH

      public MQDH(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 read
      encoding - the initial numeric encoding of the data in the message
      characterSet - 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

      public 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 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(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 interface MQChainable
      Returns:
      the numeric encoding of the next header or message content.
      See Also:
    • 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 interface MQChainable
      Parameters:
      value - numeric encoding
      See Also:
    • nextCharacterSet

      public int nextCharacterSet()
      Specified by:
      nextCharacterSet in interface MQChainable
      Returns:
      the CCSID of the next header or message content.
      See Also:
    • 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 interface MQChainable
      Parameters:
      value - character set
      See Also:
    • nextFormat

      public String nextFormat()
      Specified by:
      nextFormat in interface MQChainable
      Returns:
      the format of the next header or message content.
      See Also:
    • nextFormat

      public void nextFormat(String value)
      Description copied from interface: MQChainable
      Sets the format of the next header or message content.
      Specified by:
      nextFormat in interface MQChainable
      Parameters:
      value - format of the header or message content
      See Also:
    • format

      public String format()
      Specified by:
      format in interface MQChainable
      Returns:
      the format associated with this header object or message content.
      See Also: