com.ibm.mq.headers

Class MQRMH

  • java.lang.Object
    • com.ibm.mq.jmqi.JmqiObject
      • com.ibm.mq.headers.internal.Header
        • com.ibm.mq.headers.MQRMH
  • All Implemented Interfaces:
    MQData, MQHeader


    public class MQRMH
    extends com.ibm.mq.headers.internal.Header
    MQRMH header class.
        struct tagMQRMH {
                    MQCHAR4   StrucId;             // Structure identifier
                    MQLONG    Version;             // Structure version number
                    MQLONG    StrucLength;         // Total length of MQRMH, including strings at end of fixed fields, but not the bulk data
                    MQLONG    Encoding;            // Numeric encoding of bulk data
                    MQLONG    CodedCharSetId;      // Character set identifier of bulk data
                    MQCHAR8   Format;              // Format name of bulk data
                    MQLONG    Flags;               // Reference message flags
                    MQCHAR8   ObjectType;          // Object type
                    MQBYTE24  ObjectInstanceId;    // Object instance identifier
                    MQLONG    SrcEnvLength;        // Length of source environment data
                    MQLONG    SrcEnvOffset;        // Offset of source environment data
                    MQLONG    SrcNameLength;       // Length of source object name
                    MQLONG    SrcNameOffset;       // Offset of source object name
                    MQLONG    DestEnvLength;       // Length of destination environment data
                    MQLONG    DestEnvOffset;       // Offset of destination environment data
                    MQLONG    DestNameLength;      // Length of destination object name
                    MQLONG    DestNameOffset;      // Offset of destination object name
                    MQLONG    DataLogicalLength;   // Length of bulk data
                    MQLONG    DataLogicalOffset;   // Low offset of bulk data
                    MQLONG    DataLogicalOffset2;  // High offset of bulk data
            };
     
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int SIZE
      Size of an MQRMH structure in bytes
      • 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
      MQRMH()
      Constructs an MQRMH instance with default field values.
      MQRMH(java.io.DataInput message)
      Constructs an MQRMH instance populated from an MQMessage.
      MQRMH(java.io.DataInput message, int encoding, int characterSet)
      Constructs an MQRMH instance populated from a DataInput source.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int getCodedCharSetId()
      Get the Character set identifier of data that follows.
      int getDataLogicalLength()
      gets the Length of bulk data
      int getDataLogicalOffset()
      gets the Low offset of bulk data
      int getDataLogicalOffset2()
      gets the High offset of bulk data
      int getDestEnvLength()
      gets the Length of destination environment data
      int getDestEnvOffset()
      gets the Offset of destination environment data
      int getDestNameLength()
      gets the Length of destination object name
      int getDestNameOffset()
      gets the Offset of destination object name
      int getEncoding()
      Get the numeric encoding of the data that follows.
      int getFlags()
      gets the Reference message flags
      java.lang.String getFormat()
      gets the Format name of bulk data
      byte[] getObjectInstanceId()
      gets the Object instance identifier
      java.lang.String getObjectType()
      gets the Object type
      int getSrcEnvLength()
      gets the Length of source environment data
      int getSrcEnvOffset()
      gets the Offset of source environment data
      int getSrcNameLength()
      gets the Length of source object name
      int getSrcNameOffset()
      gets the Offset of source object name
      java.lang.String getStrucId()
      Get the structure identifier; the value will be MQRMH_STRUC_ID
      int getStrucLength()
      Get the length of the structure.
      int getVersion()
      Get the Structure version number
      void setCodedCharSetId(int value)
      Set the Character set identifier of data that follows.
      void setDataLogicalLength(int value)
      sets the Length of bulk data
      void setDataLogicalOffset(int value)
      sets the Low offset of bulk data
      void setDataLogicalOffset2(int value)
      sets the High offset of bulk data
      void setDestEnvLength(int value)
      sets the Length of destination environment data
      void setDestEnvOffset(int value)
      gets the Offset of destination environment data
      void setDestNameLength(int value)
      sets the Length of destination object name
      void setDestNameOffset(int value)
      sets the Offset of destination object name
      void setEncoding(int value)
      Set the numeric encoding of the data that follows.
      void setFlags(int value)
      sets the Reference message flags
      void setFormat(java.lang.String value)
      sets the Format name of bulk data
      void setObjectInstanceId(byte[] value)
      sets the Object instance identifier
      void setObjectType(java.lang.String value)
      sets the Object type
      void setSrcEnvLength(int value)
      sets the Length of source environment data
      void setSrcEnvOffset(int value)
      sets the Offset of source environment data
      void setSrcNameLength(int value)
      sets the Length of source object name
      void setSrcNameOffset(int value)
      sets the Offset of source object name
      int write(java.io.DataOutput message)
      Writes the content of this data element to a message.
      • 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
      • 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

    • Constructor Detail

      • MQRMH

        public MQRMH()
        Constructs an MQRMH instance with default field values.
      • MQRMH

        public MQRMH(java.io.DataInput message)
              throws MQDataException,
                     java.io.IOException
        Constructs an MQRMH instance populated from an MQMessage.
        Parameters:
        message - the message to read
        Throws:
        MQDataException - if the message content does not yield a valid MQRMH stucture
        java.io.IOException - if there is a problem reading the message content
      • MQRMH

        public MQRMH(java.io.DataInput message,
                     int encoding,
                     int characterSet)
              throws MQDataException,
                     java.io.IOException
        Constructs an MQRMH instance populated from a DataInput source.
        Parameters:
        message - the MQMessage 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 MQRMH stucture
        java.io.IOException - if there is a problem reading the message content
    • Method Detail

      • getStrucId

        public java.lang.String getStrucId()
        Get the structure identifier; the value will be MQRMH_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()
        gets the Format name of bulk data
        Returns:
        the Format name of bulk data
      • setFormat

        public void setFormat(java.lang.String value)
        sets the Format name of bulk data
        Parameters:
        value - the Format name of bulk data
      • getFlags

        public int getFlags()
        gets the Reference message flags
        Returns:
        the Reference message flags
      • setFlags

        public void setFlags(int value)
        sets the Reference message flags
        Parameters:
        value - the Reference message flags
      • getObjectType

        public java.lang.String getObjectType()
        gets the Object type
        Returns:
        the Object type
      • setObjectType

        public void setObjectType(java.lang.String value)
        sets the Object type
        Parameters:
        value - the Object type
      • getObjectInstanceId

        public byte[] getObjectInstanceId()
        gets the Object instance identifier
        Returns:
        the Object instance identifier
      • setObjectInstanceId

        public void setObjectInstanceId(byte[] value)
        sets the Object instance identifier
        Parameters:
        value - the Object instance identifier
      • getSrcEnvLength

        public int getSrcEnvLength()
        gets the Length of source environment data
        Returns:
        the Length of source environment data
      • setSrcEnvLength

        public void setSrcEnvLength(int value)
        sets the Length of source environment data
        Parameters:
        value - the Length of source environment data
      • getSrcEnvOffset

        public int getSrcEnvOffset()
        gets the Offset of source environment data
        Returns:
        the Offset of source environment data
      • setSrcEnvOffset

        public void setSrcEnvOffset(int value)
        sets the Offset of source environment data
        Parameters:
        value - the Offset of source environment data
      • getSrcNameLength

        public int getSrcNameLength()
        gets the Length of source object name
        Returns:
        the Length of source object name
      • setSrcNameLength

        public void setSrcNameLength(int value)
        sets the Length of source object name
        Parameters:
        value - Length of source object name
      • getSrcNameOffset

        public int getSrcNameOffset()
        gets the Offset of source object name
        Returns:
        the Offset of source object name
      • setSrcNameOffset

        public void setSrcNameOffset(int value)
        sets the Offset of source object name
        Parameters:
        value - the Offset of source object name
      • getDestEnvLength

        public int getDestEnvLength()
        gets the Length of destination environment data
        Returns:
        the Length of destination environment data
      • setDestEnvLength

        public void setDestEnvLength(int value)
        sets the Length of destination environment data
        Parameters:
        value - the Length of destination environment data
      • getDestEnvOffset

        public int getDestEnvOffset()
        gets the Offset of destination environment data
        Returns:
        the Offset of destination environment data
      • setDestEnvOffset

        public void setDestEnvOffset(int value)
        gets the Offset of destination environment data
        Parameters:
        value - the Offset of destination environment data
      • getDestNameLength

        public int getDestNameLength()
        gets the Length of destination object name
        Returns:
        the Length of destination object name
      • setDestNameLength

        public void setDestNameLength(int value)
        sets the Length of destination object name
        Parameters:
        value - the Length of destination object name
      • getDestNameOffset

        public int getDestNameOffset()
        gets the Offset of destination object name
        Returns:
        the Offset of destination object name
      • setDestNameOffset

        public void setDestNameOffset(int value)
        sets the Offset of destination object name
        Parameters:
        value - the Offset of destination object name
      • getDataLogicalLength

        public int getDataLogicalLength()
        gets the Length of bulk data
        Returns:
        the Length of bulk data
      • setDataLogicalLength

        public void setDataLogicalLength(int value)
        sets the Length of bulk data
        Parameters:
        value - the Length of bulk data
      • getDataLogicalOffset

        public int getDataLogicalOffset()
        gets the Low offset of bulk data
        Returns:
        the Low offset of bulk data
      • setDataLogicalOffset

        public void setDataLogicalOffset(int value)
        sets the Low offset of bulk data
        Parameters:
        value - the Low offset of bulk data
      • getDataLogicalOffset2

        public int getDataLogicalOffset2()
        gets the High offset of bulk data
        Returns:
        the High offset of bulk data
      • setDataLogicalOffset2

        public void setDataLogicalOffset2(int value)
        sets the High offset of bulk data
        Parameters:
        value - the High offset of bulk data
      • write

        public int write(java.io.DataOutput message)
                  throws java.io.IOException
        Description copied from interface: MQData
        Writes the content of this data element to a message. The content is encoded in (if applicable) using the encoding and CCSID of the message descriptor.
        Specified by:
        write in interface MQData
        Overrides:
        write in class com.ibm.mq.headers.internal.Header
        Parameters:
        message - the message.
        Returns:
        the number of bytes written
        Throws:
        java.io.IOException
        See Also:
        Header.write(java.io.DataOutput)
(c) Copyright IBM Corp. 2008, 2016. All Rights Reserved.