com.ibm.mq.headers.pcf

Class MQCFH

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

  1. public class MQCFH
  2. extends PCFHeader
MQCFH (PCF header) header class.
        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
        };
 

Nested Class Summary

Nested classes/interfaces inherited from interface com.ibm.mq.headers.MQHeader
MQHeader.Field

Field Summary

Modifier and Type Field and Description
  1. static
  2. int
SIZE
Fields inherited from class com.ibm.mq.headers.internal.Header
DEFAULT_CCSID, DEFAULT_ENCODING
Fields inherited from class com.ibm.mq.jmqi.JmqiObject
COMP_JM, COMP_JN, COMP_JO

Constructor Summary

Constructor and Description
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.

Method Summary

Modifier and Type Method and Description
  1. boolean
equals(java.lang.Object obj)
Returns true when invoked with another MQCFH instance with the same type, parameter, operator and value.
  1. int
getCommand()
gets the command identifier
  1. int
getCompCode()
gets the completion code
  1. int
getControl()
gets the control options
  1. int
getMsgSeqNumber()
gets the message sequence number
  1. int
getParameterCount()
gets the count of parameter structures
  1. int
getReason()
gets the reason code qualifying completion code
  1. int
getStrucLength()
Get the length of the structure.
  1. int
getType()
gets the structure type
  1. int
getVersion()
gets the structure version number
  1. void
setCommand(int value)
sets the command identifier
  1. void
setCompCode(int value)
sets the completion code
  1. void
setControl(int value)
sets the control options
  1. void
setMsgSeqNumber(int value)
sets the message sequence number
  1. void
setParameterCount(int value)
sets the count of parameter structures
  1. void
setReason(int value)
sets the reason code qualifying completion code
  1. static
  2. 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.
  1. static
  2. 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.
Methods inherited from class com.ibm.mq.headers.internal.Header
characterSet, encoding, fields, getBytesValue, getCharValue, getCharValue, getIntValue, getJmqiEnv, getStringValue, getValue, headerType, read, read, read, setBytesValue, setCharValue, setCharValue, setIntValue, setStringValue, setValue, size, store, store, toString, type, validate, write, write
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

SIZE

  1. public static final int SIZE
See Also:

Constructor Detail

MQCFH

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

MQCFH

  1. public MQCFH(java.io.DataInput message)
  2. throws MQDataException
  3. java.io.IOException
Constructs an MQCFH instance populated from an MQMessage.
Parameters:
message - the message to read
Throws:
MQDataException - if the message content does not yield a valid MQCFH stucture
java.io.IOException - if there is a problem reading the message content

MQCFH

  1. public MQCFH(java.io.DataInput message,
  2. int encoding,
  3. int characterSet)
  4. throws MQDataException
  5. java.io.IOException
Constructs an MQCFH instance populated from a DataInput source.
Parameters:
message - the MQMessage or other DataInput source to read
encoding - the initial numeric encoding of the data in the message
characterSet - the initial CCSID of the data in the message
Throws:
MQDataException - if the message content does not yield a valid MQCFH stucture
java.io.IOException - if there is a problem reading the message content

MQCFH

  1. public MQCFH(int command,
  2. int parameterCount)
Initializes an MQCFH instance with the specified command and parameter count. Other values are set as for the no-args constructor.

Method Detail

write

  1. public static int write(java.lang.Object message,
  2. int command,
  3. int parameterCount)
  4. throws java.io.IOException
A convenience method for writing an MQCFH header structure with the specified values to a message.
Parameters:
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 header
Returns:
the number of bytes written
Throws:
java.io.IOException

write

  1. public static int write(java.io.DataOutput message,
  2. int command,
  3. int parameterCount,
  4. int type,
  5. int version)
  6. throws java.io.IOException
A convenience method for writing an MQCFH header structure with the specified values to a message.
Parameters:
message - the message to write to
command - 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 header
type - the PCF message type
version - message version
Returns:
the number of bytes written
Throws:
java.io.IOException

equals

  1. public boolean equals(java.lang.Object obj)
Returns true when invoked with another MQCFH instance with the same type, parameter, operator and value.
Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:
true of the object equals this one

getType

  1. public int getType()
gets the structure type
Specified by:
getType in class PCFHeader
Returns:
the structure type

getStrucLength

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

getVersion

  1. public int getVersion()
gets the structure version number
Returns:
the structure version number

getCommand

  1. public int getCommand()
gets the command identifier
Returns:
the command identifier

setCommand

  1. public void setCommand(int value)
sets the command identifier
Parameters:
value - the command identifier

getMsgSeqNumber

  1. public int getMsgSeqNumber()
gets the message sequence number
Returns:
the message sequence number

setMsgSeqNumber

  1. public void setMsgSeqNumber(int value)
sets the message sequence number
Parameters:
value - the message sequence number

getControl

  1. public int getControl()
gets the control options
Returns:
the control options

setControl

  1. public void setControl(int value)
sets the control options
Parameters:
value - the control options

getCompCode

  1. public int getCompCode()
gets the completion code
Returns:
the completion code

setCompCode

  1. public void setCompCode(int value)
sets the completion code
Parameters:
value - the completion code

getReason

  1. public int getReason()
gets the reason code qualifying completion code
Returns:
the reason code qualifying completion code

setReason

  1. public void setReason(int value)
sets the reason code qualifying completion code
Parameters:
value - the reason code qualifying completion code

getParameterCount

  1. public int getParameterCount()
gets the count of parameter structures
Returns:
the count of parameter structures

setParameterCount

  1. public void setParameterCount(int value)
sets the count of parameter structures
Parameters:
value - the count of parameter structures