Package com.ibm.mq.headers.pcf
Class MQEPH
java.lang.Object
com.ibm.mq.jmqi.JmqiObject
com.ibm.mq.headers.internal.Header
com.ibm.mq.headers.pcf.MQEPH
- All Implemented Interfaces:
MQChainable,MQData,MQHeader,PCFContent
MQEPH (Embedded PCF) header class.
struct tagMQEPH {
MQCHAR4 StrucId; // Structure identifier
MQLONG Version; // Structure version number
MQLONG StrucLength; // Total length of MQEPH including MQCFHameter structures that follow
MQLONG Encoding; // Numeric encoding of data that follows last PCF parameter structure
MQLONG CodedCharSetId; // Character set identifier of data that follows last PCF parameter structure
MQCHAR8 Format; // Format name of data that follows last PCF parameter structure
MQLONG Flags; // Flags
MQCFH PCFHeader; // Programmable Command Format Header
}
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.ibm.mq.headers.MQHeader
MQHeader.Field -
Field Summary
FieldsFields inherited from class com.ibm.mq.headers.internal.Header
DEFAULT_CCSID, DEFAULT_ENCODING, delegateFields inherited from class com.ibm.mq.jmqi.JmqiObject
COMP_JM, COMP_JN, COMP_JO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFilterParameter(int parameter, int operator, byte[] value) Adds a bytes string filter parameter to the group.voidaddFilterParameter(int parameter, int operator, int value) Adds an integer filter parameter to the group.voidaddFilterParameter(int parameter, int operator, String value) Adds a string filter parameter to the group.voidaddParameter(int parameter, byte[] value) Adds a byte array parameter to the group.voidaddParameter(int parameter, int value) Adds an integer parameter to the group.voidaddParameter(int parameter, int[] values) Adds an integer list parameter to the group.voidaddParameter(int parameter, long value) Adds a 64-bit integer parameter to the group.voidaddParameter(int parameter, long[] values) Adds a 64-bit integer list parameter to the group.voidaddParameter(int parameter, String value) Adds a string parameter to the group.voidaddParameter(int parameter, String[] values) Adds a string list parameter to the group.voidaddParameter(PCFParameter parameter) Adds a PCFParameter to the group.booleanReturns true when invoked with another MQCFGR instance with the same parameter, parameterCount, and parameter children.format()byte[]getBytesParameterValue(int parameter) Returns the value of the specified byte array parameter (MQCFBS).intGet the Character set identifier of data that follows.intGet the numeric encoding of the data that follows.intgetFlags()get the Flagsget the Format name of data that follows last PCF parameter structurelonggetInt64ParameterValue(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.intgetIntParameterValue(int parameter) Returns the value of the specified integer parameter (MQCFIN) as an integer.getParameter(int parameter) Returns the PCFParameter structure for the specified parameter, or null if the parameter is not found.intReturns the number of parameter structures in the group.Returns an enumeration of the parameters in the group.getParameterValue(int parameter) Returns the value of the specified parameter, or null if the parameter is not found.get the PCF headerString[]getStringListParameterValue(int parameter) Returns the value of the specified string list parameter (MQCFSL) as an array of strings.getStringParameterValue(int parameter) Returns the value of the specified string parameter (MQCFST) as a string.Get the structure identifier; the value will be MQEPH_STRUC_IDintGet the Structure version numberintget the CCSID of the next messagevoidnextCharacterSet(int value) set the CCSID of the next messageintget the encoding of the next messagevoidnextEncoding(int value) set the encoding of the next messageget the format of the next messagevoidnextFormat(String value) set the format of the next messageintPopulates this MQEPH object with data from the specified messagevoidsetCodedCharSetId(int value) Set the Character set identifier of data that follows.voidsetEncoding(int value) Set the numeric encoding of the data that follows.voidsetFlags(int value) set the Flagsvoidset the Format name of data that follows last PCF parameter structurevoidsetParameterCount(int value) Sets the MQEPH parameter count.voidsetPCFHeader(MQCFH value) set the PCF headertoString()return a string representation of this headerintwrite(DataOutput message, int encoding, int characterSet) writes this header to the specified messageMethods inherited from class com.ibm.mq.headers.internal.Header
characterSet, encoding, fields, getBytesValue, getCharValue, getCharValue, getIntValue, getJmqiEnv, getStringValue, getValue, headerType, read, read, setBytesValue, setCharValue, setCharValue, setIntValue, setStringValue, setValue, size, store, store, type, validate, writeMethods inherited from class com.ibm.mq.jmqi.JmqiObject
getJmqiEnvironment
-
Field Details
-
SIZE
public static final int SIZEsize of an MQEPH header in bytes- See Also:
-
-
Constructor Details
-
MQEPH
public MQEPH()Constructs an MQEPH instance with default field values. -
MQEPH
Constructs an MQEPH instance populated from an DataInput.- Parameters:
message- the message to read- Throws:
MQDataException- if the message content does not yield a valid MQEPH stuctureIOException- if there is a problem reading the message content
-
MQEPH
Constructs an MQEPH instance populated from a DataInput source.- Parameters:
message- the DataInput or other DataInput source to readencoding- the initial numeric encoding of the data in the messagecharacterSet- the initial CCSID of the data in the message- Throws:
MQDataException- if the message content does not yield a valid MQEPH stuctureIOException- if there is a problem reading the message content
-
-
Method Details
-
read
public int read(DataInput message, int encoding, int characterSet) throws MQDataException, IOException Populates this MQEPH object with data from the specified message- Specified by:
readin interfaceMQData- Overrides:
readin classcom.ibm.mq.headers.internal.Header- Parameters:
message- the messageencoding- the encoding (big/little-endian)characterSet- the CCSID- Returns:
- the number of bytes read
- Throws:
MQDataException- if a MQ PCF error occursIOException- if there is a problem reading the message content
-
write
writes this header to the specified message- Specified by:
writein interfaceMQData- Overrides:
writein classcom.ibm.mq.headers.internal.Header- Parameters:
message- the messageencoding- the encoding (big/little-endian)characterSet- the CCSID- Returns:
- the number of bytes written
- Throws:
IOException- if there is a problem writing the message content
-
getStrucId
Get the structure identifier; the value will be MQEPH_STRUC_ID- Returns:
- the structure identifier
-
getVersion
public int getVersion()Get the Structure version number- Returns:
- the Structure version number
-
getEncoding
public int getEncoding()Get the numeric encoding of the data that follows.- Returns:
- the numeric encoding. A combination of MQENC_* values.
-
setEncoding
public void setEncoding(int value) Set the numeric encoding of the data that follows.- Parameters:
value- the numeric encoding. A combination of MQENC_* values.
-
getCodedCharSetId
public int getCodedCharSetId()Get the Character set identifier of data that follows.- Returns:
- the Character set identifier.
-
setCodedCharSetId
public void setCodedCharSetId(int value) Set the Character set identifier of data that follows.- Parameters:
value- the Character set identifier.
-
getFormat
get the Format name of data that follows last PCF parameter structure- Returns:
- the Format name of data that follows last PCF parameter structure
-
setFormat
set the Format name of data that follows last PCF parameter structure- Parameters:
value- the Format name of data that follows last PCF parameter structure
-
getFlags
public int getFlags()get the Flags- Returns:
- the Flags
-
setFlags
public void setFlags(int value) set the Flags- Parameters:
value- the Flags
-
getPCFHeader
get the PCF header- Returns:
- the header
-
setPCFHeader
set the PCF header- Parameters:
value- the header
-
nextEncoding
public int nextEncoding()get the encoding of the next message- Specified by:
nextEncodingin interfaceMQChainable- Returns:
- the encoding
-
nextEncoding
public void nextEncoding(int value) set the encoding of the next message- Specified by:
nextEncodingin interfaceMQChainable- Parameters:
value- the encoding
-
nextCharacterSet
public int nextCharacterSet()get the CCSID of the next message- Specified by:
nextCharacterSetin interfaceMQChainable- Returns:
- the CCSID
-
nextCharacterSet
public void nextCharacterSet(int value) set the CCSID of the next message- Specified by:
nextCharacterSetin interfaceMQChainable- Parameters:
value- the CCSID
-
nextFormat
get the format of the next message- Specified by:
nextFormatin interfaceMQChainable- Returns:
- the format
-
nextFormat
set the format of the next message- Specified by:
nextFormatin interfaceMQChainable- Parameters:
value- the format
-
format
- Specified by:
formatin interfaceMQChainable- Returns:
- the format associated with this header object or message content.
- See Also:
-
addParameter
Description copied from interface:PCFContentAdds a PCFParameter to the group.- Specified by:
addParameterin interfacePCFContent- Parameters:
parameter- the parameter structure to add (MQCFIN, MQCFIL, MQCFST and so on)- See Also:
-
addParameter
public void addParameter(int parameter, int value) Description copied from interface:PCFContentAdds an integer parameter to the group.- Specified by:
addParameterin interfacePCFContent- Parameters:
parameter- the integer parameter identifiervalue- the integer value- See Also:
-
addParameter
public void addParameter(int parameter, int[] values) Description copied from interface:PCFContentAdds an integer list parameter to the group.- Specified by:
addParameterin interfacePCFContent- Parameters:
parameter- the integer list parameter identifiervalues- the array of integer values- See Also:
-
addParameter
public void addParameter(int parameter, long value) Description copied from interface:PCFContentAdds a 64-bit integer parameter to the group.- Specified by:
addParameterin interfacePCFContent- Parameters:
parameter- the integer parameter identifiervalue- the integer value- See Also:
-
addParameter
public void addParameter(int parameter, long[] values) Description copied from interface:PCFContentAdds a 64-bit integer list parameter to the group.- Specified by:
addParameterin interfacePCFContent- Parameters:
parameter- the integer list parameter identifiervalues- the array of integer values- See Also:
-
addParameter
Description copied from interface:PCFContentAdds a string parameter to the group.- Specified by:
addParameterin interfacePCFContent- Parameters:
parameter- the string parameter identifiervalue- the string value- See Also:
-
addParameter
Description copied from interface:PCFContentAdds a string list parameter to the group.- Specified by:
addParameterin interfacePCFContent- Parameters:
parameter- the string list parameter identifiervalues- the array of string values- See Also:
-
addParameter
public void addParameter(int parameter, byte[] value) Description copied from interface:PCFContentAdds a byte array parameter to the group.- Specified by:
addParameterin interfacePCFContent- Parameters:
parameter- the string list parameter identifiervalue- the array of string values- See Also:
-
addFilterParameter
public void addFilterParameter(int parameter, int operator, int value) Description copied from interface:PCFContentAdds an integer filter parameter to the group.- Specified by:
addFilterParameterin interfacePCFContent- Parameters:
parameter- the filter parameter identifieroperator- one of the MQCFOP_* filter operator constantsvalue- the filter value- See Also:
-
addFilterParameter
Description copied from interface:PCFContentAdds a string filter parameter to the group.- Specified by:
addFilterParameterin interfacePCFContent- Parameters:
parameter- the filter parameter identifieroperator- one of the MQCFOP_* filter operator constantsvalue- the filter value- See Also:
-
addFilterParameter
public void addFilterParameter(int parameter, int operator, byte[] value) Description copied from interface:PCFContentAdds a bytes string filter parameter to the group.- Specified by:
addFilterParameterin interfacePCFContent- Parameters:
parameter- the filter parameter identifieroperator- one of the MQCFOP_* filter operator constantsvalue- the filter value- See Also:
-
getParameterCount
public int getParameterCount()Description copied from interface:PCFContentReturns the number of parameter structures in the group.- Specified by:
getParameterCountin interfacePCFContent- Returns:
- the value of the parameterCount field from the MQCFH
- See Also:
-
setParameterCount
public void setParameterCount(int value) Sets the MQEPH parameter count. This has the effect of trimming the size of the child PCFParameter collection to the number specified. If the argument is zero, the effect is to clear all child parameters. Specifying a value larger than the current parameter count has no effect. Negative values are ignored.- Parameters:
value- the integer value as an Integer object
-
getParameters
Description copied from interface:PCFContentReturns an enumeration of the parameters in the group. The elements of the Enumeration returned are individual PCFParameter instances (instances of MQCFIN, MQCFIL, MQCFST or MQCFSL etc.).- Specified by:
getParametersin interfacePCFContent- Returns:
- the PCF message parameter structures
- See Also:
-
getParameter
Description copied from interface:PCFContentReturns the PCFParameter structure for the specified parameter, or null if the parameter is not found.- Specified by:
getParameterin interfacePCFContent- Parameters:
parameter- identifier whose details to be returned.- Returns:
- the specified parameter object
- See Also:
-
getParameterValue
Description copied from interface:PCFContentReturns the value of the specified parameter, or null if the parameter is not found. The object returned is a single Integer, a single String, an array of integers or array of Strings depending on the type of PCFParameter. The caller can infer the expected return type from the supplied parameter identifier.- Specified by:
getParameterValuein interfacePCFContent- Parameters:
parameter- identifier whose details to be returned- Returns:
- the specified parameter value
- See Also:
-
getIntParameterValue
Description copied from interface:PCFContentReturns the value of the specified integer parameter (MQCFIN) as an integer.- Specified by:
getIntParameterValuein interfacePCFContent- Parameters:
parameter- the integer parameter identifier- Returns:
- the integer parameter value
- Throws:
PCFException- if the specified parameter does not exist in the message (the reason code given is MQRCCF_CFIN_PARM_ID_ERROR)- See Also:
-
getIntListParameterValue
Description copied from interface:PCFContentReturns the value of the specified integer list parameter (MQCFIL) as an array of integers.- Specified by:
getIntListParameterValuein interfacePCFContent- Parameters:
parameter- the integer list parameter identifier- Returns:
- the integer list parameter values
- Throws:
PCFException- if the specified parameter does not exist in the group (the reason code given is MQRCCF_CFIL_PARM_ID_ERROR)- See Also:
-
getInt64ParameterValue
Description copied from interface:PCFContentReturns the value of the specified integer parameter (MQCFIN64) as an integer.- Specified by:
getInt64ParameterValuein interfacePCFContent- Parameters:
parameter- the integer parameter identifier- Returns:
- the integer parameter value
- Throws:
PCFException- if the specified parameter does not exist in the message (the reason code given is MQRCCF_CFIN_PARM_ID_ERROR)- See Also:
-
getIntList64ParameterValue
Description copied from interface:PCFContentReturns the value of the specified integer list parameter (MQCFIL64) as an array of integers.- Specified by:
getIntList64ParameterValuein interfacePCFContent- Parameters:
parameter- the integer list parameter identifier- Returns:
- the integer list parameter values
- Throws:
PCFException- if the specified parameter does not exist in the group (the reason code given is MQRCCF_CFIL_PARM_ID_ERROR)- See Also:
-
getStringParameterValue
Description copied from interface:PCFContentReturns the value of the specified string parameter (MQCFST) as a string.- Specified by:
getStringParameterValuein interfacePCFContent- Parameters:
parameter- the string parameter identifier- Returns:
- the string parameter value
- Throws:
PCFException- if the specified parameter does not exist in the group (the reason code given is MQRCCF_CFST_PARM_ID_ERROR)- See Also:
-
getStringListParameterValue
Description copied from interface:PCFContentReturns the value of the specified string list parameter (MQCFSL) as an array of strings.- Specified by:
getStringListParameterValuein interfacePCFContent- Parameters:
parameter- the string list parameter identifier- Returns:
- the string list parameter values
- Throws:
PCFException- 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)- See Also:
-
getBytesParameterValue
Description copied from interface:PCFContentReturns the value of the specified byte array parameter (MQCFBS).- Specified by:
getBytesParameterValuein interfacePCFContent- Parameters:
parameter- the byte array parameter identifier- Returns:
- the byte array parameter value
- Throws:
PCFException- if the specified parameter does not exist in the group (the reason code given is MQRCCF_CFBS_PARM_ID_ERROR)- See Also:
-
equals
Returns true when invoked with another MQCFGR instance with the same parameter, parameterCount, and parameter children. -
toString
return a string representation of this header- Overrides:
toStringin classcom.ibm.mq.headers.internal.Header
-