|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hazelcast.jmx.AbstractMBean<E>
public abstract class AbstractMBean<E>
A generic class to instrument object with dynamic MBeans.
Implements the method instrument(), in which add attributes and operation exposed to JMX. If the managed object is an immutable state of some other object that requires a special refresh strategy, override methodrefresh()
http://docs.sun.com/app/docs/doc/816-4178/6madjde4n?a=view
Field Summary | |
---|---|
protected static Logger |
logger
|
protected ManagementService |
managementService
|
protected MBeanServer |
mbeanServer
|
Constructor Summary | |
---|---|
AbstractMBean(E managedObject,
ManagementService service)
|
Method Summary | |
---|---|
Object |
getAttribute(String attribute)
Local attribute override managed object attribute |
AttributeList |
getAttributes(String[] attributes)
getAttributes() in interface DynamicMBean |
E |
getManagedObject()
|
MBeanInfo |
getMBeanInfo()
From DynamicMBean interface |
protected ObjectNameSpec |
getNameSpec()
Override to provide a JMX name |
ObjectName |
getObjectName()
The current objectName. |
ObjectNameSpec |
getParentName()
|
Object |
invoke(String actionName,
Object[] params,
String[] signature)
invoke() in interface DynamicMBean |
void |
postDeregister()
From interface MBeanRegistration |
void |
postRegister(Boolean registrationDone)
From interface MBeanRegistration |
void |
preDeregister()
From interface MBeanRegistration |
ObjectName |
preRegister(MBeanServer server,
ObjectName name)
From interface MBeanRegistration |
protected E |
refresh()
Override this method if the managed object requires some refresh before reading. |
void |
setAttribute(Attribute attribute)
|
AttributeList |
setAttributes(AttributeList attributes)
|
void |
setParentName(ObjectNameSpec spec)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Logger logger
protected transient MBeanServer mbeanServer
protected final ManagementService managementService
Constructor Detail |
---|
public AbstractMBean(E managedObject, ManagementService service)
Method Detail |
---|
public final E getManagedObject()
protected E refresh()
public MBeanInfo getMBeanInfo()
getMBeanInfo
in interface DynamicMBean
public final Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException
getAttribute
in interface DynamicMBean
AttributeNotFoundException
MBeanException
ReflectionException
public final AttributeList getAttributes(String[] attributes)
getAttributes
in interface DynamicMBean
attributes
- A String array of names of the attributes to be retrieved.
RuntimeOperationsException
- Wraps an
IllegalArgumentException
: The object name in parameter is
null or attributes in parameter is null.public final Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException
invoke
in interface DynamicMBean
MBeanException
ReflectionException
public final void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
setAttribute
in interface DynamicMBean
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException
public final AttributeList setAttributes(AttributeList attributes)
setAttributes
in interface DynamicMBean
public void setParentName(ObjectNameSpec spec)
public ObjectNameSpec getParentName()
protected ObjectNameSpec getNameSpec()
public final ObjectName getObjectName() throws Exception
Exception
public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
MBeanRegistration
preRegister
in interface MBeanRegistration
Exception
public void postRegister(Boolean registrationDone)
MBeanRegistration
postRegister
in interface MBeanRegistration
public void preDeregister() throws Exception
MBeanRegistration
preDeregister
in interface MBeanRegistration
Exception
public void postDeregister()
MBeanRegistration
postDeregister
in interface MBeanRegistration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |