org.jboss.cache.jmx
Class ResourceDMBean

java.lang.Object
  extended by org.jboss.cache.jmx.ResourceDMBean
All Implemented Interfaces:
DynamicMBean

public class ResourceDMBean
extends Object
implements DynamicMBean

This class was entirely copied from jgroups 2.7 (same name there). Couldn't simply reuse it because jgroups does not ship with MBean, ManagedAttribute and ManagedOperation. Once jgroups will ship these classes, the code can be dinalmically reused from there.

Since:
3.0
Author:
Mircea.Markus@jboss.com

Constructor Summary
ResourceDMBean(Object instance)
           
 
Method Summary
 Object getAttribute(String name)
           
 AttributeList getAttributes(String[] names)
           
static Class<?> getClassForName(String name)
           
 MBeanInfo getMBeanInfo()
           
 String getObjectName()
           
 Object invoke(String name, Object[] args, String[] sig)
           
 boolean isManagedResource()
           
 boolean isOperationRegistred(String operationName)
           
 void setAttribute(Attribute attribute)
           
 AttributeList setAttributes(AttributeList list)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceDMBean

public ResourceDMBean(Object instance)
Method Detail

getMBeanInfo

public MBeanInfo getMBeanInfo()
Specified by:
getMBeanInfo in interface DynamicMBean

getAttribute

public Object getAttribute(String name)
Specified by:
getAttribute in interface DynamicMBean

setAttribute

public void setAttribute(Attribute attribute)
Specified by:
setAttribute in interface DynamicMBean

getAttributes

public AttributeList getAttributes(String[] names)
Specified by:
getAttributes in interface DynamicMBean

setAttributes

public AttributeList setAttributes(AttributeList list)
Specified by:
setAttributes in interface DynamicMBean

invoke

public Object invoke(String name,
                     Object[] args,
                     String[] sig)
              throws MBeanException,
                     ReflectionException
Specified by:
invoke in interface DynamicMBean
Throws:
MBeanException
ReflectionException

getClassForName

public static Class<?> getClassForName(String name)
                                throws ClassNotFoundException
Throws:
ClassNotFoundException

isManagedResource

public boolean isManagedResource()

getObjectName

public String getObjectName()

isOperationRegistred

public boolean isOperationRegistred(String operationName)


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.