JavaTM Platform
Standard Ed. 6

javax.management.monitor
クラス StringMonitor

java.lang.Object
  上位を拡張 javax.management.NotificationBroadcasterSupport
      上位を拡張 javax.management.monitor.Monitor
          上位を拡張 javax.management.monitor.StringMonitor
すべての実装されたインタフェース:
MBeanRegistration, MonitorMBean, StringMonitorMBean, NotificationBroadcaster, NotificationEmitter

public class StringMonitor
extends Monitor
implements StringMonitorMBean

文字列属性の値を監視するように設計されたモニター MBean を定義します。

文字列モニターは次のようにして通知を送信します。

導入されたバージョン:
1.5

フィールドの概要
 
クラス javax.management.monitor.Monitor から継承されたフィールド
alreadyNotified, alreadyNotifieds, capacityIncrement, dbgTag, elementCount, OBSERVED_ATTRIBUTE_ERROR_NOTIFIED, OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED, OBSERVED_OBJECT_ERROR_NOTIFIED, RESET_FLAGS_ALREADY_NOTIFIED, RUNTIME_ERROR_NOTIFIED, server
 
コンストラクタの概要
StringMonitor()
          デフォルトのコンストラクタです。
 
メソッドの概要
 String getDerivedGauge()
          推奨されていません。 JMX 1.2 以降、 getDerivedGauge(ObjectName) で置換されています。
 String getDerivedGauge(ObjectName object)
          指定のオブジェクトが監視対象の MBean のセットに含まれる場合、このオブジェクトの派生ゲージを取得します。
 long getDerivedGaugeTimeStamp()
          推奨されていません。 JMX 1.2 以降、 getDerivedGaugeTimeStamp(ObjectName) で置換されています。
 long getDerivedGaugeTimeStamp(ObjectName object)
          指定のオブジェクトが監視対象の MBean のセットに含まれる場合、このオブジェクトの派生ゲージのタイムスタンプを取得します。
 MBeanNotificationInfo[] getNotificationInfo()
          通知の Java クラス名と、文字列モニターによって送信される通知型を含む NotificationInfo オブジェクトを返します。
 boolean getNotifyDiffer()
          監視対象の MBean すべてに共通の差分通知のオン/オフスイッチ値を取得します。
 boolean getNotifyMatch()
          監視対象の MBean すべてに共通の一致通知のオン/オフスイッチ値を取得します。
 String getStringToCompare()
          監視対象の MBean すべてに共通の監視対象属性と比較する文字列を取得します。
 void setNotifyDiffer(boolean value)
          監視対象の MBean すべてに共通の差分通知のオン/オフスイッチ値を設定します。
 void setNotifyMatch(boolean value)
          監視対象の MBean すべてに共通の一致通知のオン/オフスイッチ値を設定します。
 void setStringToCompare(String value)
          監視対象の MBean すべてに共通の監視対象属性と比較する文字列を設定します。
 void start()
          文字列モニターを開始します。
 void stop()
          文字列モニターを停止します。
 
クラス javax.management.monitor.Monitor から継承されたメソッド
addObservedObject, containsObservedObject, getGranularityPeriod, getObservedAttribute, getObservedObject, getObservedObjects, isActive, postDeregister, postRegister, preDeregister, preRegister, removeObservedObject, setGranularityPeriod, setObservedAttribute, setObservedObject
 
クラス javax.management.NotificationBroadcasterSupport から継承されたメソッド
addNotificationListener, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
インタフェース javax.management.monitor.MonitorMBean から継承されたメソッド
addObservedObject, containsObservedObject, getGranularityPeriod, getObservedAttribute, getObservedObject, getObservedObjects, isActive, removeObservedObject, setGranularityPeriod, setObservedAttribute, setObservedObject
 

コンストラクタの詳細

StringMonitor

public StringMonitor()
デフォルトのコンストラクタです。

メソッドの詳細

start

public void start()
文字列モニターを開始します。

定義:
インタフェース MonitorMBean 内の start
定義:
クラス Monitor 内の start

stop

public void stop()
文字列モニターを停止します。

定義:
インタフェース MonitorMBean 内の stop
定義:
クラス Monitor 内の stop

getDerivedGauge

public String getDerivedGauge(ObjectName object)
指定のオブジェクトが監視対象の MBean のセットに含まれる場合、このオブジェクトの派生ゲージを取得します。そうでない場合は null を取得します。

