|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.j256.simplejmx.spring.JmxBean
public class JmxBean
With this bean, which is auto-detect by the BeanPublisher
, you can configure in Spring a JMX bean for an
object that does not use the JmxResource
annotation or JmxSelfNaming
interface.
For example:
<!-- some random bean defined in your spring files --> <bean id="someBean" class="your.domain.SomeBean"> ... </bean> <!-- publish information about that bean via JMX --> <bean id="jmxServerJmx" class="com.j256.simplejmx.spring.JmxBean"> <!-- helps build the ObjectName --> <property name="jmxResourceInfo"> <bean class="com.j256.simplejmx.common.JmxResourceInfo"> <property name="jmxDomainName" value="your.domain" /> <property name="jmxBeanName" value="SomeBean" /> </bean> </property> <!-- defines the fields that are exposed for JMX --> <property name="attributeFieldInfos"> <array> <bean class="com.j256.simplejmx.common.JmxAttributeFieldInfo"> <property name="name" value="someCounter" /> </bean> </array> </property> <!-- defines the get/is/set methods exposed --> <property name="attributeMethodInfos"> <array> <bean class="com.j256.simplejmx.common.JmxAttributeMethodInfo"> <property name="methodName" value="getSomeValue" /> </bean> </array> </property> <!-- defines the operations (i.e. non get/is/set) methods exposed --> <property name="operationInfos"> <array> <bean class="com.j256.simplejmx.common.JmxOperationInfo"> <property name="methodName" value="someMethod" /> </bean> </array> </property> <property name="target" ref="jmxServer" /> </bean>
Constructor Summary | |
---|---|
JmxBean()
|
Method Summary | |
---|---|
JmxAttributeFieldInfo[] |
getAttributeFieldInfos()
|
JmxAttributeMethodInfo[] |
getAttributeMethodInfos()
|
JmxResourceInfo |
getJmxResourceInfo()
|
JmxOperationInfo[] |
getOperationInfos()
|
Object |
getTarget()
|
void |
setAttributeFieldInfos(JmxAttributeFieldInfo[] attributeFieldInfos)
Optional setting which defines the fields to be exposed as attribute via JMX. |
void |
setAttributeMethodInfos(JmxAttributeMethodInfo[] attributeMethodInfos)
Optional setting which defines the methods (get/is/set...) to be exposed as attributes via JMX. |
void |
setJmxResourceInfo(JmxResourceInfo jmxResourceInfo)
Required resource information which helps to make the ObjectName for the bean that we are exposing via JMX. |
void |
setOperationInfos(JmxOperationInfo[] operationInfos)
Optional setting which defines the additional methods (not get/is/set...) to be exposed as operations via JMX. |
void |
setTarget(Object target)
Required target object which specifies the Spring bean that we are exposing via JMX. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JmxBean()
Method Detail |
---|
public JmxResourceInfo getJmxResourceInfo()
public void setJmxResourceInfo(JmxResourceInfo jmxResourceInfo)
public JmxAttributeFieldInfo[] getAttributeFieldInfos()
public void setAttributeFieldInfos(JmxAttributeFieldInfo[] attributeFieldInfos)
public JmxAttributeMethodInfo[] getAttributeMethodInfos()
public void setAttributeMethodInfos(JmxAttributeMethodInfo[] attributeMethodInfos)
public JmxOperationInfo[] getOperationInfos()
public void setOperationInfos(JmxOperationInfo[] operationInfos)
public Object getTarget()
public void setTarget(Object target)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |