|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.management.NotificationBroadcasterSupport
org.apache.felix.ipojo.handlers.jmx.DynamicMBeanImpl
public class DynamicMBeanImpl
This class implements iPOJO DynamicMBean. it builds the dynamic MBean
Field Summary | |
---|---|
protected InstanceManager |
m_instanceManager
The instance manager. |
Constructor Summary | |
---|---|
DynamicMBeanImpl(JmxConfigFieldMap properties,
InstanceManager instanceManager)
Constructor. |
Method Summary | |
---|---|
Object |
getAttribute(String arg0)
Gets the value of the required attribute. |
AttributeList |
getAttributes(String[] attributeNames)
Gets values of required attributes. |
MBeanInfo |
getMBeanInfo()
Returns the MBean Class builded. |
MBeanNotificationInfo[] |
getNotificationInfo()
Gets the notification informations (use by JMX). |
Object |
invoke(String operationName,
Object[] params,
String[] signature)
Invokes the required method on the targeted POJO. |
void |
sendNotification(String msg,
String attributeName,
String attributeType,
Object oldValue,
Object newValue)
Sends a notification to a subscriber. |
void |
setAttribute(Attribute attribute)
Changes specified attribute value. |
AttributeList |
setAttributes(AttributeList attributes)
Changes all the attributes value. |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
---|
addNotificationListener, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final InstanceManager m_instanceManager
Constructor Detail |
---|
public DynamicMBeanImpl(JmxConfigFieldMap properties, InstanceManager instanceManager)
properties
- the data extracted from metadat.xml fileinstanceManager
- the InstanceManager instanceMethod Detail |
---|
public Object getAttribute(String arg0) throws AttributeNotFoundException, MBeanException, ReflectionException
getAttribute
in interface DynamicMBean
arg0
- the name of required attribute
AttributeNotFoundException
- if the attribute doesn't exist
MBeanException
- if something bad occures
ReflectionException
- if something bad occurespublic AttributeList getAttributes(String[] attributeNames)
getAttributes
in interface DynamicMBean
attributeNames
- the names of the required attributes
public MBeanInfo getMBeanInfo()
getMBeanInfo
in interface DynamicMBean
public Object invoke(String operationName, Object[] params, String[] signature) throws MBeanException, ReflectionException
invoke
in interface DynamicMBean
operationName
- the name of the method calledparams
- the parameters given to the methodsignature
- the determine which method called
MBeanException
- if something bad occures
ReflectionException
- if something bad occurespublic void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
setAttribute
in interface DynamicMBean
attribute
- the attribute with new value to be changed
AttributeNotFoundException
- if the required attribute was not found
InvalidAttributeValueException
- if the value is inccorrect type
MBeanException
- if something bad occures
ReflectionException
- if something bad occurespublic AttributeList setAttributes(AttributeList attributes)
setAttributes
in interface DynamicMBean
attributes
- the list of attribute value to be changed
public MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo
in interface NotificationBroadcaster
getNotificationInfo
in class NotificationBroadcasterSupport
public void sendNotification(String msg, String attributeName, String attributeType, Object oldValue, Object newValue)
msg
- the msg to sendattributeName
- the name of the attributeattributeType
- the type of the attributeoldValue
- the old value of the attributenewValue
- the new value of the attribute
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |