public class MQCFH extends PCFHeader
struct tagMQCFH {
MQLONG Type; // Structure type
MQLONG StrucLength; // Structure length
MQLONG Version; // Structure version number
MQLONG Command; // Command identifier
MQLONG MsgSeqNumber; // Message sequence number
MQLONG Control; // Control options
MQLONG CompCode; // Completion code
MQLONG Reason; // Reason code qualifying completion code
MQLONG ParameterCount; // Count of parameter structures
};
MQHeader.Field| Constructor and Description |
|---|
MQCFH()
Constructs an MQCFH instance with default field values.
|
MQCFH(java.io.DataInput message)
Constructs an MQCFH instance populated from an MQMessage.
|
MQCFH(java.io.DataInput message,
int encoding,
int characterSet)
Constructs an MQCFH instance populated from a DataInput source.
|
MQCFH(int command,
int parameterCount)
Initializes an MQCFH instance with the specified command and parameter count.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Returns true when invoked with another MQCFH instance with the same type, parameter, operator
and value.
|
int |
getCommand()
gets the command identifier
|
int |
getCompCode()
gets the completion code
|
int |
getControl()
gets the control options
|
int |
getMsgSeqNumber()
gets the message sequence number
|
int |
getParameterCount()
gets the count of parameter structures
|
int |
getReason()
gets the reason code qualifying completion code
|
int |
getStrucLength()
Get the length of the structure.
|
int |
getType()
gets the structure type
|
int |
getVersion()
gets the structure version number
|
void |
setCommand(int value)
sets the command identifier
|
void |
setCompCode(int value)
sets the completion code
|
void |
setControl(int value)
sets the control options
|
void |
setMsgSeqNumber(int value)
sets the message sequence number
|
void |
setParameterCount(int value)
sets the count of parameter structures
|
void |
setReason(int value)
sets the reason code qualifying completion code
|
static int |
write(java.io.DataOutput message,
int command,
int parameterCount,
int type,
int version)
A convenience method for writing an MQCFH header structure with the specified values to a
message.
|
static int |
write(java.lang.Object message,
int command,
int parameterCount)
A convenience method for writing an MQCFH header structure with the specified values to a
message.
|
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, writepublic MQCFH()
public MQCFH(java.io.DataInput message)
throws MQDataException,
java.io.IOException
message - the message to readMQDataException - if the message content does not yield a valid MQCFH stucturejava.io.IOException - if there is a problem reading the message contentpublic MQCFH(java.io.DataInput message,
int encoding,
int characterSet)
throws MQDataException,
java.io.IOException
message - the MQMessage or other DataInput source to readencoding - the initial numeric encoding of the data in the messagecharacterSet - the initial CCSID of the data in the messageMQDataException - if the message content does not yield a valid MQCFH stucturejava.io.IOException - if there is a problem reading the message contentpublic MQCFH(int command,
int parameterCount)
command - parameterCount - public static int write(java.lang.Object message,
int command,
int parameterCount)
throws java.io.IOException
message - the message to write to (Should be a DataOutput object, but inheritance issues
stop that)command - the PCF command (MQCMD_* constants are defined in the CMQCFC class)parameterCount - the number of parameter structures (MQCFIN, MQCFIL, MQCFST or MQCFSL) to
follow the PCF headerjava.io.IOExceptionpublic static int write(java.io.DataOutput message,
int command,
int parameterCount,
int type,
int version)
throws java.io.IOException
message - the message to write tocommand - the PCF command (MQCMD_* constants are defined in the CMQCFC class)parameterCount - the number of parameter structures (MQCFIN, MQCFIL, MQCFST etc.) to
follow the PCF headertype - the PCF message typeversion - message versionjava.io.IOExceptionpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - public int getType()
public int getStrucLength()
public int getVersion()
public int getCommand()
public void setCommand(int value)
value - the command identifierpublic int getMsgSeqNumber()
public void setMsgSeqNumber(int value)
value - the message sequence numberpublic int getControl()
public void setControl(int value)
value - the control optionspublic int getCompCode()
public void setCompCode(int value)
value - the completion codepublic int getReason()
public void setReason(int value)
value - the reason code qualifying completion codepublic int getParameterCount()
public void setParameterCount(int value)
value - the count of parameter structures