bookExamples.ch35MBeans.basic
Class SimpleStandard

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by bookExamples.ch35MBeans.basic.SimpleStandard
All Implemented Interfaces:
SimpleStandardMBean, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter

public class SimpleStandard
extends javax.management.NotificationBroadcasterSupport
implements SimpleStandardMBean


Constructor Summary
SimpleStandard()
           
 
Method Summary
 int getNbChanges()
          Getter: get the "NbChanges" attribute of the "SimpleStandard" standard MBean.
 int getNbResets()
          Return the "NbResets" property.
 javax.management.MBeanNotificationInfo[] getNotificationInfo()
          Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.
 java.lang.String getState()
          Getter: get the "State" attribute of the "SimpleStandard" standard MBean.
 void reset()
          Operation: reset to their initial values the "State" and "NbChanges" attributes of the "SimpleStandard" standard MBean.
 void setState(java.lang.String s)
          Setter: set the "State" attribute of the "SimpleStandard" standard MBean.
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleStandard

public SimpleStandard()
Method Detail

getState

public java.lang.String getState()
Getter: get the "State" attribute of the "SimpleStandard" standard MBean.

Specified by:
getState in interface SimpleStandardMBean
Returns:
the current value of the "State" attribute.

setState

public void setState(java.lang.String s)
Setter: set the "State" attribute of the "SimpleStandard" standard MBean.

Specified by:
setState in interface SimpleStandardMBean
Parameters:
s - the new value of the "State" attribute.

getNbChanges

public int getNbChanges()
Getter: get the "NbChanges" attribute of the "SimpleStandard" standard MBean.

Specified by:
getNbChanges in interface SimpleStandardMBean
Returns:
the current value of the "NbChanges" attribute.

reset

public void reset()
Operation: reset to their initial values the "State" and "NbChanges" attributes of the "SimpleStandard" standard MBean.

Specified by:
reset in interface SimpleStandardMBean

getNbResets

public int getNbResets()
Return the "NbResets" property. This method is not a Getter in the JMX sense because it is not exposed in the "SimpleStandardMBean" interface.

Returns:
the current value of the "NbResets" property.

getNotificationInfo

public javax.management.MBeanNotificationInfo[] getNotificationInfo()
Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.

Specified by:
getNotificationInfo in interface javax.management.NotificationBroadcaster
Overrides:
getNotificationInfo in class javax.management.NotificationBroadcasterSupport
Returns:
the array of possible notifications.