com.ibm.mq.headers
Class MQMDE
- java.lang.Object
-
- com.ibm.mq.jmqi.JmqiObject
-
- com.ibm.mq.headers.internal.Header
-
- com.ibm.mq.headers.MQMDE
-
- All Implemented Interfaces:
- MQChainable, MQData, MQHeader
public class MQMDE extends com.ibm.mq.headers.internal.Header implements MQChainable
MQMDE header class.struct tagMQMDE { MQCHAR4 StrucId; // Structure identifier MQLONG Version; // Structure version number MQLONG StrucLength; // Length of MQMDE structure MQLONG Encoding; // Numeric encoding of data that follows MQMDE MQLONG CodedCharSetId; // Character-set identifier of data that follows MQMDE MQCHAR8 Format; // Format name of data that follows MQMDE MQLONG Flags; // General flags MQBYTE24 GroupId; // Group identifier MQLONG MsgSeqNumber; // Sequence number of logical message within group MQLONG Offset; // Offset of data in physical message from start of logical message MQLONG MsgFlags; // Message flags MQLONG OriginalLength; // Length of original message // Ver:2 };
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.ibm.mq.headers.MQHeader
MQHeader.Field
-
-
Field Summary
-
Constructor Summary
Constructors Constructor and Description MQMDE()Constructs an MQMDE instance with default field values.MQMDE(java.io.DataInput message)Constructs an MQMDE instance populated from an MQMessage.MQMDE(java.io.DataInput message, int encoding, int characterSet)Constructs an MQMDE instance populated from a DataInput source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Stringformat()intgetCodedCharSetId()Get the Character set identifier of data that follows.intgetEncoding()Get the numeric encoding of the data that follows.intgetFlags()gets the General flagsjava.lang.StringgetFormat()gets the Format name of data that follows MQMDEbyte[]getGroupId()gets the Group identifierintgetMsgFlags()gets the Message flagsintgetMsgSeqNumber()gets the Sequence number of logical message within groupintgetOffset()gets the Offset of data in physical message from start of logical messageintgetOriginalLength()gets the Length of original messagejava.lang.StringgetStrucId()Get the structure identifier; the value will be MQMDE_STRUC_IDintgetStrucLength()Get the length of the structure.intgetVersion()Get the Structure version numberbooleanhasExtensionContent()indicates whether the MQMDE has extension contentintnextCharacterSet()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.voidsetCodedCharSetId(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 General flagsvoidsetFormat(java.lang.String value)sets the Format name of data that follows MQMDEvoidsetGroupId(byte[] value)sets the Group identifiervoidsetMsgFlags(int value)sets the Message flagsvoidsetMsgSeqNumber(int value)sets the Sequence number of logical message within groupvoidsetOffset(int value)sets the Offset of data in physical message from start of logical messagevoidsetOriginalLength(int value)sets the Length of original 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, write, write
-
-
-
-
Constructor Detail
-
MQMDE
public MQMDE()
Constructs an MQMDE instance with default field values.
-
MQMDE
public MQMDE(java.io.DataInput message) throws MQDataException, java.io.IOExceptionConstructs an MQMDE instance populated from an MQMessage.- Parameters:
message- the message to read- Throws:
MQDataException- if the message content does not yield a valid MQMDE stucturejava.io.IOException- if there is a problem reading the message content
-
MQMDE
public MQMDE(java.io.DataInput message, int encoding, int characterSet) throws MQDataException, java.io.IOExceptionConstructs an MQMDE 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 MQMDE 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 MQMDE_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
public java.lang.String getFormat()
gets the Format name of data that follows MQMDE- Returns:
- the Format name of data that follows MQMDE
-
setFormat
public void setFormat(java.lang.String value)
sets the Format name of data that follows MQMDE- Parameters:
value- the Format name of data that follows MQMDE
-
getFlags
public int getFlags()
gets the General flags- Returns:
- the General flags
-
setFlags
public void setFlags(int value)
sets the General flags- Parameters:
value- the General flags
-
getGroupId
public byte[] getGroupId()
gets the Group identifier- Returns:
- the Group identifier
-
setGroupId
public void setGroupId(byte[] value)
sets the Group identifier- Parameters:
value- the Group identifier
-
getMsgSeqNumber
public int getMsgSeqNumber()
gets the Sequence number of logical message within group- Returns:
- the Sequence number of logical message within group
-
setMsgSeqNumber
public void setMsgSeqNumber(int value)
sets the Sequence number of logical message within group- Parameters:
value- the Sequence number of logical message within group
-
getOffset
public int getOffset()
gets the Offset of data in physical message from start of logical message- Returns:
- the Offset of data in physical message from start of logical message
-
setOffset
public void setOffset(int value)
sets the Offset of data in physical message from start of logical message- Parameters:
value- the Offset of data in physical message from start of logical message
-
getMsgFlags
public int getMsgFlags()
gets the Message flags- Returns:
- the Message flags
-
setMsgFlags
public void setMsgFlags(int value)
sets the Message flags- Parameters:
value- the Message flags
-
getOriginalLength
public int getOriginalLength()
gets the Length of original message- Returns:
- the Length of original message
-
setOriginalLength
public void setOriginalLength(int value)
sets the Length of original message- Parameters:
value- the Length of original message
-
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()
-
hasExtensionContent
public boolean hasExtensionContent()
indicates whether the MQMDE has extension content- Returns:
- true or false as appropriate
-
-