com.ibm.mq.headers.pcf

Class MQEPH

  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.MQEPH
All implemented interfaces:
MQChainable, MQData, MQHeader, PCFContent

  1. public class MQEPH
  2. extends com.ibm.mq.headers.internal.Header
  3. implements MQChainable, 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

Modifier and Type Field and Description
  1. static
  2. int
SIZE
size of an MQEPH header in bytes
Fields inherited from class com.ibm.mq.headers.internal.Header
DEFAULT_CCSID, DEFAULT_ENCODING, sccsid
Fields inherited from class com.ibm.mq.jmqi.JmqiObject
COMP_JM, COMP_JN, COMP_JO

Constructor Summary

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

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. java.lang.String
format()
get the format of this message
  1. byte[]
getBytesParameterValue(int parameter)
  1. int
getCodedCharSetId()
Get the Character set identifier of data that follows.
  1. int
getEncoding()
Get the numeric encoding of the data that follows.
  1. int
getFlags()
get the Flags
  1. java.lang.String
getFormat()
get the Format name of data that follows last PCF parameter structure
  1. long
getInt64ParameterValue(int parameter)
  1. long[]
getIntList64ParameterValue(int parameter)
  1. int[]
getIntListParameterValue(int parameter)
  1. int
getIntParameterValue(int parameter)
  1. PCFParameter
getParameter(int parameter)
  1. int
getParameterCount()
  1. java.util.Enumeration
getParameters()
  1. java.lang.Object
getParameterValue(int parameter)
  1. MQCFH
getPCFHeader()
get the PCF header
  1. java.lang.String[]
getStringListParameterValue(int parameter)
  1. java.lang.String
getStringParameterValue(int parameter)
  1. java.lang.String
getStrucId()
Get the structure identifier; the value will be MQEPH_STRUC_ID
  1. int
getVersion()
Get the Structure version number
  1. int
nextCharacterSet()
get the CCSID of the next message
  1. void
nextCharacterSet(int value)
set the CCSID of the next message
  1. int
nextEncoding()
get the encoding of the next message
  1. void
nextEncoding(int value)
set the encoding of the next message
  1. java.lang.String
nextFormat()
get the format of the next message
  1. void
nextFormat(java.lang.String value)
set the format of the next message
  1. int
read(java.io.DataInput message,int encoding,int characterSet)
Populates this MQEPH object with data from the specified message
  1. void
setCodedCharSetId(int value)
Set the Character set identifier of data that follows.
  1. void
setEncoding(int value)
Set the numeric encoding of the data that follows.
  1. void
setFlags(int value)
set the Flags
  1. void
setFormat(java.lang.String value)
set the Format name of data that follows last PCF parameter structure
  1. void
setParameterCount(int value)
Sets the MQEPH parameter count.
  1. void
setPCFHeader(MQCFH value)
set the PCF header
  1. java.lang.String
toString()
return a string representation of this header
  1. int
write(java.io.DataOutput message,int encoding,int characterSet)
writes this header to the specified message
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, size, store, store, type, validate, write
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

SIZE

  1. public static final int SIZE
size of an MQEPH header in bytes
See Also:

Constructor Detail

MQEPH

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

MQEPH

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

MQEPH

  1. public MQEPH(java.io.DataInput message,
  2. int encoding,
  3. int characterSet)
  4. throws MQDataException
  5. java.io.IOException
Constructs an MQEPH instance populated from a DataInput source.
Parameters:
message - the DataInput 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 MQDLH stucture
java.io.IOException - if there is a problem reading the message content

Method Detail

read

  1. public int read(java.io.DataInput message,
  2. int encoding,
  3. int characterSet)
  4. throws MQDataException
  5. java.io.IOException
Populates this MQEPH object with data from the specified message
Specified by:
read in interface MQData
Overrides:
read in class com.ibm.mq.headers.internal.Header
Parameters:
message - the message
encoding - the encoding (big/little-endian)
characterSet - the CCSID
Returns:
the number of bytes read
Throws:
java.io.IOException

write

  1. public int write(java.io.DataOutput message,
  2. int encoding,
  3. int characterSet)
  4. throws java.io.IOException
writes this header to the specified message
Specified by:
write in interface MQData
Overrides:
write in class com.ibm.mq.headers.internal.Header
Parameters:
message - the message
encoding - the encoding (big/little-endian)
characterSet - the CCSID
Returns:
the number of bytes written
Throws:
java.io.IOException

getStrucId

  1. public java.lang.String getStrucId( )
Get the structure identifier; the value will be MQEPH_STRUC_ID
Returns:
the structure identifier

getVersion

  1. public int getVersion()
Get the Structure version number
Returns:
the Structure version number

getEncoding

  1. public int getEncoding()
Get the numeric encoding of the data that follows.
Returns:
the numeric encoding. A combination of MQENC_* values.

setEncoding

  1. 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

  1. public int getCodedCharSetId()
Get the Character set identifier of data that follows.
Returns:
the Character set identifier.

setCodedCharSetId

  1. public void setCodedCharSetId(int value)
Set the Character set identifier of data that follows.
Parameters:
value - the Character set identifier.

getFormat

  1. public java.lang.String 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

  1. public void setFormat(java.lang.String value)
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

  1. public int getFlags()
get the Flags
Returns:
the Flags

setFlags

  1. public void setFlags(int value)
set the Flags
Parameters:
value - the Flags

getPCFHeader

  1. public MQCFH getPCFHeader()
get the PCF header
Returns:
the header

setPCFHeader

  1. public void setPCFHeader(MQCFH value)
set the PCF header
Parameters:
value - the header

nextEncoding

  1. public int nextEncoding()
get the encoding of the next message
Specified by:
nextEncoding in interface MQChainable
Returns:
the encoding

nextEncoding

  1. public void nextEncoding(int value)
set the encoding of the next message
Specified by:
nextEncoding in interface MQChainable
Parameters:
value - the encoding

nextCharacterSet

  1. public int nextCharacterSet()
get the CCSID of the next message
Specified by:
Returns:
the CCSID

nextCharacterSet

  1. public void nextCharacterSet(int value)
set the CCSID of the next message
Specified by:
Parameters:
value - the CCSID

nextFormat

  1. public java.lang.String nextFormat( )
get the format of the next message
Specified by:
nextFormat in interface MQChainable
Returns:
the format

nextFormat

  1. public void nextFormat(java.lang.String value)
set the format of the next message
Specified by:
nextFormat in interface MQChainable
Parameters:
value - the format

format

  1. public java.lang.String format( )
get the format of this message
Specified by:
format in interface MQChainable

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)

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

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

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

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

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

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

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

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

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

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

getParameterCount

  1. public int getParameterCount()
Description copied from interface: PCFContent
Returns the number of parameter structures in the group.
Specified by:
Returns:
the value of the parameterCount field from the MQCFH

setParameterCount

  1. 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

  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:
the PCF message parameter structures

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

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

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)

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)

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)

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)

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)

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)

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)

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 java.lang.Object

toString

  1. public java.lang.String toString( )
return a string representation of this header
Overrides:
toString in class com.ibm.mq.headers.internal.Header