act_event 変数

act_event 変数は、現行イベントに適用されるメソッドへのアクセスを提供します。

詳細

タイマー・ルールはイベントを処理しないため、タイマー・ルール内の act_event 変数は、ルールをアクティブ化または非アクティブ化するイベントに対してのみ適用されます。

act_event 変数は、イベントがルールをアクティブ化または非アクティブ化した場合のみ <onActivation> および <onDeactivation> アクション内で適用されます。それ以外の場合、この変数は NULL です。

コーディングの例

以下のコードは、act_event 変数にアクセスして、イベントの hostname 属性を取得します。
String host = act_event.getStringAttribute("hostname");

アクセスできるメソッド

act_event 変数がアクセスを提供するメソッドは、表 1 で示すように IEvent インターフェースで定義されます。
表 1. IEvent インターフェースと対応するメソッド、および Javadoc メソッド説明のロケーション
インターフェース メソッド Javadoc メソッド説明のロケーション
IEvent
  • get
  • getAttribute
  • getBooleanAttribute
  • getByteAttribute
  • getShortAttribute
  • getIntAttribute
  • getLongAttribute
  • getFloatAttribute
  • getDoubleAttribute
  • getStringAttribute
  • set
  • getTimeStamp
  • setTimeStamp
  • getType
  • getOriginal
com.ibm.correlation.IEvent