public abstract class AbstractMBean<E> extends Object implements DynamicMBean, MBeanRegistration
refresh()
http://docs.sun.com/app/docs/doc/816-4178/6madjde4n?a=viewModifier and Type | Field and Description |
---|---|
protected static Logger |
logger |
protected ManagementService |
managementService |
protected MBeanServer |
mbeanServer |
Constructor and Description |
---|
AbstractMBean(E managedObject,
ManagementService service) |
Modifier and Type | Method and Description |
---|---|
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) |
protected static final Logger logger
protected transient MBeanServer mbeanServer
protected final ManagementService managementService
public AbstractMBean(E managedObject, ManagementService service)
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
Copyright © 2008-2013 Hazelcast, Inc. All Rights Reserved.