6.2.5 TxPropagationIscImperativePluginクラス
- 説明
-
HMP-ADIFの(Imperativeな)ISCコマンドによるREST通信時に、トランザクションを伝搬するISCコマンドプラグインクラスです。APはHMP-PCTOのライブラリを組み込んで、HMP-ADIFのISCコマンドを使用します。TxPropagationIscImperativePluginクラスの各メソッドは、HMP-ADIFが呼び出します。APがTxPropagationIscImperativePluginクラスを直接使用する必要はありません。
TxPropagationIscImperativePluginのpreExecute()メソッドでは、ISCコマンドのエラー情報を設定しません。そのため、ほかのISCコマンドプラグインや、ISCコマンドの実行には影響しません。
- メソッド
-
TxPropagationIscImperativePluginクラスのメソッドの一覧を次の表に示します。
表6‒4 TxPropagationIscImperativePluginクラスのメソッドの一覧 メソッド
説明
applicable(java.lang.String communicationType)
ISCコマンドプラグインの適用可否を判定するメソッドです。
getOrder()
ISCコマンドプラグインの実行順序を判定するメソッドです。
postExecute(
org.globallogic.microservice.modules.isc.imperative.plugins.
IscImperativeCommandExecutionPluginContext pluginContext,
org.globallogic.microservice.modules.IscImperativeCommand command)
ISCコマンド実行後に任意の処理を実行するメソッドです。
preExecute(
org.globallogic.microservice.modules.isc.imperative.plugins.
IscImperativeCommandExecutionPluginContext pluginContext,
org.globallogic.microservice.modules.IscImperativeCommand command)
ISCコマンド実行前に任意の処理を実行するメソッドです。
- パッケージ名称
jp.co.Hitachi.soft.hmppcto.filter.propagation
- 〈この項の構成〉
(1) applicable(java.lang.String communicationType)
- 説明
-
ISCコマンドプラグインの適用可否を返します。
- 形式
public boolean applicable(java.lang.String communicationType)
- 引数
-
- java.lang.String communicationType:
-
次のとおり、通信方式が渡されます。
RESTの場合:"REST"
メッセージングの場合:"MESSAGING"
- 戻り値
-
HMP-PCTOは、RESTにだけ対応します。
引数が"REST"の場合はtrue、"MESSAGING"の場合は、falseを返します。
- 例外
-
なし。
(2) getOrder()
- 説明
-
ISCコマンドプラグインの実行順番を返します。
- 形式
public int getOrder()
- 引数
-
なし。
- 戻り値
-
パラメタjp.co.Hitachi.soft.hmppcto.branch.qualifier.propagation-orderで設定した値を返します。デフォルト値は1です。
TxPropagationIscImperativePlugin以外のISCコマンドプラグインクラスを使用する場合は、特に理由がないかぎりTxPropagationIscImperativePluginクラスのpreExecute()が最初、postExecute()が最後に呼ばれるようにデフォルト値で使用してください。
- 例外
-
なし。
(3) postExecute(IscImperativeCommandExecutionPluginContext pluginContext, IscImperativeCommand command)
- 説明
-
ISCコマンド実行後の処理を実行するメソッドです。レスポンスからHMP-PCTOがトランザクション制御に使用するHTTPヘッダを入力してトランザクション制御を実行します。
- 形式
public void postExecute(org.globallogic.microservice.modules.isc.imperative. plugins.IscImperativeCommandExecutionPluginContext pluginContext, org.globallogic.microservice.modules.IscImperativeCommand command)
- 引数
-
- org.globallogic.microservice.modules.isc.imperative.plugins.IscImperativeCommandExecutionPluginContext pluginContext:
-
IscImperativeCommandExecutionPluginContextインスタンスを指定します。
- org.globallogic.microservice.modules.IscImperativeCommand.IscImperativeCommand command:
-
IscImperativeCommandインスタンスを指定します。
- 戻り値
-
なし。
- 例外
-
なし。
(4) preExecute(IscImperativeCommandExecutionPluginContext pluginContext, IscImperativeCommand command)
- 説明
-
ISCコマンド実行前の処理を実行するメソッドです。HMP-PCTOがトランザクション制御に使用するHTTPヘッダをリクエストに追加してトランザクションを伝搬します。
- 形式
public void preExecute(IscImperativeCommandExecutionPluginContext pluginContext, IscImperativeCommand command)
- 引数
-
- org.globallogic.microservice.modules.isc.imperative.plugins.IscImperativeCommandExecutionPluginContext pluginContext:
-
IscImperativeCommandExecutionPluginContextインスタンスを指定します。
- org.globallogic.microservice.modules.IscImperativeCommand.IscImperativeCommand command:
-
IscImperativeCommandインスタンスを指定します。
- 戻り値
-
なし。
- 例外
-
なし。