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;
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.ibm.mq.headers.MQHeader
MQHeader.Field
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEsize of an MQSAPH structure in bytesstatic intSMQ_ID_LENLength of the client idstatic intSMQ_SYSNUM_LENLength of the system number
-
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.Stringformat()java.lang.StringgetClient()gets the R/3 Client IdintgetCodedCharSetId()Get the Character set identifier of data that follows.intgetEncoding()Get the numeric encoding of the data that follows.intgetFlags()gets the Flagsjava.lang.StringgetFormat()gets the Message formatjava.lang.StringgetHostname()gets the R/3 Host namejava.lang.StringgetLanguage()gets the R/3 languagejava.lang.StringgetPassword()gets the R/3 Passwordjava.lang.StringgetStrucId()Get the structure identifier; the value will be "SAPH"intgetStrucLength()Get the length of the structure.java.lang.StringgetSystemNumber()gets the R/3 System numberjava.lang.StringgetUserId()gets the R/3 User idintgetVersion()Get the Structure version numberintnextCharacterSet()voidnextCharacterSet(int value)Sets the CCSID of the next header or message content.intnextEncoding()voidnextEncoding(int value)Sets the numeric encoding of the next header or message content.java.lang.StringnextFormat()voidnextFormat(java.lang.String value)Sets the format of the next header or message content.voidsetClient(java.lang.String value)sets 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 FlagsvoidsetFormat(java.lang.String value)sets the Message formatvoidsetHostname(java.lang.String value)sets the R/3 Host namevoidsetLanguage(java.lang.String value)sets the R/3 languagevoidsetPassword(java.lang.String value)sets the R/3 PasswordvoidsetSystemNumber(java.lang.String value)sets the R/3 System numbervoidsetUserId(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
-
-
-
-
Field Detail
-
SMQ_ID_LEN
public static final int SMQ_ID_LEN
Length of the client id- See Also:
- Constant Field Values
-
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.IOExceptionConstructs 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 stucturejava.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.IOExceptionConstructs 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 stucturejava.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
-
nextEncoding
public int nextEncoding()
- Specified by:
nextEncodingin interfaceMQChainable- Returns:
- the numeric encoding of the next header or message content.
- See Also:
MQChainable.nextEncoding()
-
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- See Also:
MQChainable.nextEncoding(int)
-
nextCharacterSet
public int nextCharacterSet()
- Specified by:
nextCharacterSetin interfaceMQChainable- Returns:
- the CCSID of the next header or message content.
- See Also:
MQChainable.nextCharacterSet()
-
nextCharacterSet
public void nextCharacterSet(int value)
Description copied from interface:MQChainableSets the CCSID of the next header or message content.- Specified by:
nextCharacterSetin interfaceMQChainable- See Also:
MQChainable.nextCharacterSet(int)
-
nextFormat
public java.lang.String nextFormat()
- Specified by:
nextFormatin interfaceMQChainable- Returns:
- the format of the next header or message content.
- See Also:
MQChainable.nextFormat()
-
nextFormat
public void nextFormat(java.lang.String value)
Description copied from interface:MQChainableSets the format of the next header or message content.- Specified by:
nextFormatin interfaceMQChainable- See Also:
MQChainable.nextFormat(java.lang.String)
-
format
public java.lang.String format()
- Specified by:
formatin interfaceMQChainable- Returns:
- the format associated with this header object or message content.
- See Also:
MQChainable.format()
-
-