Websphere MQ Everyplace

com.ibm.mqe.mqemqmessage
Class MQeMQMsgObject

java.lang.Object
  |
  +--com.ibm.mqe.MQe
        |
        +--com.ibm.mqe.MQeFields
              |
              +--com.ibm.mqe.MQeMsgObject
                    |
                    +--com.ibm.mqe.mqemqmessage.MQeMQMsgObject
All Implemented Interfaces:
MQeExceptionCodes
Direct Known Subclasses:
MQePubSubMsgObject

public class MQeMQMsgObject
extends MQeMsgObject

This section describes the Java class used to represent a Websphere MQ style message object within WebSphere MQ Everyplace. It can be used to create and read Websphere MQs style message objects.

The class has getxxx() and setxxx() methods for all the Websphere MQ message header fields. For efficiency however, only fields that have been set to a non-default value are actually contained in the message object .

The class also defines few fields which correspond to the information related to headers added by JMS applications.

This class is a descendant of MQeMsgObject.

Function:

This class represents a WebSphere MQ style message. It is designed for use with messages which flow between WebSphere MQ and WMQe applications and use the WebSphere MQ message format.

The default message transformer in the WMQe/WMQ Bridge will create a MQeMQMsgObject when it transforms a WebSphere MQ message which is not marked as being in WMQe format.

If an MQeMQMsgObject arrives at the bridge from WMQe, the default message transformer will map the message header values and data directly into a WebSphere MQ message.

The following list shows how a message coming from a WebSphere MQ system maps to the WMQe Format, and vice-versa.

WMQe field name: FIELD_NAME_MQ_DATA

The message payload, as byte array data.

If this field is not in the message, then a zero-length byte array is assumed.

WMQe field name: MQe.Msg_Priority

The message priority. An integer field. Values 0-9 inclusive.

The value has the same meaning as in the WMQ message header.

If the message is constructed without this field, then a value of DEF_PRIORITY is returned from the get method indicating that the priority has not been set, and that a default should be assumed.

WMQe field name: MQe.Msg_MsgID

The message identifier. A byte array field. Normally set to 24 bytes long to match that used by WMQ.

If the message is constructed without this field, then a value of DEF_MESSAGE_ID is assumed.

WMQe field name: MQe.Msg_CorrelID

The correlation identifier. A byte array field. Normally set to 24 bytes long to match that used by WMQ.

If the message is constructed without this field, then a value of DEF_CORRELATION_ID is assumed.

WMQe field name: MQe.Msg_ReplyToQ

The name of the reply-to queue. An ASCII String field. The queue to which reply messages are sent, as a result of this message being processed.

If this field is missing from the message, then a value of DEF_REPLY_TO_QUEUE_NAME is assumed.

WMQe field name: MQe.Msg_ReplyToQMgr

The name of the reply-to queue manager. An ASCII String field. The queue manager to which reply messages are sent, as a result of this message being processde.

If this field is missing from the message, then a value of DEF_REPLY_TO_QUEUE_MANAGER_NAME is assumed.

WMQe field name: FIELD_NAME_MQ_REPORT

The reporting options. It is an integer field. See the WMQ programming reference for more detail.

If this field is missing from the message, then a value of DEF_REPORT is assumed.

WMQe field name: MQe.Msg_Style

The type of the message. An integer field.

If this field is missing from the message, then a value of MQe.Msg_Style_Datagram is assumed.

WMQe field name: MQe.Msg_ExpireTime

The expiry time of the message. An integer field or a long field.

If this field is missing from the message, then a value of DEF_EXPIRY is assumed.

WMQe field name: FIELD_NAME_MQ_FEEDBACK

The feedback, or reason code. This is an integer field.

If this field is missing from the message, then a value of DEF_FEEDBACK is assumed.

WMQe field name: FIELD_NAME_MQ_CHARACTER_SET

The coded character set the data is encoded in. An integer field.

If this field is missing from the message, then a value of DEF_CHARACTER_SET is assumed.

WMQe field name: FIELD_NAME_MQ_ENCODING

The data encoding used. An integer field.

If this field is missing from the message, then a value of DEF_ENCODING is assumed.

WMQe field name: FIELD_NAME_MQ_FORMAT

The format of the message, as defined by the WMQ reference manuals.

The field is encoded as an Unicode String string. Normally 8 characters long.

If this field is missing from the message, then a value of DEF_FORMAT is assumed.

WMQe field name: FIELD_NAME_MQ_PERSISTENCE

Whether the message is "persistent" or not, as defined by the WMQ reference manuals.

This is an integer field.

If this field is missing then a value of DEF_PERSISTENCE is assumed.

WMQe field name: FIELD_NAME_MQ_BACKOUT_COUNT

Indicates how many times the message has been backed-out, as defined in the WMQ reference manuals.

This is an integer field.

If this field is missing then a value of DEF_BACKOUT_COUNT is assumed.

WMQe field name: FIELD_NAME_MQ_USER_ID

Indicates the name of the user who generated the message, as defined in the WMQ reference manuals.

The field is an Unicode Stringfield, usually of length 12 to match that used by WMQ.

If this field is missing then a value of DEF_USER_ID is assumed.

WMQe field name: FIELD_NAME_MQ_ACCOUNTING_TOKEN

Indicates the accounting token associated with this message, as defined in the WMQ reference material.

The field is of type byte array.

If this field is missing, then a value of DEF_ACCOUNTING_TOKEN is assumed.

WMQe field name: FIELD_NAME_MQ_APP_ID_DATA

Holds application data relating to identity.

This is a an Unicode String field.

If this field is missing, then a value of DEF_APPLICATION_ID_DATA is assumed.

WMQe field name: FIELD_NAME_MQ_PUT_APP_TYPE

Holds the type of the application which put the message.

This is an integer field.

If this field is missing from the message, then a value of DEF_PUT_APPLICATION_TYPE is assumed.

WMQe field name: FIELD_NAME_MQ_PUT_APP_NAME

Holds the name of the application which put the message.

This is an Unicode String field.

If this field is missing from the message, then a value of DEF_PUT_APPLICATION_NAME is assumed.

WMQe field name: FIELD_NAME_MQ_GROUP_ID

Holds the group identifier information, as defined in the WMQ reference material.

This is a byte array field.

If this field is missing from the message, then a value of DEF_GROUP_ID is assumed.

WMQe field name: FIELD_NAME_MQ_PUT_DATE_TIME

Holds the combined value of the time and date the message was put, as a java Epoc. (Milliseconds since 1 jan 1970).

This is a field of type long.

If this field is missing from the message, then the current time at the point the information is required is returned.

WMQe field name: FIELD_NAME_MQ_APP_ORIG_DATA

Holds application data relating to the original source of the data.

This is a Unicode String field.

If this field is missing from the message, then a default value of DEF_APPLICATION_ORIGIN_DATA is assumed.

WMQe field name: FIELD_NAME_MQ_MSG_SEQUENCE_NUM

Holds the sequence number of the logical message within a group of messages, as defined by the WMQ reference material.

This is an integer field.

If this field is missing from the message, then a default value of DEF_SEQUENCE_NUMBER is assumed.

WMQe field name: FIELD_NAME_MQ_OFFSET

Holds the offset of the data in the physical message from the start of a logical message, as defined by the WMQ reference material.

This field is of type integer.

If this field is missing from the message, then a default value of DEF_OFFSET is assumed.

WMQe field name: FIELD_NAME_MQ_MSG_FLAGS

Holds message flags, as defined by the WMQ reference material.

This is an integer field. If the field is not defined in the message, then a value of DEF_MESSAGE_FLAGS is assumed.

WMQe field name: FIELD_NAME_MQ_ORIGINAL_LENGTH

Holds the length of the original message.

This is an integer field. If the field is not defined in the message, then a value of DEF_ORIGINAL_LENGTH is assumed.


