getVersion
getVersion()
getVersion
メソッドは、
Interact
ランタイム・サーバーの現在の実装のバージョンを返します。
ベスト・プラクティスは、
Interact
API を使用してタッチポイントを初期化するときに、この方法を使用することです。
戻り値
ランタイム・サーバーは、以下の属性が設定されたレスポンス・オブジェクトを使用して
getVersion
に応答します。
AdvisoryMessages
ApiVersion
StatusCode
例
この例では、
getVersion
を呼び出し、結果を処理する簡単な方法を示します。
response = api.getVersion();
/** Process the response appropriately */
// check if response is successful or not
if(response.getStatusCode() == Response.STATUS_SUCCESS)
{
System.out.println("getVersion call processed with no warnings or errors");
System.out.println("API Version:" + response.getApiVersion(););
}
else if(response.getStatusCode() == Response.STATUS_WARNING)
{
System.out.println("getVersion call processed with a warning");
}
else
{
System.out.println("getVersion call processed with an error");
}
// For any non-successes, there should be advisory messages explaining why
if(response.getStatusCode() != Response.STATUS_SUCCESS)
printDetailMessageOfWarningOrError("getVersion",
response.getAdvisoryMessages());
Copyright IBM Corporation 2012. All Rights Reserved.