com.ibm.mq.headers

Class MQSAPH

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


    public class MQSAPH
    extends com.ibm.mq.headers.internal.Header
    implements MQChainable
    MQSAPH header class.
            typedef struct tagMQSAPH
            {
            MQCHAR4          StrucId;                       // Structure Id
            MQLONG           Version;                       // Struct. version
            MQLONG           StrucLength;                   // Struct. length
            MQLONG           Encoding;                      // Data encoding
            MQLONG           CodedCharSetId;                // Data CCSID
            MQCHAR8          Format;                        // Message format
            MQLONG           Flags;                         // Flags
            MQCHAR           Client[SMQ_CLIENT_LEN];        // R/3 Client Id
            MQCHAR           Language;                      // R/3 language
            MQCHAR48         HostName;                      // R/3 host name
            MQCHAR12         UserId;                        // R/3 user Id
            MQCHAR8          Password;                      // R/3 password
            MQCHAR           SystemNumber[SMQ_SYSNUM_LEN];  // R/3 systen no.
            MQBYTE           Reserved[2];                   // Dummy field
            }       MQSAPH;
     
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int SIZE
      size of an MQSAPH structure in bytes
      static int SMQ_ID_LEN
      Length of the client id
      static int SMQ_SYSNUM_LEN
      Length of the system number
      • 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
      MQSAPH()
      Constructs an MQSAPH instance with default field values.
      MQSAPH(java.io.DataInput message)
      Constructs an MQSAPH instance populated from an MQMessage.
      MQSAPH(java.io.DataInput message, int encoding, int characterSet)
      Constructs an MQSAPH instance populated from a DataInput source.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String format() 
      java.lang.String getClient()
      gets the R/3 Client Id
      int getCodedCharSetId()
      Get the Character set identifier of data that follows.
      int getEncoding()
      Get the numeric encoding of the data that follows.
      int getFlags()
      gets the Flags
      java.lang.String getFormat()
      gets the Message format
      java.lang.String getHostname()
      gets the R/3 Host name
      java.lang.String getLanguage()
      gets the R/3 language
      java.lang.String getPassword()
      gets the R/3 Password
      java.lang.String getStrucId()
      Get the structure identifier; the value will be "SAPH"
      int getStrucLength()
      Get the length of the structure.
      java.lang.String getSystemNumber()
      gets the R/3 System number
      java.lang.String getUserId()
      gets the R/3 User id
      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 setClient(java.lang.String value)
      sets the R/3 Client Id
      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)
      sets the Flags
      void setFormat(java.lang.String value)
      sets the Message format
      void setHostname(java.lang.String value)
      sets the R/3 Host name
      void setLanguage(java.lang.String value)
      sets the R/3 language
      void setPassword(java.lang.String value)
      sets the R/3 Password
      void setSystemNumber(java.lang.String value)
      sets the R/3 System number
      void setUserId(java.lang.String value)
      sets the R/3 User id
      • 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

      • SMQ_SYSNUM_LEN

        public static final int SMQ_SYSNUM_LEN
        Length of the system number
        See Also:
        Constant Field Values
      • SIZE

        public static final int SIZE
        size of an MQSAPH structure in bytes
        See Also:
        Constant Field Values
    • Constructor Detail

      • MQSAPH

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

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

        public MQSAPH(java.io.DataInput message,
                      int encoding,
                      int characterSet)
               throws MQDataException,
                      java.io.IOException
        Constructs an MQSAPH 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 MQSAPH 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 "SAPH"
        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 Message format
        Returns:
        the Message format
      • setFormat

        public void setFormat(java.lang.String value)
        sets the Message format
        Parameters:
        value - the Message format
      • getFlags

        public int getFlags()
        gets the Flags
        Returns:
        the Flags
      • setFlags

        public void setFlags(int value)
        sets the Flags
        Parameters:
        value - the Flags
      • getClient

        public java.lang.String getClient()
        gets the R/3 Client Id
        Returns:
        the R/3 Client Id
      • setClient

        public void setClient(java.lang.String value)
        sets the R/3 Client Id
        Parameters:
        value - the R/3 Client Id
      • getLanguage

        public java.lang.String getLanguage()
        gets the R/3 language
        Returns:
        the R/3 language
      • setLanguage

        public void setLanguage(java.lang.String value)
        sets the R/3 language
        Parameters:
        value - the R/3 language
      • getHostname

        public java.lang.String getHostname()
        gets the R/3 Host name
        Returns:
        the R/3 Host name
      • setHostname

        public void setHostname(java.lang.String value)
        sets the R/3 Host name
        Parameters:
        value - the R/3 Host name
      • getUserId

        public java.lang.String getUserId()
        gets the R/3 User id
        Returns:
        the R/3 User id
      • setUserId

        public void setUserId(java.lang.String value)
        sets the R/3 User id
        Parameters:
        value - the R/3 User id
      • getPassword

        public java.lang.String getPassword()
        gets the R/3 Password
        Returns:
        the R/3 Password
      • setPassword

        public void setPassword(java.lang.String value)
        sets the R/3 Password
        Parameters:
        value -
      • getSystemNumber

        public java.lang.String getSystemNumber()
        gets the R/3 System number
        Returns:
        the R/3 System number
      • setSystemNumber

        public void setSystemNumber(java.lang.String value)
        sets the R/3 System number
        Parameters:
        value - the R/3 System number
      • 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.