Field Summary
static byte[] DEF_ACCOUNTING_TOKEN
           
static java.lang.String DEF_APPLICATION_ID_DATA
           
static java.lang.String DEF_APPLICATION_ORIGIN_DATA
          The default value used for the FIELD_NAME_MQ_APP_ORIG_DATA field if it has not been specified explicitly in the message.
static int DEF_BACKOUT_COUNT
          The default value used for the FIELD_NAME_MQ_BACKOUT_COUNT field if it has not been set in the message.
static int DEF_CHARACTER_SET
          The default value used for the FIELD_NAME_MQ_CHARACTER_SET field if it has not been set in the message.
static byte[] DEF_CORRELATION_ID
          The default value used for the MQe.Msg_CorrelID field if it has not been set in the message.
static int DEF_ENCODING
          The default encoding assumed if it has not been set in the message.
static int DEF_EXPIRY
          The default expiry time used if it has not been set in the message.
static int DEF_FEEDBACK
          The default feedback options used if none are set in the message.
static java.lang.String DEF_FORMAT
          The default "format" information assumed if none are set in the message.
static byte[] DEF_GROUP_ID
          The default value used for the FIELD_NAME_MQ_GROUP_ID field if not set in the message.
static int DEF_MESSAGE_FLAGS
          The default message flag settings, used if the FIELD_NAME_MQ_MSG_FLAGS field is not set in the message.
static byte[] DEF_MESSAGE_ID
          The default value used for the MQe.Msg_MsgID field if it has not been set in the message.
static int DEF_MESSAGE_TYPE
          The default message type if none is set in the message.
static int DEF_OFFSET
          The default offset assumed to be in the message if the FIELD_NAME_MQ_OFFSET field has not been set in the message.
static int DEF_ORIGINAL_LENGTH
          The default message length.
static int DEF_PERSISTENCE
          The default value used for the FIELD_NAME_MQ_PERSISTENCE field if it is not set in the message.
static int DEF_PRIORITY
          The default value used for the MQe.Msg_Priority field if it has not been set in the message.
static java.lang.String DEF_PUT_APPLICATION_NAME
          The default value used for the FIELD_NAME_MQ_PUT_APP_NAME field if it has not been set in the message.
static int DEF_PUT_APPLICATION_TYPE
           
static java.lang.String DEF_REPLY_TO_QUEUE_MANAGER_NAME
           
static java.lang.String DEF_REPLY_TO_QUEUE_NAME
          The default value used for the MQe.Msg_ReplyToQ field if it has not been set in the message.
static int DEF_REPORT
          The default value used for reporting options; indicates that no reporting options are set.
static int DEF_SEQUENCE_NUMBER
          The default sequence number used if the FIELD_NAME_MQ_MSG_SEQUENCE_NUM field is not set in the message.
static java.lang.String DEF_USER_ID
           
static java.lang.String FIELD_NAME_MQ_ACCOUNTING_TOKEN
          The name of an optional byte array field used to hold the accounting token associated with this message, as defined in the WMQ reference material.
static java.lang.String FIELD_NAME_MQ_APP_ID_DATA
          The name of an optional Unicode String field which holds appliation data relating to identity.
static java.lang.String FIELD_NAME_MQ_APP_ORIG_DATA
          The name of an optional Unicode String field which holds application data relating to the original source of the data.
static java.lang.String FIELD_NAME_MQ_BACKOUT_COUNT
          The name of an optional integer field used to indicates how many times the message has been backed-out, as defined in the WMQ reference manuals.
static java.lang.String FIELD_NAME_MQ_CHARACTER_SET
          The name of an optional integer field used to hold the coded character set the data is encoded in.
static java.lang.String FIELD_NAME_MQ_DATA
          The name of the optional byte array field which holds the message payload.
static java.lang.String FIELD_NAME_MQ_ENCODING
          The name of an optional integer field used to hold the data encoding used for the message data.
static java.lang.String FIELD_NAME_MQ_FEEDBACK
          The name of an optional integer field used to hold the feedback, or reason code.
static java.lang.String FIELD_NAME_MQ_FORMAT
          The name of an optional Unicode String field used to indicate the format of the message data, as defined by the WMQ reference manuals.
static java.lang.String FIELD_NAME_MQ_GROUP_ID
          The name of the optional byte array field which holds group identifier information, as defined in the WMQ reference material.
static java.lang.String FIELD_NAME_MQ_MSG_FLAGS
          The name of the optional integer field which holds message flags, as defined by the WMQ reference material.
static java.lang.String FIELD_NAME_MQ_MSG_SEQUENCE_NUM
          The name of the optional integer field which holds the sequence number of the logical message within a group of messages, as defined by the WMQ reference material.
static java.lang.String FIELD_NAME_MQ_OFFSET
          The name of the optional integer field which holds the offset of the data in the physical message from the start of a logical message, as defined by the WMQ reference material.
static java.lang.String FIELD_NAME_MQ_ORIGINAL_LENGTH
          The name of the optional integer field which holds the length of the original message.
static java.lang.String FIELD_NAME_MQ_PERSISTENCE
          The name of an optional integer field used to indicate whether the message is persistent or not, as defined by the WMQ reference manuals.
static java.lang.String FIELD_NAME_MQ_PUT_APP_NAME
          The name of an optional Unicode String field which indicates the name of the application which put the message.
static java.lang.String FIELD_NAME_MQ_PUT_APP_TYPE
          The name of an optional integer field which indicates the type of the application which put the message.
static java.lang.String FIELD_NAME_MQ_PUT_DATE_TIME
          The name of an optional long field which holds the combined value of the time and date the message was put, as a Java Epoc.
static java.lang.String FIELD_NAME_MQ_REPORT
          The name of an optional integer field used to hold the reporting options a message will use when being conveyed on an WMQ system.
static java.lang.String FIELD_NAME_MQ_USER_ID
          The name of an optional Unicode String field used to hold the name of the user who generated the message, as defined in the WMQ reference manuals.
 
Fields inherited from class com.ibm.mqe.MQeFields
ArraySeparator, TypeArrayElements, TypeAscii, TypeBoolean, TypeByte, TypeDouble, TypeFields, TypeFloat, TypeInt, TypeLong, TypeShort, TypeUnicode, TypeUnTyped
 
Fields inherited from class com.ibm.mqe.MQe
Admin_Queue_Name, Admin_Reply_Queue_Name, copyright, DeadLetter_Queue_Name, Event_Activate, Event_Attribute, Event_Authenticate, Event_Close, Event_Logoff, Event_Logon, Event_MiniCert_Validate, Event_Queue, Event_QueueManager, Event_UserBase, JMS_Version, MQ_Headers, MQe_Log_Audit_Failure, MQe_Log_Audit_Success, MQe_Log_Error, MQe_Log_Information, MQe_Log_Success, MQe_Log_Warning, Msg_BackoutCount, Msg_CorrelID, Msg_ExpireTime, Msg_LockID, Msg_MsgID, Msg_OriginQMgr, Msg_Priority, Msg_ReplyToQ, Msg_ReplyToQMgr, Msg_Resend, Msg_Style, Msg_Style_Datagram, Msg_Style_Reply, Msg_Style_Request, Msg_Time, Msg_WrapMsg, sccsid, System_Default_Queue_Name, version
 
