com.ibm.mq.headers.pcf
類別 PCFMessage
- java.lang.Object
- com.ibm.mq.jmqi.JmqiObject
- com.ibm.mq.headers.internal.Header
- com.ibm.mq.headers.pcf.PCFHeader
- com.ibm.mq.headers.pcf.PCFMessage
- 所有實作的介面:
- MQData, MQHeader, PCFContent
public class PCFMessage 延伸 PCFHeader 實作 PCFContent
封裝 PCF 訊息的類別。 PCFMessage 通常代表 PCF 要求或回應或事件訊息,其中包含 MQCFH 標頭,後面接著一組 PCFParameter 結構 (MQCFIN、MQCFIL、MQCFST 等類型)。 可以建構及操作 PCFMessage 實例,而無需直接參照 PCF 標頭及參數結構本身。- 另請參閱:
PCFMessageAgent
-
巢狀類別摘要
-
繼承自介面 com.ibm.mq.headers 的巢狀類別/介面。MQHeader
MQHeader.Field
-
-
建構子摘要
建構子 建構子和說明 PCFMessage(java.io.DataInput message)從 MQMessage 的內容起始設定 PCFMessage。PCFMessage(int command)將 PCFMessage 起始設定為具有指定 MQCFH 指令 ID 的 PCF 要求。PCFMessage(int type, int command, int msgSeqNumber, boolean last)以指定的 MQCFH 類型、指令 ID、序號及控制指示器來起始設定 PCFMessage。
-
方法摘要
所有方法 實例方法 具體方法 修飾元和類型 方法和說明 voidaddFilterParameter(int parameter, int operator, byte[] value)將位元組字串過濾器參數新增至群組。voidaddFilterParameter(int parameter, int operator, int value)將整數過濾器參數新增至群組。voidaddFilterParameter(int parameter, int operator, java.lang.String value)將字串過濾器參數新增至群組。voidaddParameter(int parameter, byte[] value)將位元組陣列參數新增至群組。voidaddParameter(int parameter, int value)將整數參數新增至群組。voidaddParameter(int parameter, int[] values)將整數清單參數新增至群組。voidaddParameter(int parameter, long value)將 64 位元整數參數新增至群組。voidaddParameter(int parameter, long[] values)將 64 位元整數清單參數新增至群組。voidaddParameter(int parameter, java.lang.String value)將字串參數新增至群組。voidaddParameter(int parameter, java.lang.String[] values)將字串清單參數新增至群組。voidaddParameter(PCFParameter parameter)將 PCFParameter 新增至 PCFMessage。booleanequals(java.lang.Object obj)當使用另一個 PCFMessage 實例以相同順序呼叫時,會傳回 true ,該實例具有相符的標頭及相等參數。byte[]getBytesParameterValue(int parameter)傳回指定位元組陣列參數 (MQCFBS) 的值。intgetCommand()傳回 PCF 指令 IDintgetCompCode()傳回 MQCFH 中的完成碼。intgetControl()傳回 PCF 標頭控制指示器。longgetInt64ParameterValue(int parameter)以整數傳回指定整數參數 (MQCFIN64) 的值。long[]getIntList64ParameterValue(int parameter)以整數陣列形式傳回指定整數清單參數 (MQCFIL64) 的值。int[]getIntListParameterValue(int parameter)以整數陣列形式傳回指定整數清單參數 (MQCFIL) 的值。intgetIntParameterValue(int parameter)以整數傳回指定整數參數 (MQCFIN) 的值。intgetMsgSeqNumber()傳回 PCF 訊息序號PCFParametergetParameter(int parameter)傳回指定參數的 PCFParameter 結構,如果找不到參數,則傳回空值。intgetParameterCount()傳回 PCF 訊息中的參數結構數目。java.util.EnumerationgetParameters()傳回群組中參數的列舉。java.lang.ObjectgetParameterValue(int parameter)傳回指定參數的值,如果找不到參數,則傳回空值。intgetReason()傳回 MQCFH 中的原因碼。java.lang.String[]getStringListParameterValue(int parameter)以字串陣列形式傳回指定字串清單參數 (MQCFSL) 的值。java.lang.StringgetStringParameterValue(int parameter)以字串形式傳回指定字串參數 (MQCFST) 的值。intgetType()傳回 PCF 類型 IDvoidinitialize(int command)起始設定 PCFMessage ,以與指定的指令 ID (無參數) 一起重複使用。voidinitialize(int type, int command, int msgSeqNumber, boolean last)起始設定 PCFMessage ,以與指定的類型、指令 ID、序號、控制指示器及無參數一起重複使用。voidsetHeader(PCFHeader header)設定 PCFHeaderintsize()傳回此 PCFMessage 的大小 (以位元組為單位)。java.lang.StringtoString()傳回類別實例的字串表示法intwrite(java.io.DataOutput message)將此 PCFMessage 的內容寫入,例如 MQMessage。intwrite(java.io.DataOutput message, int encoding, int characterSet)以指定的編碼及 CCSID 將此 PCFMessage 的內容寫入 (例如 MQMessage)-
繼承自類別 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, store, store, type, validate
-
-
-
建構子詳細資料
PCFMessage
public PCFMessage (int 指令)
將 PCFMessage 起始設定為具有指定 MQCFH 指令 ID 的 PCF 要求。 當新增參數時,參數計數會從零遞增。- 參數:
command-PCF 指令 ID
PCFMessage
public PCFMessage (int type , int 指令, int msgSeqNumber , 布林 last)以指定的 MQCFH 類型、指令 ID、序號及控制指示器來起始設定 PCFMessage。 當新增參數時,參數計數會從零遞增。 大部分應用程式都不需要使用此建構子。 改為 PCF 要求訊息 (一律具有類型 MQCFT_COMMAND、序號 1 及設為 MQCFC_LAST 的控制指示器) 更容易使用 PCFMessage (int 指令) 來建構 表單。- 參數:
type-PCF 訊息類型command-PCF 指令 IDmsgSeqNumber-訊息的序號last-如果已設定,則指出此訊息是序列中的最後一則
PCFMessage
public PCFMessage (java.io.DataInput message) throws MQDataException, java.io.IOException從 MQMessage 的內容起始設定 PCFMessage。- 參數:
message-要讀取的訊息- 擲出:
MQDataException-如果訊息內容未產生有效的 PCFMessagejava.io.IOException-如果在讀取訊息時發生問題
-
方法詳細資料
起始設定
public void initialize (int command)
起始設定 PCFMessage ,以與指定的指令 ID (無參數) 一起重複使用。- 參數:
command-PCF 指令 ID
起始設定
public void initialize (int type , int 指令, int msgSeqNumber , 布林 last)起始設定 PCFMessage ,以與指定的類型、指令 ID、序號、控制指示器及無參數一起重複使用。 大部分應用程式將不需要使用此方法。 改為 PCF 要求訊息 (一律具有類型 MQCFT_COMMAND、序號 1 及控制指示器設為 MQCFC_LAST) 可以更輕鬆地使用 initialize (int 指令) 來起始設定 表單。- 參數:
type-PCF 訊息類型command-PCF 指令 IDmsgSeqNumber-訊息的序號last-如果已設定,則指出此訊息是序列中的最後一則
addParameter
public void addParameter (PCFParameter parameter)
將 PCFParameter 新增至 PCFMessage。 必要的話,會自動更新 MQCFH 版本,以對應參數類型。 (例如,如果新增 PCF 過濾器參數,則版本必須設為 MQCFH_VERSION_3 。)- 指定者:
addParameter在介面中PCFContent- 參數:
parameter-要新增的參數結構 (MQCFIN、MQCFIL、MQCFST 等)- 另請參閱:
PCFContent.addParameter(PCFParameter)
addParameter
public void addParameter (int parameter , int value)從介面複製的說明:PCFContent將整數參數新增至群組。- 指定者:
addParameter在介面中PCFContent- 參數:
parameter-整數參數 IDvalue-整數值- 另請參閱:
PCFContent.addParameter(int, int)
addParameter
public void addParameter (int parameter , int [] values)從介面複製的說明:PCFContent將整數清單參數新增至群組。- 指定者:
addParameter在介面中PCFContent- 參數:
parameter-整數清單參數 IDvalues-整數值的陣列- 另請參閱:
PCFContent.addParameter(int, int[])
addParameter
public void addParameter (int parameter , long 值)從介面複製的說明:PCFContent將 64 位元整數參數新增至群組。- 指定者:
addParameter在介面中PCFContent- 參數:
parameter-整數參數 IDvalue-整數值- 另請參閱:
PCFContent.addParameter(int, long)
addParameter
public void addParameter (int parameter , long [] values)從介面複製的說明:PCFContent將 64 位元整數清單參數新增至群組。- 指定者:
addParameter在介面中PCFContent- 參數:
parameter-整數清單參數 IDvalues-整數值的陣列- 另請參閱:
PCFContent.addParameter(int, long[])
addParameter
public void addParameter (int parameter , java.lang.String 值)從介面複製的說明:PCFContent將字串參數新增至群組。- 指定者:
addParameter在介面中PCFContent- 參數:
parameter-字串參數 IDvalue-字串值- 另請參閱:
PCFContent.addParameter(int, String)
addParameter
public void addParameter (int parameter , java.lang.String [] values)從介面複製的說明:PCFContent將字串清單參數新增至群組。- 指定者:
addParameter在介面中PCFContent- 參數:
parameter-字串清單參數 IDvalues-字串值的陣列- 另請參閱:
PCFContent.addParameter(int, String[])
addParameter
public void addParameter (int parameter , byte [] value)從介面複製的說明:PCFContent將位元組陣列參數新增至群組。- 指定者:
addParameter在介面中PCFContent- 參數:
parameter-字串清單參數 IDvalue-字串值的陣列- 另請參閱:
PCFContent.addParameter(int, byte[])
addFilterParameter
public void addFilterParameter (int parameter , int operator , int value)從介面複製的說明:PCFContent將整數過濾器參數新增至群組。- 指定者:
addFilterParameter在介面中PCFContent- 參數:
parameter-過濾器參數 IDoperator-其中一個 MQCFOP_ * 過濾器運算子常數value-過濾器值- 另請參閱:
PCFContent.addFilterParameter(int, int, int)
addFilterParameter
public void addFilterParameter (int parameter , int operator , java.lang.String 值)從介面複製的說明:PCFContent將字串過濾器參數新增至群組。- 指定者:
addFilterParameter在介面中PCFContent- 參數:
parameter-過濾器參數 IDoperator-其中一個 MQCFOP_ * 過濾器運算子常數value-過濾器值- 另請參閱:
PCFContent.addFilterParameter(int, int, String)
addFilterParameter
public void addFilterParameter (int parameter , int operator , byte [] value)從介面複製的說明:PCFContent將位元組字串過濾器參數新增至群組。- 指定者:
addFilterParameter在介面中PCFContent- 參數:
parameter-過濾器參數 IDoperator-其中一個 MQCFOP_ * 過濾器運算子常數value-過濾器值- 另請參閱:
PCFContent.addFilterParameter(int, int, byte[])
getCommand
public int getCommand ()
傳回 PCF 指令 ID- 傳回:
- 來自 MQCFH 的 指令的值 欄位
getMsgSeqNumber
public int getMsgSeqNumber ()
傳回 PCF 訊息序號- 傳回:
- 來自 MQCFH 的 msgSeqNumber 的值 欄位
getControl
public int getControl ()
傳回 PCF 標頭控制指示器。- 傳回:
- 來自 MQCFH 的 控制項的值 欄位
getCompCode
public int getCompCode ()
傳回 MQCFH 中的完成碼。- 傳回:
- 來自 MQCFH 的 CompCode 的值 欄位
getReason
public int getReason ()
傳回 MQCFH 中的原因碼。- 傳回:
- 來自 MQCFH 的 原因的值 欄位
getParameterCount
public int getParameterCount ()
傳回 PCF 訊息中的參數結構數目。- 指定者:
getParameterCount在介面中PCFContent- 傳回:
- 來自 MQCFH 的 parameterCount 的值 欄位
- 另請參閱:
PCFContent.getParameterCount()
getParameters
public java.util.Enumeration getParameters ()
從介面複製的說明:PCFContent傳回群組中參數的列舉。 傳回的列舉元素是個別 PCFParameter 實例 (MQCFIN、MQCFIL、MQCFST 或 MQCFSL 等實例)。- 指定者:
getParameters在介面中PCFContent- 傳回:
- PCF 訊息參數結構
- 另請參閱:
PCFContent.getParameters()
setHeader
public void setHeader (PCFHeader header)
設定 PCFHeader- 參數:
header-要設定的值
getParameter
public PCFParameter getParameter (int parameter)
從介面複製的說明:PCFContent傳回指定參數的 PCFParameter 結構,如果找不到參數,則傳回空值。- 指定者:
getParameter在介面中PCFContent- 傳回:
- 指定的參數物件
- 另請參閱:
PCFContent.getParameter(int)
getParameterValue
public java.lang.Object getParameterValue (int parameter)
從介面複製的說明:PCFContent傳回指定參數的值,如果找不到參數,則傳回空值。 傳回的物件是單一整數、單一字串、整數陣列或字串陣列,視 PCFParameter 的類型而定。 呼叫者可以從提供的參數 ID 推斷預期的傳回類型。- 指定者:
getParameterValue在介面中PCFContent- 傳回:
- 指定的參數值
- 另請參閱:
PCFContent.getParameterValue(int)
getIntParameterValue
public int getIntParameterValue (int parameter) throws PCFException從介面複製的說明:PCFContent以整數傳回指定整數參數 (MQCFIN) 的值。- 指定者:
getIntParameterValue在介面中PCFContent- 參數:
parameter-整數參數 ID- 傳回:
- 整數參數值
- 擲出:
PCFException-如果訊息中沒有指定的參數 (給定的原因碼是 MQRCCF_CFIN_PARM_ID_ERROR)- 另請參閱:
PCFContent.getIntParameterValue(int)
getIntListParameterValue
public int [] getIntListParameterValue (int parameter) throws PCFException從介面複製的說明:PCFContent以整數陣列形式傳回指定整數清單參數 (MQCFIL) 的值。- 指定者:
getIntListParameterValue在介面中PCFContent- 參數:
parameter-整數清單參數 ID- 傳回:
- 整數清單參數值
- 擲出:
PCFException-如果指定的參數不存在於群組中 (給定的原因碼是 MQRCCF_CFIL_PARM_ID_ERROR)- 另請參閱:
PCFContent.getIntListParameterValue(int)
getInt64ParameterValue
public long getInt64ParameterValue(int 參數) throws PCFException從介面複製的說明:PCFContent以整數傳回指定整數參數 (MQCFIN64) 的值。- 指定者:
getInt64ParameterValue在介面中PCFContent- 參數:
parameter-整數參數 ID- 傳回:
- 整數參數值
- 擲出:
PCFException-如果訊息中沒有指定的參數 (給定的原因碼是 MQRCCF_CFIN_PARM_ID_ERROR)- 另請參閱:
PCFContent.getInt64ParameterValue(int)
getIntList64ParameterValue
public long [] getIntList64ParameterValue(int 參數) throws PCFException從介面複製的說明:PCFContent以整數陣列形式傳回指定整數清單參數 (MQCFIL64) 的值。- 指定者:
getIntList64ParameterValue在介面中PCFContent- 參數:
parameter-整數清單參數 ID- 傳回:
- 整數清單參數值
- 擲出:
PCFException-如果指定的參數不存在於群組中 (給定的原因碼是 MQRCCF_CFIL_PARM_ID_ERROR)- 另請參閱:
PCFContent.getIntList64ParameterValue(int)
getStringParameterValue
public java.lang.String getStringParameterValue (int parameter) throws PCFException從介面複製的說明:PCFContent以字串形式傳回指定字串參數 (MQCFST) 的值。- 指定者:
getStringParameterValue在介面中PCFContent- 參數:
parameter-字串參數 ID- 傳回:
- 字串參數值
- 擲出:
PCFException-如果指定的參數不存在於群組中 (給定的原因碼是 MQRCCF_CFST_PARM_ID_ERROR)- 另請參閱:
PCFContent.getStringParameterValue(int)
getStringListParameterValue
public java.lang.String [] getStringListParameterValue (int parameter) throws PCFException從介面複製的說明:PCFContent以字串陣列形式傳回指定字串清單參數 (MQCFSL) 的值。- 指定者:
getStringListParameterValue在介面中PCFContent- 參數:
parameter-字串清單參數 ID- 傳回:
- 字串清單參數值
- 擲出:
PCFException-如果指定的參數不存在於群組中 (給定的原因碼為 MQRCCF_CFSL_PARM_ID_ERROR; 未定義其他特定的錯誤碼)- 另請參閱:
PCFContent.getStringListParameterValue(int)
getBytesParameterValue
public byte [] getBytesParameterValue (int parameter) throws PCFException從介面複製的說明:PCFContent傳回指定位元組陣列參數 (MQCFBS) 的值。- 指定者:
getBytesParameterValue在介面中PCFContent- 參數:
parameter-位元組陣列參數 ID- 傳回:
- 位元組陣列參數值
- 擲出:
PCFException-如果指定的參數不存在於群組中 (給定的原因碼是 MQRCCF_CFBS_PARM_ID_ERROR)- 另請參閱:
PCFContent.getBytesParameterValue(int)
寫入
public int write (java.io.DataOutput message) throws java.io.IOException將此 PCFMessage 的內容寫入,例如 MQMessage。
寫入
public int write (java.io.DataOutput message , int encoding , int characterSet) throws java.io.IOException以指定的編碼及 CCSID 將此 PCFMessage 的內容寫入 (例如 MQMessage)
大小
public int size ()
傳回此 PCFMessage 的大小 (以位元組為單位)。
等於
public boolean equals (java.lang.Object obj)
當使用另一個 PCFMessage 實例以相同順序呼叫時,會傳回 true ,該實例具有相符的標頭及相等參數。- 置換:
equals在類別中java.lang.Object- 參數:
obj-要比較的物件- 傳回:
- true of the object equals this one
toString
public java.lang.String toString ()
傳回類別實例的字串表示法- 置換:
toString在類別中com.ibm.mq.headers.internal.Header- 傳回:
- 字串表示法
-