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;
 
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.ibm.mq.headers.MQHeader

    MQHeader.Field
  • Field Summary

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

    Modifier and Type
    Method
    Description
     
    gets the R/3 Client Id
    int
    Get the Character set identifier of data that follows.
    int
    Get the numeric encoding of the data that follows.
    int
    gets the Flags
    gets the Message format
    gets the R/3 Host name
    gets the R/3 language
    gets the R/3 Password
    Get the structure identifier; the value will be "SAPH"
    int
    Get the length of the structure.
    gets the R/3 System number
    gets the R/3 User id
    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
    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
    sets the Message format
    void
    sets the R/3 Host name
    void
    sets the R/3 language
    void
    sets the R/3 Password
    void
    sets the R/3 System number
    void
    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 Details

    • SMQ_ID_LEN

      public static final int SMQ_ID_LEN
      Length of the client id
      See Also:
    • SMQ_SYSNUM_LEN

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

      public static final int SIZE
      size of an MQSAPH structure in bytes
      See Also:
  • Constructor Details

    • MQSAPH

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

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

      public MQSAPH(DataInput message, int encoding, int characterSet) throws MQDataException, 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
      IOException - if there is a problem reading the message content
  • Method Details

    • getStrucId

      public 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 String getFormat()
      gets the Message format
      Returns:
      the Message format
    • setFormat

      public void setFormat(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 String getClient()
      gets the R/3 Client Id
      Returns:
      the R/3 Client Id
    • setClient

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

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

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

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

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

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

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

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

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

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

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