Fields inherited from interface com.ibm.mqe.MQeExceptionCodes
Except_Active, Except_AdapterException, Except_AdapterMissingRemoteAddress, Except_Admin_ActionNotSupported, Except_Admin_InvalidField, Except_Admin_NotAdminMsg, Except_AdminAction, Except_Authenticate, Except_BadRequest, Except_BridgeListener, Except_Chnl_Attributes, Except_Chnl_ID, Except_Chnl_Limit, Except_Chnl_Overrun, Except_Closed, Except_Con_AdapterRequired, Except_Con_AliasAlreadyExists, Except_Con_AlreadyExists, Except_Con_InvalidName, Except_Connect_Failure, Except_ConnectonType, Except_Cryptor, Except_Data, Except_Duplicate, Except_JmxProperties, Except_Listener, Except_MessageStore, Except_MiniCertReg_ActivateFailed, Except_MiniCertReg_BadPIN, Except_MiniCertReg_NotOpen, Except_NotActive, Except_NotAllowed, Except_NotFound, Except_NotSupported, Except_PrivateReg_ActivateFailed, Except_PrivateReg_BadPIN, Except_PrivateReg_NotOpen, Except_PublicReg_ActivateFailed, Except_PublicReg_InvalidAddress, Except_PublicReg_InvalidRequest, Except_Q_Full, Except_Q_InvalidName, Except_Q_InvalidPriority, Except_Q_MsgTooLarge, Except_Q_NoMatchingMsg, Except_Q_TargetRegistryRequired, Except_QMgr_Activated, Except_QMgr_AlreadyExists, Except_QMgr_InvalidQMgrName, Except_QMgr_InvalidQName, Except_QMgr_NotActive, Except_QMgr_NotBridgeEnabled, Except_QMgr_NotConfigured, Except_QMgr_QDoesNotExist, Except_QMgr_QExists, Except_QMgr_QNotEmpty, Except_QMgr_RegistryDataVersion, Except_QMgr_UnknownQMgr, Except_QMgr_WrongQType, Except_Reg_AddFailed, Except_Reg_AlreadyExists, Except_Reg_AlreadyOpen, Except_Reg_CRTKeyDecFailed, Except_Reg_CRTKeySignFailed, Except_Reg_DeleteFailed, Except_Reg_DeleteRegistryFailed, Except_Reg_DoesNotExist, Except_Reg_InvalidSession, Except_Reg_ListFailed, Except_Reg_NotDefined, Except_Reg_NotSecure, Except_Reg_NullName, Except_Reg_OpenFailed, Except_Reg_ReadFailed, Except_Reg_RenameFailed, Except_Reg_ResetPINFailed, Except_Reg_SearchFailed, Except_Reg_UpdateFailed, Except_RemoteException, Except_Rule, Except_S_BadIntegrity, Except_S_BadSubject, Except_S_CertificateExpired, Except_S_Cipher, Except_S_InvalidAttribute, Except_S_InvalidSignature, Except_S_MiniCertNotAvailable, Except_S_MissingSection, Except_S_NoPresetKeyAvailable, Except_S_RegistryNotAvailable, Except_Stopped, Except_Syntax, Except_TimeOut, Except_Transporter, Except_TriggerTransmission, Except_Trnsport_QMgr, Except_Trnsport_Request, Except_Type, Except_UdpipAdapterStateException, Except_UdpipAdapterTimeOut, Except_UdpipAdapterUnableToConfirmSuccess, Except_UnCoded, Except_Uncontactable_DontTransmit
 
Constructor Summary
MQeMQMsgObject()
          This creates a new MQeMQMsgObject.
MQeMQMsgObject(MQeMsgObject msg)
          This creates a new MQeMQMsgObject, wrapping a supplied message into the new object and setting the properties from the supplied message.
 
