Package org.weakref.jmx.testing
Class TestingMBeanServer
java.lang.Object
org.weakref.jmx.testing.TestingMBeanServer
- All Implemented Interfaces:
MBeanServer,MBeanServerConnection
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) voidaddNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) createMBean(String className, ObjectName name) createMBean(String className, ObjectName name, Object[] params, String[] signature) createMBean(String className, ObjectName name, ObjectName loaderName) createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) deserialize(String className, byte[] data) deserialize(String className, ObjectName loaderName, byte[] data) deserialize(ObjectName name, byte[] data) getAttribute(ObjectName name, String attribute) getAttributes(ObjectName name, String[] attributes) getClassLoader(ObjectName loaderName) getClassLoaderFor(ObjectName mbeanName) String[]getMBeanInfo(ObjectName name) getObjectInstance(ObjectName name) instantiate(String className) instantiate(String className, Object[] params, String[] signature) instantiate(String className, ObjectName loaderName) instantiate(String className, ObjectName loaderName, Object[] params, String[] signature) invoke(ObjectName name, String operationName, Object[] params, String[] signature) booleanisInstanceOf(ObjectName name, String className) booleanisRegistered(ObjectName name) queryMBeans(ObjectName name, QueryExp query) queryNames(ObjectName name, QueryExp query) registerMBean(Object object, ObjectName name) voidremoveNotificationListener(ObjectName name, NotificationListener listener) voidremoveNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) voidremoveNotificationListener(ObjectName name, ObjectName listener) voidremoveNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) voidsetAttribute(ObjectName name, Attribute attribute) setAttributes(ObjectName name, AttributeList attributes) voidunregisterMBean(ObjectName name)
-
Constructor Details
-
TestingMBeanServer
public TestingMBeanServer()
-
-
Method Details
-
registerMBean
public ObjectInstance registerMBean(Object object, ObjectName name) throws InstanceAlreadyExistsException - Specified by:
registerMBeanin interfaceMBeanServer- Throws:
InstanceAlreadyExistsException
-
unregisterMBean
- Specified by:
unregisterMBeanin interfaceMBeanServer- Specified by:
unregisterMBeanin interfaceMBeanServerConnection- Throws:
InstanceNotFoundException
-
getObjectInstance
- Specified by:
getObjectInstancein interfaceMBeanServer- Specified by:
getObjectInstancein interfaceMBeanServerConnection- Throws:
InstanceNotFoundException
-
queryNames
- Specified by:
queryNamesin interfaceMBeanServer- Specified by:
queryNamesin interfaceMBeanServerConnection
-
getAttribute
public Object getAttribute(ObjectName name, String attribute) throws InstanceNotFoundException, AttributeNotFoundException, ReflectionException, MBeanException - Specified by:
getAttributein interfaceMBeanServer- Specified by:
getAttributein interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionAttributeNotFoundExceptionReflectionExceptionMBeanException
-
getAttributes
public AttributeList getAttributes(ObjectName name, String[] attributes) throws InstanceNotFoundException - Specified by:
getAttributesin interfaceMBeanServer- Specified by:
getAttributesin interfaceMBeanServerConnection- Throws:
InstanceNotFoundException
-
isRegistered
- Specified by:
isRegisteredin interfaceMBeanServer- Specified by:
isRegisteredin interfaceMBeanServerConnection
-
getMBeanCount
- Specified by:
getMBeanCountin interfaceMBeanServer- Specified by:
getMBeanCountin interfaceMBeanServerConnection
-
setAttribute
public void setAttribute(ObjectName name, Attribute attribute) throws InstanceNotFoundException, InvalidAttributeValueException, AttributeNotFoundException, ReflectionException, MBeanException - Specified by:
setAttributein interfaceMBeanServer- Specified by:
setAttributein interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionInvalidAttributeValueExceptionAttributeNotFoundExceptionReflectionExceptionMBeanException
-
setAttributes
public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws InstanceNotFoundException - Specified by:
setAttributesin interfaceMBeanServer- Specified by:
setAttributesin interfaceMBeanServerConnection- Throws:
InstanceNotFoundException
-
invoke
public Object invoke(ObjectName name, String operationName, Object[] params, String[] signature) throws InstanceNotFoundException, ReflectionException, MBeanException - Specified by:
invokein interfaceMBeanServer- Specified by:
invokein interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionReflectionExceptionMBeanException
-
getMBeanInfo
- Specified by:
getMBeanInfoin interfaceMBeanServer- Specified by:
getMBeanInfoin interfaceMBeanServerConnection- Throws:
InstanceNotFoundException
-
createMBean
- Specified by:
createMBeanin interfaceMBeanServer- Specified by:
createMBeanin interfaceMBeanServerConnection
-
createMBean
- Specified by:
createMBeanin interfaceMBeanServer- Specified by:
createMBeanin interfaceMBeanServerConnection
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name, Object[] params, String[] signature) - Specified by:
createMBeanin interfaceMBeanServer- Specified by:
createMBeanin interfaceMBeanServerConnection
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) - Specified by:
createMBeanin interfaceMBeanServer- Specified by:
createMBeanin interfaceMBeanServerConnection
-
queryMBeans
- Specified by:
queryMBeansin interfaceMBeanServer- Specified by:
queryMBeansin interfaceMBeanServerConnection
-
getDefaultDomain
- Specified by:
getDefaultDomainin interfaceMBeanServer- Specified by:
getDefaultDomainin interfaceMBeanServerConnection
-
getDomains
- Specified by:
getDomainsin interfaceMBeanServer- Specified by:
getDomainsin interfaceMBeanServerConnection
-
addNotificationListener
public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) - Specified by:
addNotificationListenerin interfaceMBeanServer- Specified by:
addNotificationListenerin interfaceMBeanServerConnection
-
addNotificationListener
public void addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) - Specified by:
addNotificationListenerin interfaceMBeanServer- Specified by:
addNotificationListenerin interfaceMBeanServerConnection
-
removeNotificationListener
- Specified by:
removeNotificationListenerin interfaceMBeanServer- Specified by:
removeNotificationListenerin interfaceMBeanServerConnection
-
removeNotificationListener
public void removeNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) - Specified by:
removeNotificationListenerin interfaceMBeanServer- Specified by:
removeNotificationListenerin interfaceMBeanServerConnection
-
removeNotificationListener
- Specified by:
removeNotificationListenerin interfaceMBeanServer- Specified by:
removeNotificationListenerin interfaceMBeanServerConnection
-
removeNotificationListener
public void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) - Specified by:
removeNotificationListenerin interfaceMBeanServer- Specified by:
removeNotificationListenerin interfaceMBeanServerConnection
-
isInstanceOf
- Specified by:
isInstanceOfin interfaceMBeanServer- Specified by:
isInstanceOfin interfaceMBeanServerConnection- Throws:
InstanceNotFoundException
-
instantiate
- Specified by:
instantiatein interfaceMBeanServer- Throws:
ReflectionExceptionMBeanException
-
instantiate
public Object instantiate(String className, ObjectName loaderName) throws ReflectionException, MBeanException, InstanceNotFoundException - Specified by:
instantiatein interfaceMBeanServer- Throws:
ReflectionExceptionMBeanExceptionInstanceNotFoundException
-
instantiate
public Object instantiate(String className, Object[] params, String[] signature) throws ReflectionException, MBeanException - Specified by:
instantiatein interfaceMBeanServer- Throws:
ReflectionExceptionMBeanException
-
instantiate
public Object instantiate(String className, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, MBeanException, InstanceNotFoundException - Specified by:
instantiatein interfaceMBeanServer- Throws:
ReflectionExceptionMBeanExceptionInstanceNotFoundException
-
deserialize
- Specified by:
deserializein interfaceMBeanServer
-
deserialize
- Specified by:
deserializein interfaceMBeanServer
-
deserialize
- Specified by:
deserializein interfaceMBeanServer
-
getClassLoaderFor
- Specified by:
getClassLoaderForin interfaceMBeanServer
-
getClassLoader
- Specified by:
getClassLoaderin interfaceMBeanServer
-
getClassLoaderRepository
- Specified by:
getClassLoaderRepositoryin interfaceMBeanServer
-