JavaTM 2 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)
          如果指定的对象包含在观察到的 MBeans 集中,则获取此对象的派生的尺度,否则将为 null
 long getDerivedGaugeTimeStamp()
          已过时。 从 JMX 1.2 开始,由 getDerivedGaugeTimeStamp(ObjectName) 取代
 long getDerivedGaugeTimeStamp(ObjectName object)
          如果指定的对象包含在观察到的 MBeans 集中,则获取此对象的派生尺度的时间戳,否则将为 0
 MBeanNotificationInfo[] getNotificationInfo()
          返回一个 NotificationInfo 对象,它包含通知的 Java 类的名称和由字符串监视器发送的通知类型。
 boolean getNotifyDiffer()
          获取所有观察到的 MBeans 共同的不同通知的开/关切换值。
 boolean getNotifyMatch()
          获取所有观察到的 MBeans 共同的匹配通知的开/关切换值。
 String getStringToCompare()
          获取要与所有观察到的 MBeans 的共同 observed 属性进行比较的字符串。
 void setNotifyDiffer(boolean value)
          设置所有观察到的 MBeans 共同的不同通知的开/关切换值。
 void setNotifyMatch(boolean value)
          设置所有观察到的 MBeans 共同的匹配通知的开/关切换值。
 void setStringToCompare(String value)
          设置要与所有观察到的 MBeans 的共同 observed 属性进行比较的字符串。
 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)
如果指定的对象包含在观察到的 MBeans 集中,则获取此对象的派生的尺度,否则将为 null

指定者:
接口 StringMonitorMBean 中的 getDerivedGauge
参数:
object - 需要其派生尺度的 MBean 的名称。
返回:
指定对象的派生尺度。

getDerivedGaugeTimeStamp

public long getDerivedGaugeTimeStamp(ObjectName object)
如果指定的对象包含在观察到的 MBeans 集中,则获取此对象的派生尺度的时间戳,否则将为 0

指定者:
接口 StringMonitorMBean 中的 getDerivedGaugeTimeStamp
参数:
object - 将返回其派生尺度时间戳的对象的名称。
返回:
指定对象的派生尺度时间戳。

getDerivedGauge

@Deprecated
public String getDerivedGauge()
已过时。 从 JMX 1.2 开始,由 getDerivedGauge(ObjectName) 取代

返回观察到的 MBeans 集中第一个对象的派生尺度。

指定者:
接口 StringMonitorMBean 中的 getDerivedGauge
返回:
派生的尺度。

getDerivedGaugeTimeStamp

@Deprecated
public long getDerivedGaugeTimeStamp()
已过时。 从 JMX 1.2 开始,由 getDerivedGaugeTimeStamp(ObjectName) 取代

获取观察到的 MBeans 集中第一个对象的派生尺度时间戳。

指定者:
接口 StringMonitorMBean 中的 getDerivedGaugeTimeStamp
返回:
派生尺度时间戳。

getStringToCompare

public String getStringToCompare()
获取要与所有观察到的 MBeans 的共同 observed 属性进行比较的字符串。

指定者:
接口 StringMonitorMBean 中的 getStringToCompare
返回:
字符串值。
另请参见:
setStringToCompare(java.lang.String)

setStringToCompare

public void setStringToCompare(String value)
                        throws IllegalArgumentException
设置要与所有观察到的 MBeans 的共同 observed 属性进行比较的字符串。

指定者:
接口 StringMonitorMBean 中的 setStringToCompare
参数:
value - 字符串值。
抛出:
IllegalArgumentException - 要比较的指定字符串为 null。
另请参见:
getStringToCompare()

getNotifyMatch

public boolean getNotifyMatch()
获取所有观察到的 MBeans 共同的匹配通知的开/关切换值。

指定者:
接口 StringMonitorMBean 中的 getNotifyMatch
返回:
如果与要比较的字符串匹配时字符串监视器发出通知,则返回 true,否则返回 false
另请参见:
setNotifyMatch(boolean)

setNotifyMatch

public void setNotifyMatch(boolean value)
设置所有观察到的 MBeans 共同的匹配通知的开/关切换值。

指定者:
接口 StringMonitorMBean 中的 setNotifyMatch
参数:
value - 匹配通知的开/关切换值。
另请参见:
getNotifyMatch()

getNotifyDiffer

public boolean getNotifyDiffer()
获取所有观察到的 MBeans 共同的不同通知的开/关切换值。

指定者:
接口 StringMonitorMBean 中的 getNotifyDiffer
返回:
如果与要比较的字符串不同时字符串监视器发出了通知,则返回 true,否则返回 false
另请参见:
setNotifyDiffer(boolean)

setNotifyDiffer

public void setNotifyDiffer(boolean value)
设置所有观察到的 MBeans 共同的不同通知的开/关切换值。

指定者:
接口 StringMonitorMBean 中的 setNotifyDiffer
参数:
value - 不同通知的开/关切换值。
另请参见:
getNotifyDiffer()

getNotificationInfo

public MBeanNotificationInfo[] getNotificationInfo()
返回一个 NotificationInfo 对象,它包含通知的 Java 类的名称和由字符串监视器发送的通知类型。

指定者:
接口 NotificationBroadcaster 中的 getNotificationInfo
覆盖:
NotificationBroadcasterSupport 中的 getNotificationInfo
返回:
可能的通知数组。

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only