com.ibm.mq.pcf

Class MQCFGR

  1. java.lang.Object
  2. extended bycom.ibm.mq.jmqi.JmqiObject
  3. extended bycom.ibm.mq.headers.internal.Header
  4. extended bycom.ibm.mq.pcf.PCFHeader
  5. extended bycom.ibm.mq.pcf.PCFParameter
  6. extended bycom.ibm.mq.pcf.MQCFGR
All implemented interfaces:
com.ibm.mq.headers.internal.CachingHeader, MQData, MQHeader, PCFContent

  1. public class MQCFGR
  2. extends PCFParameter
  3. implements PCFContent
MQCFGR (PCF group parameter) header class.
        struct tagMQCFGR {
                MQLONG  Type;            // Structure type
                MQLONG  StrucLength;     // Structure length
                MQLONG  Parameter;       // Parameter identifier
                MQLONG  ParameterCount;  // Count of group 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. int
parameter
parameter identifier
  1. int
parameterCount
Count of group parameter structures
  1. static
  2. java.lang.String
sccsid
  1. int
SIZE
Deprecated. prefer PCFHeader.size()
  1. static
  2. int
strucLength
structure length
  1. static
  2. int
type
structure type
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
Fields inherited from interface com.ibm.mq.headers.internal.CachingHeader
copyright_notice

Constructor Summary

Constructor and Description
MQCFGR()
Constructs an MQCFGR instance with default field values.
MQCFGR(java.io.DataInput message,int encoding,int characterSet)
Constructs an MQCFGR instance populated from a DataInput source.
MQCFGR(MQMessage message)
Constructs an MQCFGR instance populated from an MQMessage.

Method Summary

Modifier and Type Method and Description
  1. void
addFilterParameter(int parameter,int operator,byte[] value)
  1. void
addFilterParameter(int parameter,int operator,int value)
  1. void
addFilterParameter(int parameter,int operator,java.lang.String value)
  1. void
addParameter(int parameter,byte[] value)
  1. void
addParameter(int parameter,int value)
  1. void
addParameter(int parameter,int[] values)
  1. void
addParameter(int parameter,long value)
  1. void
addParameter(int parameter,long[] values)
  1. void
addParameter(int parameter,java.lang.String value)
  1. void
addParameter(int parameter,java.lang.String[] values)
  1. void
addParameter(PCFParameter parameter)
  1. boolean
equals(java.lang.Object obj)
Returns true when invoked with another MQCFGR instance with the same parameter, parameterCount, and parameter children.
  1. byte[]
getBytesParameterValue(int parameter)
  1. int
getHeaderVersion()
  1. long
getInt64ParameterValue(int parameter)
  1. long[]
getIntList64ParameterValue(int parameter)
  1. int[]
getIntListParameterValue(int parameter)
  1. int
getIntParameterValue(int parameter)
  1. int
getParameter()
gets the parameter identifier
  1. PCFParameter
getParameter(int parameter)
  1. int
getParameterCount()
gets the count of group parameter structures
  1. java.util.Enumeration<?>
getParameters()
  1. java.lang.Object
getParameterValue(int parameter)
  1. java.lang.String[]
getStringListParameterValue(int parameter)
  1. java.lang.String
getStringParameterValue(int parameter)
  1. java.lang.String
getStringValue()
  1. int
getStrucLength()
Get the length of the structure.
  1. int
getType()
gets the structure type
  1. java.lang.Object
getValue()
  1. int
read(java.io.DataInput message,int encoding,int characterSet)
  1. void
setParameter(int value)
sets the parameter identifier
  1. void
setParameterCount(int value)
Sets the MQCFGR parameter count.
  1. java.lang.String
toString()
return a string representing this header
  1. static
  2. int
write(MQMessage message,int parameter,int parameterCount)
A convenience method for writing an MQCFGR header structure with the specified values to an MQMessage.
Methods inherited from class com.ibm.mq.pcf.PCFParameter
getParameterName, getStore, hashCode, nextParameter
Methods inherited from class com.ibm.mq.pcf.PCFHeader
initialize, size, write
Methods 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, store, store, type, validate, write
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.ibm.mq.headers.internal.CachingHeader
discardCachedContent, readCachedContent, writeCachedContent

Field Detail

sccsid

  1. public static final java.lang.String sccsid
See Also:
exclude

SIZE

  1. @Deprecated
  2. public final int SIZE
Deprecated. prefer PCFHeader.size()
size of the header in bytes
See Also:

type

  1. public static final int type
structure type
See Also:

strucLength

  1. public static final int strucLength
structure length
See Also:

parameter

  1. public int parameter
parameter identifier

parameterCount

  1. public int parameterCount
Count of group parameter structures

Constructor Detail

MQCFGR

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

MQCFGR

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

MQCFGR

  1. public MQCFGR(java.io.DataInput message,
  2. int encoding,
  3. int characterSet)
  4. throws MQException
  5. java.io.IOException
Constructs an MQCFGR 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:
MQException - if the message content does not yield a valid MQCFGR stucture
java.io.IOException - if there is a problem reading the message content

Method Detail

write

  1. public static int write(MQMessage message,
  2. int parameter,
  3. int parameterCount)
  4. throws java.io.IOException
A convenience method for writing an MQCFGR header structure with the specified values to an MQMessage.
Parameters:
message - the message to write to
parameter - the parameter identifier
parameterCount - the number of parameter structures enclosed by the group
Returns:
the number of bytes written
Throws:
java.io.IOException - if there is a problem writing the message

read

  1. public int read(java.io.DataInput message,
  2. int encoding,
  3. int characterSet)
  4. throws MQException
  5. java.io.IOException
Description copied from interface: MQData
Reads content from a message or byte stream and returns the number of bytes consumed. The content is interpreted (if applicable) using the specified encoding and CCSID.
Specified by:
read in interface MQData
Overrides:
read in class com.ibm.mq.headers.internal.Header
Parameters:
message - the message.
encoding - the numeric encoding. see (CMQC.MQENC_* for values).
characterSet - the Coded Character Set Identifier.
Throws:
java.io.IOException
See Also:
Header.read(java.io.DataInput, int, int)

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.

getParameter

  1. public int getParameter()
gets the parameter identifier
Specified by:
Returns:
the parameter identifier

setParameter

  1. public void setParameter(int value)
sets the parameter identifier
Parameters:
value - the parameter identifier

getParameterCount

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

setParameterCount

  1. public void setParameterCount(int value)
Sets the MQCFGR 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

getValue

  1. public java.lang.Object getValue( )
Description copied from class: PCFParameter
Get the value of the parameter
Specified by:
Returns:
Return the value of the parameter
See Also:

getStringValue

  1. public java.lang.String getStringValue( )
Description copied from class: PCFParameter
Get the string value of the parameter
Specified by:
Returns:
Returns the string value of the parameter
See Also:

addParameter

  1. public void addParameter(PCFParameter parameter)
Description copied from interface: PCFContent
Adds a PCFParameter to the group.
Specified by:
addParameter in interface PCFContent
Parameters:
parameter - the parameter structure to add (MQCFIN, MQCFIL, MQCFST and so on)
See Also:

addParameter

  1. public void addParameter(int parameter,
  2. int value)
Description copied from interface: PCFContent
Adds an integer parameter to the group.
Specified by:
addParameter in interface PCFContent
Parameters:
parameter - the integer parameter identifier
value - the integer value
See Also:

addParameter

  1. public void addParameter(int parameter,
  2. int[] values)
Description copied from interface: PCFContent
Adds an integer list parameter to the group.
Specified by:
addParameter in interface PCFContent
Parameters:
parameter - the integer list parameter identifier
values - the array of integer values
See Also:

addParameter

  1. public void addParameter(int parameter,
  2. long value)
Description copied from interface: PCFContent
Adds a 64-bit integer parameter to the group.
Specified by:
addParameter in interface PCFContent
Parameters:
parameter - the integer parameter identifier
value - the integer value
See Also:

addParameter

  1. public void addParameter(int parameter,
  2. long[] values)
Description copied from interface: PCFContent
Adds a 64-bit integer list parameter to the group.
Specified by:
addParameter in interface PCFContent
Parameters:
parameter - the integer list parameter identifier
values - the array of integer values
See Also:

addParameter

  1. public void addParameter(int parameter,
  2. java.lang.String value)
Description copied from interface: PCFContent
Adds a string parameter to the group.
Specified by:
addParameter in interface PCFContent
Parameters:
parameter - the string parameter identifier
value - the string value
See Also:

addParameter

  1. public void addParameter(int parameter,
  2. java.lang.String[] values)
Description copied from interface: PCFContent
Adds a string list parameter to the group.
Specified by:
addParameter in interface PCFContent
Parameters:
parameter - the string list parameter identifier
values - the array of string values
See Also:

addParameter

  1. public void addParameter(int parameter,
  2. byte[] value)
Description copied from interface: PCFContent
Adds a byte array parameter to the group.
Specified by:
addParameter in interface PCFContent
Parameters:
parameter - the string list parameter identifier
value - the array of string values
See Also:

addFilterParameter

  1. public void addFilterParameter( int parameter,
  2. int operator,
  3. int value)
Description copied from interface: PCFContent
Adds an integer filter parameter to the group.
Specified by:
Parameters:
parameter - the filter parameter identifier
operator - one of the MQCFOP_* filter operator constants
value - the filter value
See Also:

addFilterParameter

  1. public void addFilterParameter( int parameter,
  2. int operator,
  3. java.lang.String value)
Description copied from interface: PCFContent
Adds a string filter parameter to the group.
Specified by:
Parameters:
parameter - the filter parameter identifier
operator - one of the MQCFOP_* filter operator constants
value - the filter value
See Also:

addFilterParameter

  1. public void addFilterParameter( int parameter,
  2. int operator,
  3. byte[] value)
Description copied from interface: PCFContent
Adds a bytes string filter parameter to the group.
Specified by:
Parameters:
parameter - the filter parameter identifier
operator - one of the MQCFOP_* filter operator constants
value - the filter value
See Also:

getParameters

  1. public java.util.Enumeration<?> getParameters( )
Description copied from interface: PCFContent
Returns 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:
getParameters in interface PCFContent
Returns:
an enumeration of parameters
See Also:

getParameter

  1. public PCFParameter getParameter( int parameter)
Description copied from interface: PCFContent
Returns the PCFParameter structure for the specified parameter, or null if the parameter is not found.
Specified by:
getParameter in interface PCFContent
Returns:
the specified parameter object
See Also:

getParameterValue

  1. public java.lang.Object getParameterValue( int parameter)
Description copied from interface: PCFContent
Returns 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:
Returns:
the specified parameter value
See Also:

getIntParameterValue

  1. public int getIntParameterValue( int parameter)
  2. throws PCFException
Description copied from interface: PCFContent
Returns the value of the specified integer parameter (MQCFIN) as an integer.
Specified by:
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

  1. public int[] getIntListParameterValue( int parameter)
  2. throws PCFException
Description copied from interface: PCFContent
Returns the value of the specified integer list parameter (MQCFIL) as an array of integers.
Specified by:
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

  1. public long getInt64ParameterValue( int parameter)
  2. throws PCFException
Description copied from interface: PCFContent
Returns the value of the specified integer parameter (MQCFIN64) as an integer.
Specified by:
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

  1. public long[] getIntList64ParameterValue( int parameter)
  2. throws PCFException
Description copied from interface: PCFContent
Returns the value of the specified integer list parameter (MQCFIL64) as an array of integers.
Specified by:
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

  1. public java.lang.String getStringParameterValue( int parameter)
  2. throws PCFException
Description copied from interface: PCFContent
Returns the value of the specified string parameter (MQCFST) as a string.
Specified by:
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

  1. public java.lang.String[] getStringListParameterValue( int parameter)
  2. throws PCFException
Description copied from interface: PCFContent
Returns the value of the specified string list parameter (MQCFSL) as an array of strings.
Specified by:
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

  1. public byte[] getBytesParameterValue( int parameter)
  2. throws PCFException
Description copied from interface: PCFContent
Returns the value of the specified byte array parameter (MQCFBS).
Specified by:
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

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

getHeaderVersion

  1. public int getHeaderVersion()
Description copied from class: PCFParameter
Get the header version
Overrides:
Returns:
Return the header version
See Also:
exclude

toString

  1. public java.lang.String toString( )
return a string representing this header
Overrides:
toString in class PCFHeader
Returns:
the string
See Also:
Object.toString()