Package 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
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
};
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.ibm.mq.headers.MQHeader
MQHeader.Field -
Field Summary
FieldsFields 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 TypeMethodDescriptionintGet the Character set identifier of data that follows.intgets the Length of bulk dataintgets the Low offset of bulk dataintgets the High offset of bulk dataintgets the Length of destination environment dataintgets the Offset of destination environment dataintgets the Length of destination object nameintgets the Offset of destination object nameintGet the numeric encoding of the data that follows.intgetFlags()gets the Reference message flagsgets the Format name of bulk databyte[]gets the Object instance identifiergets the Object typeintgets the Length of source environment dataintgets the Offset of source environment dataintgets the Length of source object nameintgets the Offset of source object nameGet the structure identifier; the value will be MQRMH_STRUC_IDintGet the length of the structure.intGet the Structure version numbervoidsetCodedCharSetId(int value) Set the Character set identifier of data that follows.voidsetDataLogicalLength(int value) sets the Length of bulk datavoidsetDataLogicalOffset(int value) sets the Low offset of bulk datavoidsetDataLogicalOffset2(int value) sets the High offset of bulk datavoidsetDestEnvLength(int value) sets the Length of destination environment datavoidsetDestEnvOffset(int value) gets the Offset of destination environment datavoidsetDestNameLength(int value) sets the Length of destination object namevoidsetDestNameOffset(int value) sets the Offset of destination object namevoidsetEncoding(int value) Set the numeric encoding of the data that follows.voidsetFlags(int value) sets the Reference message flagsvoidsets the Format name of bulk datavoidsetObjectInstanceId(byte[] value) sets the Object instance identifiervoidsetObjectType(String value) sets the Object typevoidsetSrcEnvLength(int value) sets the Length of source environment datavoidsetSrcEnvOffset(int value) sets the Offset of source environment datavoidsetSrcNameLength(int value) sets the Length of source object namevoidsetSrcNameOffset(int value) sets the Offset of source object nameintwrite(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, writeMethods inherited from class com.ibm.mq.jmqi.JmqiObject
getJmqiEnvironment
-
Field Details
-
SIZE
public static final int SIZESize of an MQRMH structure in bytes- See Also:
-
-
Constructor Details
-
MQRMH
public MQRMH()Constructs an MQRMH instance with default field values. -
MQRMH
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 stuctureIOException- if there is a problem reading the message content
-
MQRMH
Constructs an MQRMH 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 MQRMH stuctureIOException- if there is a problem reading the message content
-
-
Method Details
-
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
gets the Format name of bulk data- Returns:
- the Format name of bulk data
-
setFormat
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
gets the Object type- Returns:
- the Object type
-
setObjectType
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
Description copied from interface:MQDataWrites 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:
writein interfaceMQData- Overrides:
writein classcom.ibm.mq.headers.internal.Header- Parameters:
message- the message.- Returns:
- the number of bytes written
- Throws:
IOException- if an error occurs writing message content.- See Also:
-