com.ibm.mq.headers

Class MQMDE

  1. java.lang.Object
  2. extended bycom.ibm.mq.jmqi.JmqiObject
  3. extended bycom.ibm.mq.headers.internal.Header
  4. extended bycom.ibm.mq.headers.MQMDE
All implemented interfaces:
MQChainable, MQData, MQHeader

  1. public class MQMDE
  2. extends com.ibm.mq.headers.internal.Header
  3. 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

Fields inherited from class com.ibm.mq.headers.internal.Header
DEFAULT_CCSID, DEFAULT_ENCODING
Fields inherited from class com.ibm.mq.jmqi.JmqiObject
COMP_JM, COMP_JN, COMP_JO

Constructor Summary

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

Modifier and Type Method and Description
  1. java.lang.String
format()
  1. int
getCodedCharSetId()
Get the Character set identifier of data that follows.
  1. int
getEncoding()
Get the numeric encoding of the data that follows.
  1. int
getFlags()
gets the General flags
  1. java.lang.String
getFormat()
gets the Format name of data that follows MQMDE
  1. byte[]
getGroupId()
gets the Group identifier
  1. int
getMsgFlags()
gets the Message flags
  1. int
getMsgSeqNumber()
gets the Sequence number of logical message within group
  1. int
getOffset()
gets the Offset of data in physical message from start of logical message
  1. int
getOriginalLength()
gets the Length of original message
  1. java.lang.String
getStrucId()
Get the structure identifier; the value will be MQMDE_STRUC_ID
  1. int
getStrucLength()
Get the length of the structure.
  1. int
getVersion()
Get the Structure version number
  1. boolean
hasExtensionContent()
indicates whether the MQMDE has extension content
  1. int
nextCharacterSet()
  1. void
nextCharacterSet(int value)
  1. int
nextEncoding()
  1. void
nextEncoding(int value)
  1. java.lang.String
nextFormat()
  1. void
nextFormat(java.lang.String value)
  1. void
setCodedCharSetId(int value)
Set the Character set identifier of data that follows.
  1. void
setEncoding(int value)
Set the numeric encoding of the data that follows.
  1. void
setFlags(int value)
sets the General flags
  1. void
setFormat(java.lang.String value)
sets the Format name of data that follows MQMDE
  1. void
setGroupId(byte[] value)
sets the Group identifier
  1. void
setMsgFlags(int value)
sets the Message flags
  1. void
setMsgSeqNumber(int value)
sets the Sequence number of logical message within group
  1. void
setOffset(int value)
sets the Offset of data in physical message from start of logical message
  1. void
setOriginalLength(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
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MQMDE

  1. public MQMDE()
Constructs an MQMDE instance with default field values.

MQMDE

  1. public MQMDE(java.io.DataInput message)
  2. throws MQDataException
  3. java.io.IOException
Constructs 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 stucture
java.io.IOException - if there is a problem reading the message content

MQMDE

  1. public MQMDE(java.io.DataInput message,
  2. int encoding,
  3. int characterSet)
  4. throws MQDataException
  5. java.io.IOException
Constructs an MQMDE 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 MQMDE stucture
java.io.IOException - if there is a problem reading the message content

Method Detail

getStrucId

  1. public java.lang.String getStrucId( )
Get the structure identifier; the value will be MQMDE_STRUC_ID
Returns:
the structure identifier

getVersion

  1. public int getVersion()
Get the Structure version number
Returns:
the Structure version number

getStrucLength

  1. public int getStrucLength()
Get the length of the structure.
Returns:
the structure length.

getEncoding

  1. public int getEncoding()
Get the numeric encoding of the data that follows.
Returns:
the numeric encoding. A combination of MQENC_* values.

setEncoding

  1. 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

  1. public int getCodedCharSetId()
Get the Character set identifier of data that follows.
Returns:
the Character set identifier.

setCodedCharSetId

  1. public void setCodedCharSetId(int value)
Set the Character set identifier of data that follows.
Parameters:
value - the Character set identifier.

getFormat

  1. public java.lang.String getFormat( )
gets the Format name of data that follows MQMDE
Returns:
the Format name of data that follows MQMDE

setFormat

  1. 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

  1. public int getFlags()
gets the General flags
Returns:
the General flags

setFlags

  1. public void setFlags(int value)
sets the General flags
Parameters:
value - the General flags

getGroupId

  1. public byte[] getGroupId()
gets the Group identifier
Returns:
the Group identifier

setGroupId

  1. public void setGroupId(byte[] value)
sets the Group identifier
Parameters:
value - the Group identifier

getMsgSeqNumber

  1. public int getMsgSeqNumber()
gets the Sequence number of logical message within group
Returns:
the Sequence number of logical message within group

setMsgSeqNumber

  1. 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

  1. 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

  1. 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

  1. public int getMsgFlags()
gets the Message flags
Returns:
the Message flags

setMsgFlags

  1. public void setMsgFlags(int value)
sets the Message flags
Parameters:
value - the Message flags

getOriginalLength

  1. public int getOriginalLength()
gets the Length of original message
Returns:
the Length of original message

setOriginalLength

  1. public void setOriginalLength(int value)
sets the Length of original message
Parameters:
value - the Length of original message

nextEncoding

  1. public int nextEncoding()
Description copied from interface: MQChainable
Returns the numeric encoding of the next header or message content.
Specified by:
nextEncoding in interface MQChainable

nextEncoding

  1. 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

nextCharacterSet

  1. public int nextCharacterSet()
Description copied from interface: MQChainable
Returns the CCSID of the next header or message content.
Specified by:

nextCharacterSet

  1. public void nextCharacterSet(int value)
Description copied from interface: MQChainable
Sets the CCSID of the next header or message content.
Specified by:

nextFormat

  1. public java.lang.String nextFormat( )
Description copied from interface: MQChainable
Returns the format of the next header or message content.
Specified by:
nextFormat in interface MQChainable

nextFormat

  1. public void nextFormat(java.lang.String value)
Description copied from interface: MQChainable
Sets the format of the next header or message content.
Specified by:
nextFormat in interface MQChainable

format

  1. public java.lang.String format( )
Description copied from interface: MQChainable
Returns the format associated with this header object or message content.
Specified by:
format in interface MQChainable

hasExtensionContent

  1. public boolean hasExtensionContent( )
indicates whether the MQMDE has extension content
Returns:
true or false as appropriate