public class PCFMessage extends PCFHeader implements PCFContent
PCFMessageAgentMQHeader.Field| Constructor and Description |
|---|
PCFMessage(java.io.DataInput message)
Initializes a PCFMessage from the contents of an MQMessage.
|
PCFMessage(int command)
Initializes a PCFMessage as a PCF request with the specified MQCFH command identifier.
|
PCFMessage(int type,
int command,
int msgSeqNumber,
boolean last)
Initializes a PCFMessage with the specified MQCFH type, command identifier, sequence number and
control indicator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFilterParameter(int parameter,
int operator,
byte[] value)
Adds a bytes string filter parameter to the group.
|
void |
addFilterParameter(int parameter,
int operator,
int value)
Adds an integer filter parameter to the group.
|
void |
addFilterParameter(int parameter,
int operator,
java.lang.String value)
Adds a string filter parameter to the group.
|
void |
addParameter(int parameter,
byte[] value)
Adds a byte array parameter to the group.
|
void |
addParameter(int parameter,
int value)
Adds an integer parameter to the group.
|
void |
addParameter(int parameter,
int[] values)
Adds an integer list parameter to the group.
|
void |
addParameter(int parameter,
long value)
Adds a 64-bit integer parameter to the group.
|
void |
addParameter(int parameter,
long[] values)
Adds a 64-bit integer list parameter to the group.
|
void |
addParameter(int parameter,
java.lang.String value)
Adds a string parameter to the group.
|
void |
addParameter(int parameter,
java.lang.String[] values)
Adds a string list parameter to the group.
|
void |
addParameter(PCFParameter parameter)
Adds a PCFParameter to the PCFMessage.
|
boolean |
equals(java.lang.Object obj)
Returns true when invoked with another PCFMessage instance with matching header and equivalent
parameters in the same order.
|
byte[] |
getBytesParameterValue(int parameter)
Returns the value of the specified byte array parameter (MQCFBS).
|
int |
getCommand()
Returns the PCF command identifier
|
int |
getCompCode()
Returns the completion code in the MQCFH.
|
int |
getControl()
Returns the PCF header control indicator.
|
long |
getInt64ParameterValue(int parameter)
Returns the value of the specified integer parameter (MQCFIN64) as an integer.
|
long[] |
getIntList64ParameterValue(int parameter)
Returns the value of the specified integer list parameter (MQCFIL64) as an array of integers.
|
int[] |
getIntListParameterValue(int parameter)
Returns the value of the specified integer list parameter (MQCFIL) as an array of integers.
|
int |
getIntParameterValue(int parameter)
Returns the value of the specified integer parameter (MQCFIN) as an integer.
|
int |
getMsgSeqNumber()
Returns the PCF message sequence number
|
PCFParameter |
getParameter(int parameter)
Returns the PCFParameter structure for the specified parameter, or null if the parameter is not
found.
|
int |
getParameterCount()
Returns the number of parameter structures in the PCF message.
|
java.util.Enumeration |
getParameters()
Returns an enumeration of the parameters in the group.
|
java.lang.Object |
getParameterValue(int parameter)
Returns the value of the specified parameter, or null if the parameter is not found.
|
int |
getReason()
Returns the reason code in the MQCFH.
|
java.lang.String[] |
getStringListParameterValue(int parameter)
Returns the value of the specified string list parameter (MQCFSL) as an array of strings.
|
java.lang.String |
getStringParameterValue(int parameter)
Returns the value of the specified string parameter (MQCFST) as a string.
|
int |
getType()
Returns the PCF type identifier
|
void |
initialize(int command)
Initializes a PCFMessage for re-use with the specified command identifier and no parameters.
|
void |
initialize(int type,
int command,
int msgSeqNumber,
boolean last)
Initializes a PCFMessage for re-use with the specified type, command identifier, sequence
number, control indicator and no parameters.
|
void |
setHeader(PCFHeader header)
Set the PCFHeader
|
int |
size()
Returns the size of this PCFMessage in bytes.
|
java.lang.String |
toString()
Returns the string representation of the class instance
|
int |
write(java.io.DataOutput message)
Writes the content of this PCFMessage to, e.g., an MQMessage.
|
characterSet, encoding, fields, getBytesValue, getCharValue, getCharValue, getIntValue, getJmqiEnv, getStringValue, getValue, headerType, read, read, read, setBytesValue, setCharValue, setCharValue, setIntValue, setStringValue, setValue, store, store, type, validate, writepublic PCFMessage(int command)
command - the PCF command identifierpublic PCFMessage(int type,
int command,
int msgSeqNumber,
boolean last)
type - the PCF message typecommand - the PCF command identifiermsgSeqNumber - the sequence number of the messagelast - if set, indicates this message is the last in a sequencepublic PCFMessage(java.io.DataInput message)
throws MQDataException,
java.io.IOException
message - the message to read fromMQDataException - if the message contents do not yield a valid PCFMessagejava.io.IOException - if there is a problem reading the messagepublic void initialize(int command)
command - the PCF command identifierpublic void initialize(int type,
int command,
int msgSeqNumber,
boolean last)
type - the PCF message typecommand - the PCF command identifiermsgSeqNumber - the sequence number of the messagelast - if set, indicates this message is the last in a sequencepublic void addParameter(PCFParameter parameter)
addParameter in interface PCFContentparameter - the parameter structure to add (MQCFIN, MQCFIL, MQCFST and so on)PCFContent.addParameter(PCFParameter)public void addParameter(int parameter,
int value)
PCFContentaddParameter in interface PCFContentparameter - the integer parameter identifiervalue - the integer valuePCFContent.addParameter(int, int)public void addParameter(int parameter,
int[] values)
PCFContentaddParameter in interface PCFContentparameter - the integer list parameter identifiervalues - the array of integer valuesPCFContent.addParameter(int, int[])public void addParameter(int parameter,
long value)
PCFContentaddParameter in interface PCFContentparameter - the integer parameter identifiervalue - the integer valuePCFContent.addParameter(int, long)public void addParameter(int parameter,
long[] values)
PCFContentaddParameter in interface PCFContentparameter - the integer list parameter identifiervalues - the array of integer valuesPCFContent.addParameter(int, long[])public void addParameter(int parameter,
java.lang.String value)
PCFContentaddParameter in interface PCFContentparameter - the string parameter identifiervalue - the string valuePCFContent.addParameter(int, String)public void addParameter(int parameter,
java.lang.String[] values)
PCFContentaddParameter in interface PCFContentparameter - the string list parameter identifiervalues - the array of string valuesPCFContent.addParameter(int, String[])public void addParameter(int parameter,
byte[] value)
PCFContentaddParameter in interface PCFContentparameter - the string list parameter identifiervalue - the array of string valuesPCFContent.addParameter(int, byte[])public void addFilterParameter(int parameter,
int operator,
int value)
PCFContentaddFilterParameter in interface PCFContentparameter - the filter parameter identifieroperator - one of the MQCFOP_* filter operator constantsvalue - the filter valuePCFContent.addFilterParameter(int, int, int)public void addFilterParameter(int parameter,
int operator,
java.lang.String value)
PCFContentaddFilterParameter in interface PCFContentparameter - the filter parameter identifieroperator - one of the MQCFOP_* filter operator constantsvalue - the filter valuePCFContent.addFilterParameter(int, int, String)public void addFilterParameter(int parameter,
int operator,
byte[] value)
PCFContentaddFilterParameter in interface PCFContentparameter - the filter parameter identifieroperator - one of the MQCFOP_* filter operator constantsvalue - the filter valuePCFContent.addFilterParameter(int, int, byte[])public int getType()
public int getCommand()
public int getMsgSeqNumber()
public int getControl()
public int getCompCode()
public int getReason()
public int getParameterCount()
getParameterCount in interface PCFContentPCFContent.getParameterCount()public java.util.Enumeration getParameters()
PCFContentgetParameters in interface PCFContentPCFContent.getParameters()public void setHeader(PCFHeader header)
header - The value to setpublic PCFParameter getParameter(int parameter)
PCFContentgetParameter in interface PCFContentPCFContent.getParameter(int)public java.lang.Object getParameterValue(int parameter)
PCFContentgetParameterValue in interface PCFContentPCFContent.getParameterValue(int)public int getIntParameterValue(int parameter)
throws PCFException
PCFContentgetIntParameterValue in interface PCFContentparameter - the integer parameter identifierPCFException - if the specified parameter does not exist in the message (the reason
code given is MQRCCF_CFIN_PARM_ID_ERROR)PCFContent.getIntParameterValue(int)public int[] getIntListParameterValue(int parameter)
throws PCFException
PCFContentgetIntListParameterValue in interface PCFContentparameter - the integer list parameter identifierPCFException - if the specified parameter does not exist in the group (the reason code
given is MQRCCF_CFIL_PARM_ID_ERROR)PCFContent.getIntListParameterValue(int)public long getInt64ParameterValue(int parameter)
throws PCFException
PCFContentgetInt64ParameterValue in interface PCFContentparameter - the integer parameter identifierPCFException - if the specified parameter does not exist in the message (the reason
code given is MQRCCF_CFIN_PARM_ID_ERROR)PCFContent.getInt64ParameterValue(int)public long[] getIntList64ParameterValue(int parameter)
throws PCFException
PCFContentgetIntList64ParameterValue in interface PCFContentparameter - the integer list parameter identifierPCFException - if the specified parameter does not exist in the group (the reason code
given is MQRCCF_CFIL_PARM_ID_ERROR)PCFContent.getIntList64ParameterValue(int)public java.lang.String getStringParameterValue(int parameter)
throws PCFException
PCFContentgetStringParameterValue in interface PCFContentparameter - the string parameter identifierPCFException - if the specified parameter does not exist in the group (the reason code
given is MQRCCF_CFST_PARM_ID_ERROR)PCFContent.getStringParameterValue(int)public java.lang.String[] getStringListParameterValue(int parameter)
throws PCFException
PCFContentgetStringListParameterValue in interface PCFContentparameter - the string list parameter identifierPCFException - if the specified parameter does not exist in the group (the reason code
given is MQRCCF_CFSL_PARM_ID_ERROR; no more specific error code is defined)PCFContent.getStringListParameterValue(int)public byte[] getBytesParameterValue(int parameter)
throws PCFException
PCFContentgetBytesParameterValue in interface PCFContentparameter - the byte array parameter identifierPCFException - if the specified parameter does not exist in the group (the reason code
given is MQRCCF_CFBS_PARM_ID_ERROR)PCFContent.getBytesParameterValue(int)public int write(java.io.DataOutput message)
throws java.io.IOException
public int size()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The object to compare againstpublic java.lang.String toString()
toString in class com.ibm.mq.headers.internal.Header