bookExamples.ch35MBeans.basic
Interface SimpleStandardMBean

All Known Implementing Classes:
SimpleStandard

public interface SimpleStandardMBean

This is the management interface explicitly defined for the "SimpleStandard" standard MBean. The "SimpleStandard" standard MBean implements this interface in order to be manageable through a JMX agent. The "SimpleStandardMBean" interface shows how to expose for management: - a read/write attribute (named "State") through its getter and setter methods, - a read-only attribute (named "NbChanges") through its getter method, - an operation (named "reset").


Method Summary
 int getNbChanges()
          Getter: get the "NbChanges" attribute of the "SimpleStandard" standard MBean.
 java.lang.String getState()
          Getter: set 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.
 

Method Detail

getState

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

Returns:
the current value of the "State" attribute.

setState

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

Parameters:
s - the new value of the "State" attribute.

getNbChanges

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

Returns:
the current value of the "NbChanges" attribute.

reset

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