T
- the type of the managed objectpublic class ObjectMBean<T> extends Object implements ModelMBean, MBeanRegistration
ModelMBean
wrapper implementation for a POJO.Constructor and Description |
---|
ObjectMBean(T source)
Creates a new instance with the specified POJO.
|
protected static final Logger LOGGER
public ObjectMBean(T source)
source
- The original POJOpublic static Object getSource(ObjectName oname)
oname
- The object namepublic final Object getAttribute(String fqan) throws AttributeNotFoundException, MBeanException, ReflectionException
getAttribute
in interface DynamicMBean
AttributeNotFoundException
MBeanException
ReflectionException
public final void setAttribute(Attribute attribute) throws AttributeNotFoundException, MBeanException, ReflectionException
setAttribute
in interface DynamicMBean
AttributeNotFoundException
MBeanException
ReflectionException
public final Object invoke(String name, Object[] params, String[] signature) throws MBeanException, ReflectionException
invoke
in interface DynamicMBean
MBeanException
ReflectionException
public final T getSource()
public final MBeanServer getServer()
public final ObjectName getName()
public final MBeanInfo getMBeanInfo()
getMBeanInfo
in interface DynamicMBean
public final AttributeList getAttributes(String[] names)
getAttributes
in interface DynamicMBean
public final AttributeList setAttributes(AttributeList attributes)
setAttributes
in interface DynamicMBean
public final void setManagedResource(Object resource, String type) throws InstanceNotFoundException, InvalidTargetObjectTypeException, MBeanException
setManagedResource
in interface ModelMBean
InstanceNotFoundException
InvalidTargetObjectTypeException
MBeanException
public final void setModelMBeanInfo(ModelMBeanInfo info) throws MBeanException
setModelMBeanInfo
in interface ModelMBean
MBeanException
public void addAttributeChangeNotificationListener(NotificationListener listener, String name, Object handback)
addAttributeChangeNotificationListener
in interface ModelMBeanNotificationBroadcaster
public void removeAttributeChangeNotificationListener(NotificationListener listener, String name) throws ListenerNotFoundException
removeAttributeChangeNotificationListener
in interface ModelMBeanNotificationBroadcaster
ListenerNotFoundException
public void sendAttributeChangeNotification(AttributeChangeNotification notification) throws MBeanException
sendAttributeChangeNotification
in interface ModelMBeanNotificationBroadcaster
MBeanException
public void sendAttributeChangeNotification(Attribute oldValue, Attribute newValue) throws MBeanException
sendAttributeChangeNotification
in interface ModelMBeanNotificationBroadcaster
MBeanException
public void sendNotification(Notification notification) throws MBeanException
sendNotification
in interface ModelMBeanNotificationBroadcaster
MBeanException
public void sendNotification(String message) throws MBeanException
sendNotification
in interface ModelMBeanNotificationBroadcaster
MBeanException
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException
addNotificationListener
in interface NotificationBroadcaster
IllegalArgumentException
public MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo
in interface NotificationBroadcaster
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException
removeNotificationListener
in interface NotificationBroadcaster
ListenerNotFoundException
public void load() throws InstanceNotFoundException, MBeanException, RuntimeOperationsException
load
in interface PersistentMBean
InstanceNotFoundException
MBeanException
RuntimeOperationsException
public void store() throws InstanceNotFoundException, MBeanException, RuntimeOperationsException
store
in interface PersistentMBean
InstanceNotFoundException
MBeanException
RuntimeOperationsException
public final ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
preRegister
in interface MBeanRegistration
Exception
public final void postRegister(Boolean registrationDone)
postRegister
in interface MBeanRegistration
public final void preDeregister() throws Exception
preDeregister
in interface MBeanRegistration
Exception
public final void postDeregister()
postDeregister
in interface MBeanRegistration
protected void setAttribute0(String attrName, Object attrValue) throws Exception
Exception
protected Object invoke0(String name, Object[] params, String[] signature) throws Exception
Exception
protected void addExtraAttributes(List<ModelMBeanAttributeInfo> attributes)
protected void addExtraOperations(List<ModelMBeanOperationInfo> operations)
protected PropertyEditor getPropertyEditor(Class<?> type, String attrName, Class<?> attrType)
Copyright © 2004–2022 Apache MINA Project. All rights reserved.