Method Summary
 java.lang.String dumpAllToString()
          Dumps all the field values from the message to a string.
 java.lang.String dumpToString()
          Dumps the field values in the message object to a string.
 boolean equals(byte[] b1, byte[] b2)
          Compares two byte arrays for equality.
 byte[] getAccountingToken()
          Gets the value of the accounting token - this corresponds to a field in the WMQ standard message header (MQMD).
 java.lang.String getApplicationIdData()
          Gets the value of the application ID data - this corresponds to a field in the WMQ standard message header (MQMD).
 java.lang.String getApplicationOriginData()
          Gets the value of the application origin data - this corresponds to a field in the WMQ standard message header (MQMD).
 int getBackoutCount()
          Gets thevalue of the backout count - this corresponds to a field in the WMQ standard message header (MQMD).
 int getCharacterSet()
          Gets thevalue of the coded character set identifier - this corresponds to a field in the WMQ standard message header (MQMD).
 byte[] getCorrelationId()
          Gets the value of the correlation id - this corresponds to a field in the WMQ standard message header (MQMD).
 byte[] getData()
          Gets the message data - this corresponds to the payload of the WMQ message.
 int getEncoding()
          Gets the encoding value - this corresponds to a field in the WMQ standard message header (MQMD).
 int getExpiry()
          Gets the expiry value - this corresponds to a field in the WMQ standard message header (MQMD).
 int getFeedback()
          Gets the feedback value - this corresponds to a field in the WMQ standard message header (MQMD).
 java.lang.String getFormat()
          Gets the value of the format - this corresponds to a field in the WMQ standard message header (MQMD).
 byte[] getGroupId()
          Gets the value of the group ID - this corresponds to a field in the WMQ standard message header (MQMD).
 int getMessageFlags()
          Gets the value of the message flags - this corresponds to a field in the WMQ standard message header (MQMD).
 byte[] getMessageId()
          Gets the value of the message ID - this corresponds to a field in the WMQ standard message header (MQMD).
 int getMessageSequenceNumber()
          Gets the value of the message sequence number - this corresponds to a field in the WMQ standard message header (MQMD).
 int getMessageType()
          Gets the message type (i.e.
 int getOffset()
          Gets the value of the offset - this corresponds to a field in the WMQ standard message header (MQMD).
 int getOriginalLength()
          Gets the original length - this corresponds to a field in the WMQ standard message header (MQMD).
 int getPersistence()
          Gets the persistence value - this corresponds to a field in the WMQ standard message header (MQMD).
 int getPriority()
          Gets the priority - this corresponds to a field in the WMQ standard message header (MQMD).
 java.lang.String getPutApplicationName()
          Gets the put application name - this corresponds to a field in the WMQ standard message header (MQMD).
 int getPutApplicationType()
          Gets the put application type - this corresponds to a field in the WMQ standard message header (MQMD).
 java.util.Calendar getPutDateTime()
          Gets the put date and time - this corresponds to a field in the WMQ standard message header (MQMD).
 java.lang.String getReplyToQueueManagerName()
          Gets the reply-to queue manager name - this corresponds to a field in the WMQ standard message header (MQMD).
 java.lang.String getReplyToQueueName()
          Gets the reply-to queue name - this corresponds to a field in the WMQ standard message header (MQMD).
 int getReport()
          Gets the report value - this corresponds to a field in the WMQ standard message header (MQMD).
 java.lang.String getUserId()
          Gets the value of the user ID - this corresponds to a field in the WMQ standard message header (MQMD).
 void setAccountingToken(byte[] accountingToken)
          Sets the value of the accounting token - this corresponds to a field in the WMQ standard message header (MQMD).
 void setApplicationIdData(java.lang.String applicationIdData)
          Sets the application ID data - this corresponds to a field in the WMQ standard message header (MQMD).
 void setApplicationOriginData(java.lang.String applicationOriginData)
          Sets the application origin data - this corresponds to a field in the WMQ standard message header (MQMD).
 void setBackoutCount(int backoutCount)
          Sets the value of the backout count - this corresponds to a field in the WMQ standard message header (MQMD).
 void setCharacterSet(int characterSet)
          Sets the value of the coded character set identifier - this corresponds to a field in the WMQ standard message header (MQMD).
 void setCorrelationId(byte[] correlationId)
          Sets the value of the correlation ID - this corresponds to a field in the WMQ standard message header (MQMD).
 void setData(byte[] data)
          Sets the message data - this corresponds to the payload of the WMQ message.
 void setEncoding(int encoding)
          Sets the encoding value - this corresponds to a field in the WMQ standard message header (MQMD).
 void setExpiry(int expiry)
          Sets the expiry value - this corresponds to a field in the WMQ standard message header (MQMD).
 void setFeedback(int feedback)
          Sets the feedback value - this corresponds to a field in the WMQ standard message header (MQMD).
 void setFormat(java.lang.String format)
          Sets the format value - this corresponds to a field in the WMQ standard message header (MQMD).
 void setGroupId(byte[] groupId)
          Sets the value of the group ID - this corresponds to a field in the WMQ standard message header (MQMD).
 void setMessageFlags(int flags)
          Sets the value of the message flags - this corresponds to a field in the WMQ standard message header (MQMD).
 void setMessageId(byte[] messageId)
          Sets the value of the message ID - this corresponds to a field in the WMQ standard message header (MQMD).
 void setMessageSequenceNumber(int seqNo)
          Sets the value of the message sequence number - this corresponds to a field in the WMQ standard message header (MQMD).
 void setMessageType(int messageType)
          Sets the message type (i.e.
 void setOffset(int offset)
          Sets the value of the offset - this corresponds to a field in the WMQ standard message header (MQMD).
 void setOriginalLength(int len)
          Sets the value of the original length - this corresponds to a field in the WMQ standard message header (MQMD).
 void setPersistence(int persistence)
          Sets the persistence value - this corresponds to a field in the WMQ standard message header (MQMD).
 void setPriority(int priority)
          Sets the priority value - this corresponds to a field in the WMQ standard message header (MQMD).
 void setPutApplicationName(java.lang.String putApplicationName)
          Sets the put application name - this corresponds to a field in the WMQ standard message header (MQMD).
 void setPutApplicationType(int putApplicationType)
          Sets the put application type - this corresponds to a field in the WMQ standard message header (MQMD).
 void setPutDateTime(java.util.Calendar calendar)
          Sets the put date and time - this corresponds to a field in the WMQ standard message header (MQMD).
 void setReplyToQueueManagerName(java.lang.String replyToQMName)
          Sets the reply-to queue manager name - this corresponds to a field in the WMQ standard message header (MQMD).
 void setReplyToQueueName(java.lang.String replyToQueueName)
          Sets the reply-to queue name - this corresponds to a field in the WMQ standard message header (MQMD).
 void setReport(int report)
          Sets the report value - this corresponds to a field in the WMQ standard message header (MQMD).
 void setUserId(java.lang.String userId)
          Sets the value of the user ID - this corresponds to a field in the WMQ standard message header (MQMD).
 
Methods inherited from class com.ibm.mqe.MQeMsgObject
getMsgUIDFields, getOriginQMgr, getTimeStamp, putOriginQMgr, resetMsgUIDFields, unwrapMsgObject
 
Methods inherited from class com.ibm.mqe.MQeFields
contains, copy, copy, dataType, deepCopy, delete, dump, dumpedType, dumpToString, equals, fields, getArrayLength, getArrayOfByte, getArrayOfDoubleAsLong, getArrayOfFloatAsInt, getArrayOfInt, getArrayOfLong, getArrayOfShort, getAscii, getAsciiArray, getAttribute, getBoolean, getByte, getDoubleAsLong, getFields, getFieldsArray, getFloatAsInt, getInt, getIntArray, getLong, getLongArray, getObject, getShort, getShortArray, getUnicode, getUnicodeArray, includes, isEqualTo, putArrayLength, putArrayOfByte, putArrayOfDoubleAsLong, putArrayOfFloatAsInt, putArrayOfInt, putArrayOfLong, putArrayOfShort, putAscii, putAsciiArray, putBoolean, putByte, putByteArray, putDoubleAsLong, putFields, putFieldsArray, putFloatAsInt, putInt, putIntArray, putLong, putLongArray, putObject, putShort, putShortArray, putUnicode, putUnicodeArray, rename, restore, restoreFromString, restoreFromString, restoreFromString, setAttribute, updateValue
 
Methods inherited from class com.ibm.mqe.MQe
abbreviate, alias, asciiToByte, byteToAscii, byteToHex, byteToHex, byteToInt, byteToLong, byteToShort, byteToUnicode, fileSeparator, getEventLogHandler, hexToAscii, hexToByte, intToByte, isCLDC, loadClass, loadObject, log, setEventLogHandler, setLoader, sliceByteArray, type, unicodeToByte, uniqueValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEF_ORIGINAL_LENGTH

public static final int DEF_ORIGINAL_LENGTH
The default message length. Indicates that the message length is not valid, and that the field FIELD_NAME_MQ_ORIGINAL_LENGTH has not been set.

See Also:
Constant Field Values

DEF_MESSAGE_FLAGS

public static final int DEF_MESSAGE_FLAGS
The default message flag settings, used if the FIELD_NAME_MQ_MSG_FLAGS field is not set in the message.

See Also:
Constant Field Values

DEF_SEQUENCE_NUMBER

public static final int DEF_SEQUENCE_NUMBER
The default sequence number used if the FIELD_NAME_MQ_MSG_SEQUENCE_NUM field is not set in the message.

See Also:
Constant Field Values

DEF_OFFSET

public static final int DEF_OFFSET
The default offset assumed to be in the message if the FIELD_NAME_MQ_OFFSET field has not been set in the message.

See Also:
Constant Field Values

DEF_REPORT

public static final int DEF_REPORT
The default value used for reporting options; indicates that no reporting options are set. Used if the FIELD_NAME_MQ_REPORT field is not set in the message.

See Also:
Constant Field Values

DEF_MESSAGE_TYPE

public static final int DEF_MESSAGE_TYPE
The default message type if none is set in the message. A datagram style message. Used if the MQe.Msg_Style field is not set in the message.

See Also:
Constant Field Values

DEF_EXPIRY

public static final int DEF_EXPIRY
The default expiry time used if it has not been set in the message.

This value means that the message never expires.

Used if the MQe.Msg_ExpireTime field is not in the message.

See Also:
Constant Field Values

DEF_FEEDBACK

public static final int DEF_FEEDBACK
The default feedback options used if none are set in the message. ie: None.

See Also:
Constant Field Values

DEF_ENCODING

public static final int DEF_ENCODING
The default encoding assumed if it has not been set in the message.

See Also:
Constant Field Values

DEF_FORMAT

public static final java.lang.String DEF_FORMAT
The default "format" information assumed if none are set in the message.

A value of 8 space characters is the default.

See Also:
Constant Field Values

DEF_PRIORITY

public static final int DEF_PRIORITY
The default value used for the MQe.Msg_Priority field if it has not been set in the message.

This indicates that the priority field has not been set.

See Also:
Constant Field Values

DEF_PERSISTENCE

public static final int DEF_PERSISTENCE
The default value used for the FIELD_NAME_MQ_PERSISTENCE field if it is not set in the message.

This indicates that a message IS persistent.

See Also:
Constant Field Values

DEF_MESSAGE_ID

public static final byte[] DEF_MESSAGE_ID
The default value used for the MQe.Msg_MsgID field if it has not been set in the message.

It is a byte array, 24 elements long. Each element has a value of 0.


DEF_CORRELATION_ID

public static final byte[] DEF_CORRELATION_ID
The default value used for the MQe.Msg_CorrelID field if it has not been set in the message.

It is of type byte array, 24 elements long. Each element has a value of 0.


DEF_BACKOUT_COUNT

public static final int DEF_BACKOUT_COUNT
The default value used for the FIELD_NAME_MQ_BACKOUT_COUNT field if it has not been set in the message.

See Also:
Constant Field Values

DEF_REPLY_TO_QUEUE_NAME

public static final java.lang.String DEF_REPLY_TO_QUEUE_NAME
The default value used for the MQe.Msg_ReplyToQ field if it has not been set in the message.

It has a value of 48 spaces.

See Also:
Constant Field Values

DEF_REPLY_TO_QUEUE_MANAGER_NAME

public static final java.lang.String DEF_REPLY_TO_QUEUE_MANAGER_NAME
See Also:
Constant Field Values

DEF_USER_ID

public static final java.lang.String DEF_USER_ID
See Also:
Constant Field Values

DEF_ACCOUNTING_TOKEN

public static final byte[] DEF_ACCOUNTING_TOKEN

DEF_APPLICATION_ID_DATA

public static final java.lang.String DEF_APPLICATION_ID_DATA
See Also:
Constant Field Values

DEF_PUT_APPLICATION_TYPE

public static final int DEF_PUT_APPLICATION_TYPE
See Also:
Constant Field Values

DEF_PUT_APPLICATION_NAME

public static final java.lang.String DEF_PUT_APPLICATION_NAME
The default value used for the FIELD_NAME_MQ_PUT_APP_NAME field if it has not been set in the message.

See Also:
Constant Field Values

DEF_APPLICATION_ORIGIN_DATA

public static final java.lang.String DEF_APPLICATION_ORIGIN_DATA
The default value used for the FIELD_NAME_MQ_APP_ORIG_DATA field if it has not been specified explicitly in the message.

The value holds 4 space characters.

See Also:
Constant Field Values

DEF_GROUP_ID

public static final byte[] DEF_GROUP_ID
The default value used for the FIELD_NAME_MQ_GROUP_ID field if not set in the message.


DEF_CHARACTER_SET

public static final int DEF_CHARACTER_SET
The default value used for the FIELD_NAME_MQ_CHARACTER_SET field if it has not been set in the message.

Indicates a Unicode character set.

See Also:
Constant Field Values

FIELD_NAME_MQ_REPORT

public static final java.lang.String FIELD_NAME_MQ_REPORT
The name of an optional integer field used to hold the reporting options a message will use when being conveyed on an WMQ system.

See the WMQ programming reference for more detial of the available reporting options. Note that this field is not used by the WMQe messaging fabric.

If this field is missing from the message, then a value of DEF_REPORT is assumed.

See Also:
Constant Field Values

FIELD_NAME_MQ_FEEDBACK

public static final java.lang.String FIELD_NAME_MQ_FEEDBACK
The name of an optional integer field used to hold the feedback, or reason code.

See the WMQ programming reference material for a more detailed explanation.

If this field is missing from the message, then a value of DEF_FEEDBACK is assumed.

See Also:
Constant Field Values

FIELD_NAME_MQ_ENCODING

public static final java.lang.String FIELD_NAME_MQ_ENCODING
The name of an optional integer field used to hold the data encoding used for the message data.

If this field is missing from the message, then a value of DEF_ENCODING is assumed.

See Also:
Constant Field Values

FIELD_NAME_MQ_CHARACTER_SET

public static final java.lang.String FIELD_NAME_MQ_CHARACTER_SET
The name of an optional integer field used to hold the coded character set the data is encoded in.

If this field is missing from the message, then a value of DEF_CHARACTER_SET is assumed.

See Also:
Constant Field Values

FIELD_NAME_MQ_FORMAT

public static final java.lang.String FIELD_NAME_MQ_FORMAT
The name of an optional Unicode String field used to indicate the format of the message data, as defined by the WMQ reference manuals.

Normally 8 characters long.

If this field is missing from the message, then a value of DEF_FORMAT is assumed.

See Also:
Constant Field Values

FIELD_NAME_MQ_PERSISTENCE

public static final java.lang.String FIELD_NAME_MQ_PERSISTENCE
The name of an optional integer field used to indicate whether the message is persistent or not, as defined by the WMQ reference manuals.

WMQe does not use this field, it has an effect only when the message is being conveyed to, from or over an WMQ queue manager.

If this field is missing then a value of DEF_PERSISTENCE is assumed.

See Also:
Constant Field Values

FIELD_NAME_MQ_BACKOUT_COUNT

public static final java.lang.String FIELD_NAME_MQ_BACKOUT_COUNT
The name of an optional integer field used to indicates how many times the message has been backed-out, as defined in the WMQ reference manuals.

WMQe does not use this field, it has an effect only when the message is being conveyed to, from or over an WMQ queue manager.

If this field is missing then a value of DEF_BACKOUT_COUNT is assumed.

See Also:
Constant Field Values

FIELD_NAME_MQ_USER_ID

public static final java.lang.String FIELD_NAME_MQ_USER_ID
The name of an optional Unicode String field used to hold the name of the user who generated the message, as defined in the WMQ reference manuals.

The field is usually of length 12 to match that used by WMQ.

If this field is missing then a value of DEF_USER_ID is assumed.

See Also:
Constant Field Values

FIELD_NAME_MQ_ACCOUNTING_TOKEN

public static final java.lang.String FIELD_NAME_MQ_ACCOUNTING_TOKEN
The name of an optional byte array field used to hold the accounting token associated with this message, as defined in the WMQ reference material.

If this field is missing, then a value of DEF_ACCOUNTING_TOKEN is assumed.

See Also:
Constant Field Values

FIELD_NAME_MQ_APP_ID_DATA

public static final java.lang.String FIELD_NAME_MQ_APP_ID_DATA
The name of an optional Unicode String field which holds appliation data relating to identity.

If this field is missing, then a value of DEF_APPLICATION_ID_DATA is assumed.

See Also:
Constant Field Values

FIELD_NAME_MQ_PUT_APP_TYPE

public static final java.lang.String FIELD_NAME_MQ_PUT_APP_TYPE
The name of an optional integer field which indicates the type of the application which put the message.

The values of this field are defined by the WMQ reference manuals.

If this field is missing from the message, then a value of DEF_PUT_APPLICATION_TYPE is assumed.

See Also:
Constant Field Values

FIELD_NAME_MQ_PUT_APP_NAME

public static final java.lang.String FIELD_NAME_MQ_PUT_APP_NAME
The name of an optional Unicode String field which indicates the name of the application which put the message.

If this field is missing from the message, then a value of DEF_PUT_APPLICATION_NAME is assumed.

See Also:
Constant Field Values

FIELD_NAME_MQ_APP_ORIG_DATA

public static final java.lang.String FIELD_NAME_MQ_APP_ORIG_DATA
The name of an optional Unicode String field which holds application data relating to the original source of the data.

If this field is missing from the message, then a default value of DEF_APPLICATION_ORIGIN_DATA is assumed.

See Also:
Constant Field Values

FIELD_NAME_MQ_PUT_DATE_TIME

public static final java.lang.String FIELD_NAME_MQ_PUT_DATE_TIME
The name of an optional long field which holds the combined value of the time and date the message was put, as a Java Epoc.

Milliseconds since 1 Jan 1970.

If this field is missing from the message, then the current time at the point the information is required is returned.

See Also:
Constant Field Values

FIELD_NAME_MQ_DATA

public static final java.lang.String FIELD_NAME_MQ_DATA
The name of the optional byte array field which holds the message payload.

If this field is not in the message, then a zero-length byte array is assumed.

See Also:
Constant Field Values

FIELD_NAME_MQ_GROUP_ID

public static final java.lang.String FIELD_NAME_MQ_GROUP_ID
The name of the optional byte array field which holds group identifier information, as defined in the WMQ reference material.

If this field is missing from the message, then a value of DEF_GROUP_ID is assumed.

See Also:
Constant Field Values

FIELD_NAME_MQ_MSG_SEQUENCE_NUM

public static final java.lang.String FIELD_NAME_MQ_MSG_SEQUENCE_NUM
The name of the optional integer field which holds the sequence number of the logical message within a group of messages, as defined by the WMQ reference material.

If this field is missing from the message, then a default value of DEF_SEQUENCE_NUMBER is assumed.

See Also:
Constant Field Values

FIELD_NAME_MQ_OFFSET

public static final java.lang.String FIELD_NAME_MQ_OFFSET
The name of the optional integer field which holds the offset of the data in the physical message from the start of a logical message, as defined by the WMQ reference material.

If this field is missing from the message, then a default value of DEF_OFFSET is assumed.

See Also:
Constant Field Values

FIELD_NAME_MQ_MSG_FLAGS

public static final java.lang.String FIELD_NAME_MQ_MSG_FLAGS
The name of the optional integer field which holds message flags, as defined by the WMQ reference material.

If the field is not defined in the message, then a value of DEF_MESSAGE_FLAGS is assumed.

See Also:
Constant Field Values

FIELD_NAME_MQ_ORIGINAL_LENGTH

public static final java.lang.String FIELD_NAME_MQ_ORIGINAL_LENGTH
The name of the optional integer field which holds the length of the original message.

This is an integer field. If the field is not defined in the message, then a value of DEF_ORIGINAL_LENGTH is assumed.

See Also:
Constant Field Values
Constructor Detail

MQeMQMsgObject

public MQeMQMsgObject()
               throws java.lang.Exception
This creates a new MQeMQMsgObject.

Throws:
java.lang.Exception - Propagated from the super-class constructor, MQeMsgObject.
Example:
 MQeMQMsgObject MQMsg = new MQeMQMsgObject();
 
 

MQeMQMsgObject

public MQeMQMsgObject(MQeMsgObject msg)
               throws java.lang.Exception

This creates a new MQeMQMsgObject, wrapping a supplied message into the new object and setting the properties from the supplied message.

Parameters:
msg - The message object to be wrapped.
Throws:
java.lang.Exception - Propagated from the super-class constructor, MQeMsgObject.
Example:
 MQeMQMsgObject MQeMQMsg = new MQeMQMsgObject(MQeMsg);
 
 
Method Detail

getReport

public int getReport()
              throws java.lang.Exception

Gets the report value - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the Report header field; values are expected to be generated from suitable constants in the com.ibm.mq.MQC class.

Returns:
An integer containing the report value.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 int report = 0;
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         report = mqMsgObj.getReport();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return report;
 
 

getMessageType

public int getMessageType()
                   throws java.lang.Exception

Gets the message type (i.e. datagram, request, reply, report) - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the MsgType header field; values are expected to be suitable constants in the com.ibm.mqe.MQe class.

Returns:
An integer containing the value of the message type.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 int msgType = 0;
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         msgType = mqMsgObj.getMessageType();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return msgType;
 
 

getExpiry

public int getExpiry()
              throws java.lang.Exception

Gets the expiry value - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the Expiry header field. The value is in tenths of a second, as is used in Websphere MQ messages (it is not in milliseconds, which is used for the WebSphere MQ Everyplace expiry time).

Returns:
An integer containing the expiry value.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 int expiry = 0;
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         expiry = mqMsgObj.getExpiry();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return expiry;
 
 

getFeedback

public int getFeedback()
                throws java.lang.Exception

Gets the feedback value - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the Feedback header field.

Returns:
An integer containing the feedback value.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 int feedback = 0;
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         feedback = mqMsgObj.getFeedback();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return feedback;
 
 

getEncoding

public int getEncoding()
                throws java.lang.Exception

Gets the encoding value - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the Encoding header field; values are expected to be suitable constants in the com.ibm.mq.MQC class.

Returns:
An integer containing the Encoding value.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 int encode = 0;
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         encode = mqMsgObj.getEncoding();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return encode;
 
 

getCharacterSet

public int getCharacterSet()
                    throws java.lang.Exception

Gets thevalue of the coded character set identifier - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the CodedCharSetId header field; values are expected to be suitable constants in the com.ibm.mq.MQC class.

Returns:
An integer containing the value of the coded character set identifier.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 int charSet = 0;
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         charSet = mqMsgObj.getCharacterSet();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return charSet;
 
 

getFormat

public java.lang.String getFormat()
                           throws java.lang.Exception

Gets the value of the format - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the Format header field; values are expected to be suitable constants in the com.ibm.mq.MQC class.

Returns:
A String containing the format value.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 String format = " ";
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         format = mqMsgObj.getFormat();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return format;
 
 

getPriority

public int getPriority()
                throws java.lang.Exception

Gets the priority - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the Priority header field.

Returns:
An integer containing the priority value.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 int priority = 0;
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         priority = mqMsgObj.getPriority();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return priority;
 
 

getPersistence

public int getPersistence()
                   throws java.lang.Exception

Gets the persistence value - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the Persistence header field; values are expected to be suitable constants in the com.ibm.mq.MQC class.

Returns:
An integer containing the persistence value.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 int persistence = 0;
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         persistence = mqMsgObj.getPersistence();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return persistence;
 
 

getMessageId

public byte[] getMessageId()
                    throws java.lang.Exception

Gets the value of the message ID - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the MsgId header field.

Returns:
A byte array containing the value of the message ID.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 byte[] msgId = null;
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         msgId = mqMsgObj.getMessageId();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return msgId;
 
 

getCorrelationId

public byte[] getCorrelationId()
                        throws java.lang.Exception

Gets the value of the correlation id - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the CorrelId header field.

Returns:
A byte array containing the value of the correlation ID.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 byte[] correlId = null;
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         correlId = mqMsgObj.getCorrelationId();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return correlId;
 
 

getBackoutCount

public int getBackoutCount()
                    throws java.lang.Exception

Gets thevalue of the backout count - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the BackoutCount header field.

Returns:
An integer containing the value of the backout count.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 int backoutCount = 0;
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         backoutCount = mqMsgObj.getBackoutCount();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return backoutCount;
 
 

getReplyToQueueName

public java.lang.String getReplyToQueueName()
                                     throws java.lang.Exception

Gets the reply-to queue name - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the ReplyToQ header field.

Returns:
A String containing the value of the reply-to queue name.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 String replyToQueueName = " ";
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         replyToQueueName = mqMsgObj.getReplyToQueueName();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return replyToQueueName;
 
 

getReplyToQueueManagerName

public java.lang.String getReplyToQueueManagerName()
                                            throws java.lang.Exception

Gets the reply-to queue manager name - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the ReplyToQMgr header field.

Returns:
A String containing the value of the reply-to queue manager name.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 String replyToQueueMgrName = " ";
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         replyToQueueMgrName = mqMsgObj.getReplyToQueueManagerName();
 
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return replyToQueueMgrName;
 
 

getUserId

public java.lang.String getUserId()
                           throws java.lang.Exception

Gets the value of the user ID - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the UserIdentifier header field.

Returns:
A String containing the value of the user ID.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 String userId = " ";
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         userId = mqMsgObj.getUserId();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return userId;
 
 

getAccountingToken

public byte[] getAccountingToken()
                          throws java.lang.Exception

Gets the value of the accounting token - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the AccountingToken header field.

Returns:
A byte array containing the value of the accounting token.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 byte[] accountToken = null;
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         accountToken = mqMsgObj.getAccountingToken();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return accountToken;
 
 

getApplicationIdData

public java.lang.String getApplicationIdData()
                                      throws java.lang.Exception

Gets the value of the application ID data - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the ApplIdentityData header field.

Returns:
A string containing the value of the application ID data.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 String appIdData = " ";
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         appIdData = mqMsgObj.getApplicationIdData();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return appIdData;
 
 

getPutApplicationType

public int getPutApplicationType()
                          throws java.lang.Exception

Gets the put application type - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the PutApplType header field.

Returns:
An integer containing the value of the put application type.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 int putApplType = 0;
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         putApplType = mqMsgObj.getPutApplicationType();
 
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return putApplType;
 
 

getPutApplicationName

public java.lang.String getPutApplicationName()
                                       throws java.lang.Exception

Gets the put application name - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the PutApplName header field.

Returns:
A String containing the value of the put application name.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 String putApplName = " ";
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         putApplName = mqMsgObj.getPutApplicationName();
 
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return putApplName;
 
 

getApplicationOriginData

public java.lang.String getApplicationOriginData()
                                          throws java.lang.Exception

Gets the value of the application origin data - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the ApplOriginData header field.

Returns:
A string containing the value of the application origin data.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 String appOriginData = " ";
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         appOriginData = mqMsgObj.getApplicationOriginData();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return appOriginData;
 
 

getGroupId

public byte[] getGroupId()
                  throws java.lang.Exception

Gets the value of the group ID - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the GroupId header field.

Returns:
A byte array containing the value of the group ID.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 byte[] groupId = null;
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         groupId = mqMsgObj.getGroupId();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return groupId;
 
 

getPutDateTime

public java.util.Calendar getPutDateTime()
                                  throws java.lang.Exception

Gets the put date and time - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the PutDate and PutTime header fields. The value is returned as a Gregorian Calendar object, for consistency with the WebSphere MQ Classes for Java.

Returns:
A Gregorian Calendar object containing the put date and time value.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 Calendar putDateTime = Calendar.getInstance();
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         putDateTime = mqMsgObj.getPutDateTime();
 
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return putDateTime;
 
 

getMessageSequenceNumber

public int getMessageSequenceNumber()
                             throws java.lang.Exception

Gets the value of the message sequence number - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the MsgSeqNumber header field.

Returns:
An integer containing the value of the message sequence number.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 int msgSeqNo = 0;
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         msgSeqNo = mqMsgObj.getMessageSequenceNumber();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return msgSeqNo;
 
 

getOffset

public int getOffset()
              throws java.lang.Exception

Gets the value of the offset - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the Offset header field.

Returns:
An integer containing the offset value.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 int offset = 0;
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         offset = mqMsgObj.getOffset();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return offset;
 
 

getMessageFlags

public int getMessageFlags()
                    throws java.lang.Exception

Gets the value of the message flags - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the MsgFlags header field.

Returns:
An integer containing the value of the message flags header field.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 int msgFlags = 0;
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         msgFlags = mqMsgObj.getMessageFlags();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return msgFlags;
 
 

getOriginalLength

public int getOriginalLength()
                      throws java.lang.Exception

Gets the original length - this corresponds to a field in the WMQ standard message header (MQMD).

This method returns the value of the OriginalLength header field.

Returns:
An integer containing the value of the original length.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 int originalLength = 0;
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         originalLength = mqMsgObj.getOriginalLength();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return originalLength;
 
 

getData

public byte[] getData()
               throws java.lang.Exception

Gets the message data - this corresponds to the payload of the WMQ message.

This method returns the message data. The application must know how to interpret the data.

Returns:
A byte array containing the message data.
Throws:
java.lang.Exception - If there is an error reading the value from the message object.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 byte[] msgData = null;
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
         msgData = mqMsgObj.getData();
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return msgData;
 
 

setReport

public void setReport(int report)
               throws java.lang.Exception

Sets the report value - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the Report header field in the WebSphere MQ style message.

Parameters:
report - The value to be set in the report field; values must be generated from suitable constants in the com.ibm.mq.MQC class, e.g. MQC.MQRO_NEW_MSG_ID | MQC.MQRO_COPY_MSG_ID_TO_CORREL_ID | MQC.MQRO_DEAD_LETTER_Q.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     report = 0;
     mqeMsgObj.setReport(report);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setMessageType

public void setMessageType(int messageType)
                    throws java.lang.Exception

Sets the message type (i.e. datagram, request, reply, report) - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the MsgType header field in the WebSphere MQ style message. It also sets the message style for use within the WebSphere MQ Everyplace system itself.

Parameters:
messageType - The value to be set in the message type field; values must be taken from suitable constants in the com.ibm.mqe.MQe class, e.g. MQe.Msg_Style_Datagram.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     messageType = 8;
     mqeMsgObj.setMessageType(messageType);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setExpiry

public void setExpiry(int expiry)
               throws java.lang.Exception

Sets the expiry value - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the Expiry header field in the WebSphere MQ style message. It also sets the expiry time of the message for use within the WebSphere MQ Everyplace system itself.

Parameters:
expiry - An integer containing the value to be set in the expiry field. The value should be in tenths of a second, as is used in WebSphere MQ messages (not in milliseconds, which is used for WebSphere MQ Everyplace expiry time).
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     expiry = -1;
     mqeMsgObj.setExpiry(expiry);
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setFeedback

public void setFeedback(int feedback)
                 throws java.lang.Exception

Sets the feedback value - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the Feedback header field in the WebSphere MQ style message.

Parameters:
feedback - An integer containing the value to be set in the feedback field.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     feedback = 0;
     mqeMsgObj.setFeedback(feedback);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setEncoding

public void setEncoding(int encoding)
                 throws java.lang.Exception

Sets the encoding value - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the Encoding header field in the WebSphere MQ style message.

Parameters:
encoding - The value to be set in the encoding field; values must be taken from suitable constants in the com.ibm.mq.MQC class, e.g. MQC.MQENC_INTEGER_NORMAL.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     encoding = 0x0100 + 0x0010 + 0x0001;
     mqeMsgObj.setEncoding(encoding);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setCharacterSet

public void setCharacterSet(int characterSet)
                     throws java.lang.Exception

Sets the value of the coded character set identifier - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the CodedCharSetId header field in the WebSphere MQ style message.

Parameters:
characterSet - The value to be set in the coded character set identifier field; values must be taken from suitable constants in the com.ibm.mq.MQC class, e.g. MQC.MQCCSI_Q_MGR.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     characterSet = 256;
     mqeMsgObj.setCharacterSet(characterSet);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setFormat

public void setFormat(java.lang.String format)
               throws java.lang.Exception

Sets the format value - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the Format header field in the WebSphere MQ style message.

Parameters:
format - The value to be set in the format field; values must be taken from suitable constants in the com.ibm.mq.MQC class, e.g. MQC.MQFMT_NONE. The default value is MQC.MQFMT_NONE.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     format = " ";
     mqeMsgObj.setFormat(format);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setPriority

public void setPriority(int priority)
                 throws java.lang.Exception

Sets the priority value - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the Priority header field in the WebSphere MQ style message. It also sets the priority of the message for use within the WebSphere MQ Everyplace system itself.

Parameters:
priority - An integer containing the value to be set in the priority field. The value should be between 0 and 9 (inclusive).
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     priority = -1;
     mqeMsgObj.setPriority(priority);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setPersistence

public void setPersistence(int persistence)
                    throws java.lang.Exception

Sets the persistence value - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the Persistence header field in the WebSphere MQ style message.

Parameters:
persistence - The value to be set in the persistence field; values must be taken from suitable constants in the com.ibm.mq.MQC class, e.g. MQC.MQPER_PERSISTENT_AS_Q_DEF.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     persistence = 2;
     mqeMsgObj.setPersistence(persistence);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setMessageId

public void setMessageId(byte[] messageId)
                  throws java.lang.Exception

Sets the value of the message ID - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the MsgId header field in the WebSphere MQ style message.

Parameters:
messageId - A byte array containing the value to be set in the message ID field.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     messageId = new byte[3];
     mqeMsgObj.setMessageId(messageId);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setCorrelationId

public void setCorrelationId(byte[] correlationId)
                      throws java.lang.Exception

Sets the value of the correlation ID - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the CorrelId header field in the WebSphere MQ style message. It also sets the Correlation ID for use within the WebSphere MQ Everyplace system itself.

Parameters:
correlationId - A byte array containing the value to be set in the correlation ID field.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     correlationId = new byte[3];
     mqeMsgObj.setCorrelationId(correlationId);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setBackoutCount

public void setBackoutCount(int backoutCount)
                     throws java.lang.Exception

Sets the value of the backout count - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the BackoutCount header field in the WebSphere MQ style message.

Parameters:
backoutCount - An integer containing the value to be set in the backout count field.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     backoutCount = 4;
     mqeMsgObj.setBackoutCount(backoutCount);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setReplyToQueueName

public void setReplyToQueueName(java.lang.String replyToQueueName)
                         throws java.lang.Exception

Sets the reply-to queue name - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the ReplyToQ header field in the WebSphere MQ style message.

Parameters:
replyToQueueName - A String containing the value to be set in the reply-to queue name field.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     replyToQueueName = " ";
     mqeMsgObj.setReplyToQueueName(replyToQueueName);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setReplyToQueueManagerName

public void setReplyToQueueManagerName(java.lang.String replyToQMName)
                                throws java.lang.Exception

Sets the reply-to queue manager name - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the ReplyToQMgr header field in the WebSphere MQ style message.

Parameters:
replyToQMName - A String containing the value to be set in the reply-to queue manager name field.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     replyToQMName = " ";
     mqeMsgObj.setReplyToQueueManagerName(replyToQMName);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setUserId

public void setUserId(java.lang.String userId)
               throws java.lang.Exception

Sets the value of the user ID - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the UserIdentifier header field in the WebSphere MQ style message.

Parameters:
userId - A String containing the value to be set in the user ID field.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     userId = " ";
     mqeMsgObj.setUserId(userId);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setAccountingToken

public void setAccountingToken(byte[] accountingToken)
                        throws java.lang.Exception

Sets the value of the accounting token - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the AccountingToken header field in the WebSphere MQ style message.

Parameters:
accountingToken - A byte array containing the value to be set in the accounting token field.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     accountingToken = new byte[3];
     mqeMsgObj.setAccountingToken(accountingToken);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setApplicationIdData

public void setApplicationIdData(java.lang.String applicationIdData)
                          throws java.lang.Exception

Sets the application ID data - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the ApplIdData header field in the WebSphere MQ style message.

Parameters:
applicationIdData - A String containing the value to be set in the application ID data field.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
     String applIdData = " ";
 
     mqeMsgObj.setApplicationIdData(applIdData);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setPutApplicationType

public void setPutApplicationType(int putApplicationType)
                           throws java.lang.Exception

Sets the put application type - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the PutApplType header field in the WebSphere MQ style message.

Parameters:
putApplicationType - An integer containing the value to be set in the put application type field.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     putApplicationType = 0;
     mqeMsgObj.setPutApplicationType(putApplicationType);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setPutApplicationName

public void setPutApplicationName(java.lang.String putApplicationName)
                           throws java.lang.Exception

Sets the put application name - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the PutApplName header field in the WebSphere MQ style message.

Parameters:
putApplicationName - A String containing the value to be set in the put application name field.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     putApplicationName = "WebSphere MQ Everyplace";
     mqeMsgObj.setPutApplicationName(putApplicationName);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setApplicationOriginData

public void setApplicationOriginData(java.lang.String applicationOriginData)
                              throws java.lang.Exception

Sets the application origin data - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the ApplOriginData header field in the WebSphere MQ style message.

Parameters:
applicationOriginData - A String containing the value to be set in the application origin data field.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
     String applOriginData = " ";
 
     mqeMsgObj.setApplicationOriginData(applOriginData);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setGroupId

public void setGroupId(byte[] groupId)
                throws java.lang.Exception

Sets the value of the group ID - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the GroupId header field in the WebSphere MQ style message.

Parameters:
groupId - A byte array containing the value to be set in the group ID field.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     groupId = new byte[3];
     mqeMsgObj.setGroupId(groupId);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setPutDateTime

public void setPutDateTime(java.util.Calendar calendar)
                    throws java.lang.Exception

Sets the put date and time - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the PutDate and PutTime header fields in the WebSphere MQ style message. A Calendar object is used to specify the date and time, for consistency with the WebSphere MQ Classes for Java.

Parameters:
calendar - A Calendar object containing the value to be set in the put date and time fields.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     calendar = Calendar.getInstance();
     mqeMsgObj.setPutDateTime(calendar);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setMessageSequenceNumber

public void setMessageSequenceNumber(int seqNo)
                              throws java.lang.Exception

Sets the value of the message sequence number - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the MsgSeqNumber header field in the WebSphere MQ style message.

Parameters:
seqNo - An integer containing the value to be set in the message sequence number field.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     seqNo = 5;
     mqeMsgObj.setMessageSequenceNumber(seqNo);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setOffset

public void setOffset(int offset)
               throws java.lang.Exception

Sets the value of the offset - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the Offset header field in the WebSphere MQ style message.

Parameters:
offset - An integer containing the value to be set in the Offset field.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     offset = 28;
     mqeMsgObj.setOffset(offset);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setMessageFlags

public void setMessageFlags(int flags)
                     throws java.lang.Exception

Sets the value of the message flags - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the MsgFlags header field in the WebSphere MQ style message.

Parameters:
flags - An integer containing the value to be set in the message flags field.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     messageFlags = 9;
     mqeMsgObj.setMessageFlags(messageFlags);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setOriginalLength

public void setOriginalLength(int len)
                       throws java.lang.Exception

Sets the value of the original length - this corresponds to a field in the WMQ standard message header (MQMD).

This method sets the value of the OriginalLength header field in the WebSphere MQ style message.

Parameters:
len - An integer containing the value to be set in the original length field.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     len = 3026;
     mqeMsgObj.setOriginalLength(len);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

setData

public void setData(byte[] data)
             throws java.lang.Exception

Sets the message data - this corresponds to the payload of the WMQ message.

This method sets the message data in the WebSphere MQ style message.

Parameters:
data - A byte array containing the message data.
Returns:
void
Throws:
java.lang.Exception - If there is an error setting the value in the message object.
Example:
 try {
     MQeMQMsgObject mqeMsgObj = new MQeMQMsgObject();
 
     data = new byte[3021];
     mqeMsgObj.setData(data);
 
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 
 

equals

public boolean equals(byte[] b1,
                      byte[] b2)

Compares two byte arrays for equality.

This compares two byte arrays for equality. They are considered equal if they are the same length and each byte in one array is equal to the corresponding byte in the other array.

Parameters:
b1 - The first byte array for comparison.
b2 - The second byte array for comparison.
Returns:
true if the byte arrays are equal in length and content, otherwise false.
Example:
 byte[]  correlId = new byte[3];
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 MQeMQMsgObject mqMsgObj = (MQeMQMsgObject) msgObj;
 
 try {
     if (mqMsgObj.equals(mqMsgObj.getCorrelationId(), correlId)) {
         System.out.println("The two CorrelationIds are equal");
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
     return false;
 }
 return true;
 
 

dumpToString

public java.lang.String dumpToString()

Dumps the field values in the message object to a string.

This method dumps header fields from the WebSphere MQ style message with their corresponding field values to a string, together with the value of the data field. It is useful when debugging.

This method dumps only the fields that have been set to non-default values. The dumpAllToString() method dumps all the header fields to a string.

Returns:
A String containing the field names and values and the data value.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 
 try {
     if (msgObj instanceof MQeMQMsgObject) {
         System.out.println(((MQeMQMsgObject) msgObj).dumpToString());
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return msgObj.dumpToString();
 
 

dumpAllToString

public java.lang.String dumpAllToString()

Dumps all the field values from the message to a string.

This method dumps all the header fields from the WebSphere MQ style message with their corresponding field values to a string, together with the value of the data field. It is useful when debugging. This method dumps all the header fields to a string. The dumpToString() method dumps only the fields that have been set to non-default values.

Returns:
A String containing the field names and values and the data value.
Example:
 MQeMQMsgObject msgObj = new MQeMQMsgObject();
 
 try {
 
     if (msgObj instanceof MQeMQMsgObject) {
         System.out.println(((MQeMQMsgObject) msgObj).dumpAllToString());
     }
 } catch (Exception e) {
     System.err.println("Failure ! " + e.toString());
 }
 return msgObj.dumpAllToString();
 
 

Websphere MQ Everyplace