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| Modifier and Type | Field and Description |
|---|---|
int |
command
command identifier
|
int |
compCode
completion code
|
int |
control
control options
|
int |
msgSeqNumber
message sequence number
|
int |
parameterCount
count of parameter structures
|
int |
reason
reason code qualifying completion code
|
static int |
strucLength
structure length
|
int |
type
structure type
|
int |
version
version number of the structure format
|
| Constructor and Description |
|---|
MQCFH()
Constructs an MQCFH instance with default field values.
|
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.
|
MQCFH(MQMessage message)
Constructs an MQCFH instance populated from an MQMessage.
|
| 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 gets 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
|
void |
setType(int value)
sets the structure type
|
void |
setVersion(int value)
sets the structure version number
|
static int |
write(MQMessage message,
int command,
int parameterCount)
A convenience method for writing an MQCFH header structure with the specified values to a
message.
|
static int |
write(MQMessage 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.
|
initialize, size, toString, writecharacterSet, encoding, fields, getBytesValue, getCharValue, getCharValue, getIntValue, getJmqiEnv, getStringValue, getValue, headerType, read, read, read, setBytesValue, setCharValue, setCharValue, setIntValue, setStringValue, setValue, store, store, type, validate, writepublic int type
public static final int strucLength
public int version
public int command
public int msgSeqNumber
public int control
public int compCode
public int reason
public int parameterCount
public MQCFH()
public MQCFH(MQMessage message) throws MQException, java.io.IOException
message - the message to readMQException - 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 MQException,
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 messageMQException - 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(MQMessage message, int command, int parameterCount) 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 or MQCFSL) to
follow the PCF headerjava.io.IOExceptionpublic static int write(MQMessage 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 void setType(int value)
value - the structure typepublic int getStrucLength()
public int getVersion()
public void setVersion(int value)
value - the structure version numberpublic int getCommand()
public void setCommand(int value)
value - public int getMsgSeqNumber()
public void setMsgSeqNumber(int value)
value - gets 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