定義:
インタフェース StringMonitorMBean 内の getDerivedGauge
パラメータ:
object - MBean の名前。この MBean の派生ゲージが要求される
戻り値:
指定されたオブジェクトの派生ゲージ

getDerivedGaugeTimeStamp

public long getDerivedGaugeTimeStamp(ObjectName object)
指定のオブジェクトが監視対象の MBean のセットに含まれる場合、このオブジェクトの派生ゲージのタイムスタンプを取得します。そうでない場合は 0 を取得します。

定義:
インタフェース StringMonitorMBean 内の getDerivedGaugeTimeStamp
パラメータ:
object - オブジェクトの名前。 このオブジェクトの派生ゲージのタイムスタンプが返される
戻り値:
指定されたオブジェクトの派生ゲージのタイムスタンプ

getDerivedGauge

@Deprecated
public String getDerivedGauge()
推奨されていません。 JMX 1.2 以降、 getDerivedGauge(ObjectName) で置換されています。

監視対象の MBean のセットに含まれる最初のオブジェクトの派生ゲージを返します。

定義:
インタフェース StringMonitorMBean 内の getDerivedGauge
戻り値:
派生ゲージ

getDerivedGaugeTimeStamp

@Deprecated
public long getDerivedGaugeTimeStamp()
推奨されていません。 JMX 1.2 以降、 getDerivedGaugeTimeStamp(ObjectName) で置換されています。

監視対象の MBean のセットに含まれる最初のオブジェクトの派生ゲージのタイムスタンプを取得します。

定義:
インタフェース StringMonitorMBean 内の getDerivedGaugeTimeStamp
戻り値:
派生ゲージのタイムスタンプ

getStringToCompare

public String getStringToCompare()
監視対象の MBean すべてに共通の監視対象属性と比較する文字列を取得します。

定義:
インタフェース StringMonitorMBean 内の getStringToCompare
戻り値:
文字列値
関連項目:
setStringToCompare(java.lang.String)

setStringToCompare

public void setStringToCompare(String value)
                        throws IllegalArgumentException
監視対象の MBean すべてに共通の監視対象属性と比較する文字列を設定します。

定義:
インタフェース StringMonitorMBean 内の setStringToCompare
パラメータ:
value - 文字列値
例外:
IllegalArgumentException - 比較のために指定された 文字列が null の場合
関連項目:
getStringToCompare()

getNotifyMatch

public boolean getNotifyMatch()
監視対象の MBean すべてに共通の一致通知のオン/オフスイッチ値を取得します。

定義:
インタフェース StringMonitorMBean 内の getNotifyMatch
戻り値:
比較する文字列とのマッチングを行なったとき文字列モニターが通知を送る場合は true、 そうでない場合は false
関連項目:
setNotifyMatch(boolean)

setNotifyMatch

public void setNotifyMatch(boolean value)
監視対象の MBean すべてに共通の一致通知のオン/オフスイッチ値を設定します。

定義:
インタフェース StringMonitorMBean 内の setNotifyMatch
パラメータ:
value - 一致通知のオン/オフスイッチ値
関連項目:
getNotifyMatch()

getNotifyDiffer

public boolean getNotifyDiffer()
監視対象の MBean すべてに共通の差分通知のオン/オフスイッチ値を取得します。

定義:
インタフェース StringMonitorMBean 内の getNotifyDiffer
戻り値:
比較する文字列の差分を取ったとき文字列モニターが通知を送る場合は true、 そうでない場合は false
関連項目:
setNotifyDiffer(boolean)

setNotifyDiffer

public void setNotifyDiffer(boolean value)
監視対象の MBean すべてに共通の差分通知のオン/オフスイッチ値を設定します。

定義:
インタフェース StringMonitorMBean 内の setNotifyDiffer
パラメータ:
value - 差分通知のオン/オフスイッチ値
関連項目:
getNotifyDiffer()

getNotificationInfo

public MBeanNotificationInfo[] getNotificationInfo()
通知の Java クラス名と、文字列モニターによって送信される通知型を含む NotificationInfo オブジェクトを返します。

定義:
インタフェース NotificationBroadcaster 内の getNotificationInfo
オーバーライド:
クラス NotificationBroadcasterSupport 内の getNotificationInfo
戻り値:
通知の配列

JavaTM Platform
Standard Ed. 6

バグの報告と機能のリクエスト
さらに詳しい API リファレンスおよび開発者ドキュメントについては、Java SE 開発者用ドキュメントを参照してください。開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、およびコード実例が含まれています。

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。