Package 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
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
FieldsModifier and TypeFieldDescriptionstatic final intsize of an MQSAPH structure in bytesstatic final intLength of the client idstatic final intLength of the system numberFields inherited from class com.ibm.mq.headers.internal.Header
DEFAULT_CCSID, DEFAULT_ENCODING, delegateFields inherited from class com.ibm.mq.jmqi.JmqiObject
COMP_JM, COMP_JN, COMP_JO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformat()gets the R/3 Client IdintGet the Character set identifier of data that follows.intGet the numeric encoding of the data that follows.intgetFlags()gets the Flagsgets the Message formatgets the R/3 Host namegets the R/3 languagegets the R/3 PasswordGet the structure identifier; the value will be "SAPH"intGet the length of the structure.gets the R/3 System numbergets the R/3 User idintGet the Structure version numberintvoidnextCharacterSet(int value) Sets the CCSID of the next header or message content.intvoidnextEncoding(int value) Sets the numeric encoding of the next header or message content.voidnextFormat(String value) Sets the format of the next header or message content.voidsets the R/3 Client IdvoidsetCodedCharSetId(int value) Set the Character set identifier of data that follows.voidsetEncoding(int value) Set the numeric encoding of the data that follows.voidsetFlags(int value) sets the Flagsvoidsets the Message formatvoidsetHostname(String value) sets the R/3 Host namevoidsetLanguage(String value) sets the R/3 languagevoidsetPassword(String value) sets the R/3 PasswordvoidsetSystemNumber(String value) sets the R/3 System numbervoidsets the R/3 User idMethods 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, writeMethods inherited from class com.ibm.mq.jmqi.JmqiObject
getJmqiEnvironment
-
Field Details
-
SMQ_ID_LEN
public static final int SMQ_ID_LENLength of the client id- See Also:
-
SMQ_SYSNUM_LEN
public static final int SMQ_SYSNUM_LENLength of the system number- See Also:
-
SIZE
public static final int SIZEsize of an MQSAPH structure in bytes- See Also:
-
-
Constructor Details
-
MQSAPH
public MQSAPH()Constructs an MQSAPH instance with default field values. -
MQSAPH
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 stuctureIOException- 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 readencoding- the initial numeric encoding of the data in the messagecharacterSet- the initial CCSID of the data in the message- Throws:
MQDataException- if the message content does not yield a valid MQSAPH stuctureIOException- if there is a problem reading the message content
-
-
Method Details
-
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
gets the Message format- Returns:
- the Message format
-
setFormat
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
gets the R/3 Client Id- Returns:
- the R/3 Client Id
-
setClient
sets the R/3 Client Id- Parameters:
value- the R/3 Client Id
-
getLanguage
gets the R/3 language- Returns:
- the R/3 language
-
setLanguage
sets the R/3 language- Parameters:
value- the R/3 language
-
getHostname
gets the R/3 Host name- Returns:
- the R/3 Host name
-
setHostname
sets the R/3 Host name- Parameters:
value- the R/3 Host name
-
getUserId
gets the R/3 User id- Returns:
- the R/3 User id
-
setUserId
sets the R/3 User id- Parameters:
value- the R/3 User id
-
getPassword
gets the R/3 Password- Returns:
- the R/3 Password
-
setPassword
sets the R/3 Password- Parameters:
value-
-
getSystemNumber
gets the R/3 System number- Returns:
- the R/3 System number
-
setSystemNumber
sets the R/3 System number- Parameters:
value- the R/3 System number
-
nextEncoding
public int nextEncoding()- Specified by:
nextEncodingin interfaceMQChainable- Returns:
- the numeric encoding of the next header or message content.
- See Also:
-
nextEncoding
public void nextEncoding(int value) Description copied from interface:MQChainableSets the numeric encoding of the next header or message content.- Specified by:
nextEncodingin interfaceMQChainable- Parameters:
value- numeric encoding- See Also:
-
nextCharacterSet
public int nextCharacterSet()- Specified by:
nextCharacterSetin interfaceMQChainable- Returns:
- the CCSID of the next header or message content.
- See Also:
-
nextCharacterSet
public void nextCharacterSet(int value) Description copied from interface:MQChainableSets the CCSID of the next header or message content.- Specified by:
nextCharacterSetin interfaceMQChainable- Parameters:
value- character set- See Also:
-
nextFormat
- Specified by:
nextFormatin interfaceMQChainable- Returns:
- the format of the next header or message content.
- See Also:
-
nextFormat
Description copied from interface:MQChainableSets the format of the next header or message content.- Specified by:
nextFormatin interfaceMQChainable- Parameters:
value- format of the header or message content- See Also:
-
format
- Specified by:
formatin interfaceMQChainable- Returns:
- the format associated with this header object or message content.
- See Also:
-