Class AbstractMXBean
- java.lang.Object
- 
- org.opendaylight.infrautils.utils.management.AbstractMXBean
 
- 
- Direct Known Subclasses:
- DelegatingSystemReadyMonitorMXBean
 
 public abstract class AbstractMXBean extends Object This class is inspired from the original implementation in controller.- Author:
- Thomas Pantelis, Faseela K
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringBASE_JMX_PREFIX
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractMXBean(@NonNull String mbeanName, @NonNull String mbeanType, @Nullable String mbeanCategory)Constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable StringgetMBeanCategory()Returns theCategoryproperty of the bean's ObjectName.StringgetMBeanName()Returns thenameproperty of the bean's ObjectName.StringgetMBeanType()Returns thetypeproperty of the bean's ObjectName.ObjectinvokeMBeanFunction(String functionName)invoke an mbean function with the platform MBean server.ObjectreadMBeanAttribute(String attribute)Read an mbean attribute from the platform MBean server.voidregister()This method is a wrapper for registerMBean with void return type so it can be invoked by dependency injection frameworks such as Spring and Blueprint.booleanregisterMBean()Registers this bean with the platform MBean server with the domain defined byBASE_JMX_PREFIX.voidunregister()This method is a wrapper for unregisterMBean with void return type so it can be invoked by dependency injection frameworks such as Spring and Blueprint.booleanunregisterMBean()Unregisters this bean with the platform MBean server.
 
- 
- 
- 
Field Detail- 
BASE_JMX_PREFIXpublic static final String BASE_JMX_PREFIX - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
AbstractMXBeanprotected AbstractMXBean(@NonNull String mbeanName, @NonNull String mbeanType, @Nullable String mbeanCategory) Constructor.- Parameters:
- mbeanName- Used as the- nameproperty in the bean's ObjectName.
- mbeanType- Used as the- typeproperty in the bean's ObjectName.
- mbeanCategory- Used as the- Categoryproperty in the bean's ObjectName.
 
 
- 
 - 
Method Detail- 
registerpublic void register() This method is a wrapper for registerMBean with void return type so it can be invoked by dependency injection frameworks such as Spring and Blueprint.
 - 
registerMBeanpublic final boolean registerMBean() Registers this bean with the platform MBean server with the domain defined byBASE_JMX_PREFIX.- Returns:
- true is successfully registered, false otherwise.
 
 - 
unregisterpublic void unregister() This method is a wrapper for unregisterMBean with void return type so it can be invoked by dependency injection frameworks such as Spring and Blueprint.
 - 
unregisterMBeanpublic boolean unregisterMBean() Unregisters this bean with the platform MBean server.- Returns:
- true is successfully unregistered, false otherwise.
 
 - 
invokeMBeanFunctionpublic Object invokeMBeanFunction(String functionName) invoke an mbean function with the platform MBean server.- Returns:
- Object if successfully executed, "" otherwise.
 
 - 
readMBeanAttributepublic Object readMBeanAttribute(String attribute) Read an mbean attribute from the platform MBean server.- Returns:
- Object if successfully executed, "" otherwise.
 
 - 
getMBeanNamepublic String getMBeanName() Returns thenameproperty of the bean's ObjectName.
 - 
getMBeanTypepublic String getMBeanType() Returns thetypeproperty of the bean's ObjectName.
 - 
getMBeanCategorypublic @Nullable String getMBeanCategory() Returns theCategoryproperty of the bean's ObjectName.
 
- 
 
-