|
MySnmpCrawler API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.management.NotificationBroadcasterSupport | +--snmp.mbean.GenericMBean
The GenericMBean class is the super class to all MBean subclasses. It stores the information about the ObjectName, MBeanMeta, and NotificationFilter for the MBean objects. It sends out the notification to the registered listeners when the MBean attribute is updated.
Nested Class Summary |
Nested classes inherited from class javax.management.NotificationBroadcasterSupport |
|
Field Summary | |
private java.lang.String |
mbeanClassName
|
private MBeanMeta |
mbeanMeta
|
private long |
noficationSeqNo
|
private javax.management.ObjectName |
objectName
|
Fields inherited from class javax.management.NotificationBroadcasterSupport |
|
Constructor Summary | |
protected |
GenericMBean()
Constructs the GenericMBean object by using the DefaultMBeanMeta class which provides the getter and setter methods to access the MBean attributes. |
protected |
GenericMBean(MBeanMeta mbeanMeta,
MBeanListener listener,
javax.management.NotificationFilter filter)
Constructs the GenericMMBean object with the passed MBeanMeta object and the notification listener. |
Method Summary | |
void |
addNotificationListener(MBeanListener listener,
javax.management.NotificationFilter filter)
Adds a listener. |
(package private) static GenericMBean |
createMBean(java.lang.String mbeanClassName)
Creates the MBean object dynamically with the passed class name. |
private javax.management.AttributeChangeNotification |
getAttributeChangeNotification(java.lang.String attr,
java.lang.Object oldVal,
java.lang.Object newVal)
|
java.lang.String |
getMBeanClassName()
Gets the class name of the MBean. |
MBeanMeta |
getMBeanMeta()
Gets the MBeanMeta object of the MBean. |
javax.management.ObjectName |
getMBeanObjectName()
Gets the ObjectName that maps the MBean in the JMX server. |
private static void |
loadMBean(GenericMBean mbean)
Loads the MBean object into the JMX MBean server. |
protected void |
sendAttrChangeNotification(java.lang.String attr,
java.lang.Object oldVal,
java.lang.Object newVal)
Sends the attribute-change-notification to the registered listeners. |
private void |
setup(MBeanMeta mbeanMeta)
|
Methods inherited from class javax.management.NotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private long noficationSeqNo
private java.lang.String mbeanClassName
private javax.management.ObjectName objectName
private MBeanMeta mbeanMeta
Constructor Detail |
protected GenericMBean() throws SnmpException
SnmpException
- Thrown when any error occurs during the object
intantiation.protected GenericMBean(MBeanMeta mbeanMeta, MBeanListener listener, javax.management.NotificationFilter filter) throws SnmpException
mbeanMeta
- The MBeanMeta object provides the mechanism
to get and set the MBean attribute.listener
- The listener to receive notifications.filter
- The filter object to filter notifications.
SnmpException
- Thrown when any error occurs during the object
intantiation.Method Detail |
public void addNotificationListener(MBeanListener listener, javax.management.NotificationFilter filter)
listener
- The listener to receive notifications.filter
- The filter object to filter notifications.public java.lang.String getMBeanClassName()
public javax.management.ObjectName getMBeanObjectName() throws SnmpException
SnmpException
- Thrown when ObjectName instance cannot be created
correctly.public MBeanMeta getMBeanMeta()
protected void sendAttrChangeNotification(java.lang.String attr, java.lang.Object oldVal, java.lang.Object newVal)
attr
- The attribute name.oldVal
- The old value of the attribute.newVal
- The new value of the attribute.private javax.management.AttributeChangeNotification getAttributeChangeNotification(java.lang.String attr, java.lang.Object oldVal, java.lang.Object newVal)
private void setup(MBeanMeta mbeanMeta) throws SnmpException
SnmpException
static GenericMBean createMBean(java.lang.String mbeanClassName) throws SnmpException
mbeanClassName
- The MBean class anme.
SnmpException
- Thrown when GenericMBean cannot be
created correctly.private static void loadMBean(GenericMBean mbean) throws SnmpException
mbean
- The MBean to be loaded.
SnmpException
- Thrown when any error occurs during the
loading.
|
MySnmpCrawler API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |