| |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
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。
字符串监视器将根据以下情况发送通知:
- 如果属性值与要比较的字符串值匹配,则发送一个
匹配通知
。必须将 notify match 标志设置为true
。
除非属性值与要比较的字符串值不同,否则要比较值的后续字符串匹配不会引起更多的通知。 - 如果属性值与要比较的字符串的值不同,则发送一个
不同通知
。必须将 notify differ 标志设置为true
。
除非属性值与要比较的字符串的值匹配,否则要比较值的字符串后续差别不会引起更多的通知。
- 从以下版本开始:
- 1.5
字段摘要 |
---|
构造方法摘要 | |
---|---|
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.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
- 返回:
- 派生尺度时间戳。