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
            };
     
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int MQDH_STRUC_LENGTH_FIXED
      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 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 flags
      java.lang.String getFormat()
      get the Format name of data that follows the MQOR and MQPMR records
      int getObjectRecOffset()
      get the Offset of first MQOR record from start of MQDH
      int getPutMsgRecFields()
      get the Flags indicating which MQPMR fields are present
      int getPutMsgRecOffset()
      get the Offset of first MQPMR record from start of MQDH
      int getRecsPresent()
      get the Number of MQOR records present
      java.lang.String getStrucId()
      Get the structure identifier; the value will be MQDH_STRUC_ID
      int getStrucLength()
      Get the length of the structure.
      int getVersion()
      Get the Structure version number
      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 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 setFormat(java.lang.String value)
      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 java.lang.Object

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

      • 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:
        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 structure
        java.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 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 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
      • format

        public java.lang.String format()
        Specified by:
        format in interface MQChainable
        Returns:
        the format associated with this header object or message content.
        See Also:
        MQChainable.format()
(c) Copyright IBM Corp. 2008, 2016. All Rights Reserved.