public class MX4JMBeanServer
extends java.lang.Object
implements javax.management.MBeanServer
MBeanRepository
classes.
This class acts as a factory for MBeanRepository instances, that can be controlled via the system property
MX4JSystemKeys.MX4J_MBEANSERVER_REPOSITORY
to the qualified name of the implementation class. MBeanServerInterceptorConfigurator
.
When the call is about to arrive to the MBean instance, the last interceptor dispatches the call depending on
the MBean type: if the MBean is a dynamic MBean, the call is dispatched directly; if the MBean is a standard
MBean an MBeanInvoker
is delegated to invoke on the MBean instance.Constructor and Description |
---|
MX4JMBeanServer(java.lang.String defaultDomain,
javax.management.MBeanServer outer,
javax.management.MBeanServerDelegate delegate)
Create a new MBeanServer implementation with the specified default domain.
|
Modifier and Type | Method and Description |
---|---|
void |
addNotificationListener(javax.management.ObjectName observed,
javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Adds a NotificationListener to a registered MBean.
|
void |
addNotificationListener(javax.management.ObjectName observed,
javax.management.ObjectName listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Adds a NotificationListener to a registered MBean.
|
javax.management.ObjectInstance |
createMBean(java.lang.String className,
javax.management.ObjectName objectName)
A facility method for
createMBean(className, objectName, null, null) . |
javax.management.ObjectInstance |
createMBean(java.lang.String className,
javax.management.ObjectName objectName,
java.lang.Object[] args,
java.lang.String[] parameters)
Instantiates and registers an MBean of the specified class with the given ObjectName in the MBeanServer.
|
javax.management.ObjectInstance |
createMBean(java.lang.String className,
javax.management.ObjectName objectName,
javax.management.ObjectName loaderName)
A facility method for
createMBean(className, objectName, loaderName, null, null) . |
javax.management.ObjectInstance |
createMBean(java.lang.String className,
javax.management.ObjectName objectName,
javax.management.ObjectName loaderName,
java.lang.Object[] args,
java.lang.String[] parameters)
Instantiates and registers an MBean of the specified class with the given ObjectName in the MBeanServer.
|
java.io.ObjectInputStream |
deserialize(javax.management.ObjectName objectName,
byte[] bytes) |
java.io.ObjectInputStream |
deserialize(java.lang.String className,
byte[] bytes) |
java.io.ObjectInputStream |
deserialize(java.lang.String className,
javax.management.ObjectName loaderName,
byte[] bytes) |
java.lang.Object |
getAttribute(javax.management.ObjectName objectName,
java.lang.String attribute)
Gets the value of the specified attribute of the named MBean.
|
javax.management.AttributeList |
getAttributes(javax.management.ObjectName objectName,
java.lang.String[] attributes)
Gets the values of several attributes of the named MBean.
|
java.lang.ClassLoader |
getClassLoader(javax.management.ObjectName name)
Returns the named classloader MBean.
|
java.lang.ClassLoader |
getClassLoaderFor(javax.management.ObjectName name)
Returns the ClassLoader that was used for loading the named MBean.
|
javax.management.loading.ClassLoaderRepository |
getClassLoaderRepository()
Returns the ClassLoaderRepository for this MBeanServer.
|
java.lang.String |
getDefaultDomain()
Returns the default domain for this MBeanServer used in case ObjectName domain are not specified.
|
java.lang.String[] |
getDomains()
Returns the list of different ObjectName domains under which the MBeans in this MBeanServer are registered.
|
java.lang.Integer |
getMBeanCount()
Returns the number of MBeans registered in this MBeanServer.
|
javax.management.MBeanInfo |
getMBeanInfo(javax.management.ObjectName objectName)
Returns the metadata information exposed for management about the named MBean.
|
javax.management.ObjectInstance |
getObjectInstance(javax.management.ObjectName objectName)
Gets the ObjectInstance for the named MBean registered with the MBeanServer.
|
java.lang.Object |
instantiate(java.lang.String className)
Instantiates an object of the given class using the MBeanServer's
ClassLoaderRepository . |
java.lang.Object |
instantiate(java.lang.String className,
java.lang.Object[] args,
java.lang.String[] parameters)
Instantiates an object of the given class using the MBeanServer's
ClassLoaderRepository . |
java.lang.Object |
instantiate(java.lang.String className,
javax.management.ObjectName loaderName)
Instantiates an object of the given class using the specified ClassLoader MBean.
|
java.lang.Object |
instantiate(java.lang.String className,
javax.management.ObjectName loaderName,
java.lang.Object[] args,
java.lang.String[] parameters)
Instantiates an object of the given class using the specified ClassLoader MBean.
|
java.lang.Object |
invoke(javax.management.ObjectName objectName,
java.lang.String methodName,
java.lang.Object[] args,
java.lang.String[] parameters)
Invokes the specified operation on the named MBean.
|
boolean |
isInstanceOf(javax.management.ObjectName objectName,
java.lang.String className)
Returns whether the MBean specified is an instance of the specified class.
|
boolean |
isRegistered(javax.management.ObjectName objectName)
Checks whether the given ObjectName identifies an MBean registered in this MBeanServer.
|
java.util.Set |
queryMBeans(javax.management.ObjectName patternName,
javax.management.QueryExp filter)
Gets a subset of the ObjectInstances belonging to MBeans registered in this MBeanServer.
|
java.util.Set |
queryNames(javax.management.ObjectName patternName,
javax.management.QueryExp filter)
Gets a subset of the ObjectNames belonging to MBeans registered in this MBeanServer.
|
javax.management.ObjectInstance |
registerMBean(java.lang.Object mbean,
javax.management.ObjectName objectName)
Registers the given MBean with the given ObjectName.
|
void |
removeNotificationListener(javax.management.ObjectName observed,
javax.management.NotificationListener listener)
Removes the specified listener from the named source MBean.
|
void |
removeNotificationListener(javax.management.ObjectName observed,
javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Removes the specified listener from the named source MBean.
|
void |
removeNotificationListener(javax.management.ObjectName observed,
javax.management.ObjectName listener)
Removes the specified listener MBean from the named source MBean.
|
void |
removeNotificationListener(javax.management.ObjectName observed,
javax.management.ObjectName listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Removes the specified listener MBean from the named source MBean.
|
void |
setAttribute(javax.management.ObjectName objectName,
javax.management.Attribute attribute)
Sets the value of the specified attribute of the named MBean.
|
javax.management.AttributeList |
setAttributes(javax.management.ObjectName objectName,
javax.management.AttributeList attributes)
Sets the values of several attributes of the named MBean.
|
void |
unregisterMBean(javax.management.ObjectName objectName)
Unregisters the MBean with the specified ObjectName from this MBeanServer.
|
public MX4JMBeanServer(java.lang.String defaultDomain, javax.management.MBeanServer outer, javax.management.MBeanServerDelegate delegate)
defaultDomain
- The default domain to be usedjava.lang.SecurityException
- if access is not granted to create an MBeanServer instancepublic javax.management.loading.ClassLoaderRepository getClassLoaderRepository()
MX4JSystemKeys.MX4J_MBEANSERVER_CLASSLOADER_REPOSITORY
is tested;
if it is non-null and defines a subclass of
ModifiableClassLoaderRepository
, then that class is used instead of the default one.getClassLoaderRepository
in interface javax.management.MBeanServer
public java.lang.ClassLoader getClassLoader(javax.management.ObjectName name) throws javax.management.InstanceNotFoundException
javax.management.MBeanServer
loaderName
is null, the classloader
of the MBeanServer will be used.getClassLoader
in interface javax.management.MBeanServer
name
- The ObjectName of the classloader MBean, or null.javax.management.InstanceNotFoundException
- If the named classloader MBean is not found.public java.lang.ClassLoader getClassLoaderFor(javax.management.ObjectName name) throws javax.management.InstanceNotFoundException
javax.management.MBeanServer
getClassLoaderFor
in interface javax.management.MBeanServer
name
- The ObjectName of the MBean.javax.management.InstanceNotFoundException
- If the named MBean is not found.public java.io.ObjectInputStream deserialize(java.lang.String className, javax.management.ObjectName loaderName, byte[] bytes) throws javax.management.InstanceNotFoundException, javax.management.OperationsException, javax.management.ReflectionException
deserialize
in interface javax.management.MBeanServer
javax.management.InstanceNotFoundException
javax.management.OperationsException
javax.management.ReflectionException
public java.io.ObjectInputStream deserialize(java.lang.String className, byte[] bytes) throws javax.management.OperationsException, javax.management.ReflectionException
deserialize
in interface javax.management.MBeanServer
javax.management.OperationsException
javax.management.ReflectionException
public java.io.ObjectInputStream deserialize(javax.management.ObjectName objectName, byte[] bytes) throws javax.management.InstanceNotFoundException, javax.management.OperationsException
deserialize
in interface javax.management.MBeanServer
javax.management.InstanceNotFoundException
javax.management.OperationsException
public void addNotificationListener(javax.management.ObjectName observed, javax.management.ObjectName listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws javax.management.InstanceNotFoundException
javax.management.MBeanServerConnection
addNotificationListener
in interface javax.management.MBeanServer
addNotificationListener
in interface javax.management.MBeanServerConnection
observed
- The ObjectName of the source MBean on which the listener should be added.listener
- The ObjectName of the listener MBean which will handle the notifications emitted by the source MBean.filter
- The filter which will allow the notification to be forwarded to the listener.handback
- The context to be sent to the listener when a notification is emitted.javax.management.InstanceNotFoundException
- If the source or listener MBean are not registered in the MBeanServer.MBeanServerConnection.removeNotificationListener(ObjectName, ObjectName, NotificationFilter, Object)
public void addNotificationListener(javax.management.ObjectName observed, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws javax.management.InstanceNotFoundException
javax.management.MBeanServerConnection
addNotificationListener
in interface javax.management.MBeanServer
addNotificationListener
in interface javax.management.MBeanServerConnection
observed
- The ObjectName of the source MBean on which the listener should be added.listener
- The listener which will handle the notifications emitted by the source MBean.filter
- The filter which will allow the notification to be forwarded to the listener.handback
- The context to be sent to the listener when a notification is emitted.javax.management.InstanceNotFoundException
- If the source MBean is not registered in the MBeanServer.MBeanServerConnection.removeNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)
public void removeNotificationListener(javax.management.ObjectName observed, javax.management.ObjectName listener) throws javax.management.InstanceNotFoundException, javax.management.ListenerNotFoundException
javax.management.MBeanServerConnection
removeNotificationListener
in interface javax.management.MBeanServer
removeNotificationListener
in interface javax.management.MBeanServerConnection
observed
- The ObjectName of the source MBean on which the listener should be removed.listener
- The ObjectName of the listener MBean to be removed.javax.management.InstanceNotFoundException
- If the source or listener MBean are not registered in the MBeanServer.javax.management.ListenerNotFoundException
- The listener is not registered in the MBean.MBeanServerConnection.addNotificationListener(ObjectName, ObjectName, NotificationFilter, Object)
public void removeNotificationListener(javax.management.ObjectName observed, javax.management.NotificationListener listener) throws javax.management.InstanceNotFoundException, javax.management.ListenerNotFoundException
javax.management.MBeanServerConnection
removeNotificationListener
in interface javax.management.MBeanServer
removeNotificationListener
in interface javax.management.MBeanServerConnection
observed
- The ObjectName of the source MBean on which the listener should be removed.listener
- The listener to be removed.javax.management.InstanceNotFoundException
- If the source MBean is not registered in the MBeanServer.javax.management.ListenerNotFoundException
- If the listener is not registered in the MBean.MBeanServerConnection.addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)
public void removeNotificationListener(javax.management.ObjectName observed, javax.management.ObjectName listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws javax.management.InstanceNotFoundException, javax.management.ListenerNotFoundException
javax.management.MBeanServerConnection
removeNotificationListener
in interface javax.management.MBeanServer
removeNotificationListener
in interface javax.management.MBeanServerConnection
observed
- The ObjectName of the source MBean on which the listener should be removed.listener
- The ObjectName of the listener MBean to be removed.filter
- The filter that was specified when the listener was added.handback
- The handback that was specified when the listener was added.javax.management.InstanceNotFoundException
- If the source MBean is not registered in the MBeanServer.javax.management.ListenerNotFoundException
- If the listener (along with filter and handback) is not registered in the MBean.MBeanServerConnection.addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)
public void removeNotificationListener(javax.management.ObjectName observed, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws javax.management.InstanceNotFoundException, javax.management.ListenerNotFoundException
javax.management.MBeanServerConnection
removeNotificationListener
in interface javax.management.MBeanServer
removeNotificationListener
in interface javax.management.MBeanServerConnection
observed
- The ObjectName of the source MBean on which the listener should be removed.listener
- The listener to be removed.filter
- The filter that was specified when the listener was added.handback
- The handback that was specified when the listener was added.javax.management.InstanceNotFoundException
- If the source MBean is not registered in the MBeanServer.javax.management.ListenerNotFoundException
- If the listener (along with filter and handback) is not registered in the MBean.MBeanServerConnection.addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)
public java.lang.Object instantiate(java.lang.String className) throws javax.management.ReflectionException, javax.management.MBeanException
javax.management.MBeanServer
ClassLoaderRepository
.
The given class should have a public parameterless constructor.instantiate
in interface javax.management.MBeanServer
className
- The class name of the object to be instantiated.javax.management.ReflectionException
- Wraps a Java reflection exception thrown while trying to create the instancejavax.management.MBeanException
- Thrown if the constructor of the object throws an exceptionpublic java.lang.Object instantiate(java.lang.String className, java.lang.Object[] args, java.lang.String[] parameters) throws javax.management.ReflectionException, javax.management.MBeanException
javax.management.MBeanServer
ClassLoaderRepository
.
The given class should have a public constructor matching the given signature, and will be called
passing the given arguments.instantiate
in interface javax.management.MBeanServer
className
- The class name of the object to be instantiated.args
- The arguments passed to the constructor.parameters
- The signature of the constructor.javax.management.ReflectionException
- Wraps a Java reflection exception thrown while trying to create the instancejavax.management.MBeanException
- Thrown if the constructor of the object throws an exceptionpublic java.lang.Object instantiate(java.lang.String className, javax.management.ObjectName loaderName) throws javax.management.ReflectionException, javax.management.MBeanException, javax.management.InstanceNotFoundException
javax.management.MBeanServer
loaderName
is null, the classloader of the MBeanServer will be used.
The given class should have a public parameterless constructor.instantiate
in interface javax.management.MBeanServer
className
- The class name of the MBean to be instantiated.loaderName
- The object name of the class loader to be used.javax.management.ReflectionException
- Wraps a Java reflection exception thrown while trying to create the instancejavax.management.MBeanException
- Thrown if the constructor of the object throws an exceptionjavax.management.InstanceNotFoundException
- The specified classloader MBean is not registered in the MBeanServer.public java.lang.Object instantiate(java.lang.String className, javax.management.ObjectName loaderName, java.lang.Object[] args, java.lang.String[] parameters) throws javax.management.ReflectionException, javax.management.MBeanException, javax.management.InstanceNotFoundException
javax.management.MBeanServer
loaderName
is null, the classloader of the MBeanServer will be used.
The given class should have a public constructor matching the given signature, and will be called
passing the given arguments.instantiate
in interface javax.management.MBeanServer
className
- The class name of the MBean to be instantiated.loaderName
- The object name of the class loader to be used.args
- The arguments passed to the constructor.parameters
- The signature of the constructor.javax.management.ReflectionException
- Wraps a Java reflection exception thrown while trying to create the instancejavax.management.MBeanException
- Thrown if the constructor of the object throws an exceptionjavax.management.InstanceNotFoundException
- The specified classloader MBean is not registered in the MBeanServer.public javax.management.ObjectInstance createMBean(java.lang.String className, javax.management.ObjectName objectName) throws javax.management.ReflectionException, javax.management.InstanceAlreadyExistsException, javax.management.MBeanRegistrationException, javax.management.MBeanException, javax.management.NotCompliantMBeanException
javax.management.MBeanServerConnection
createMBean(className, objectName, null, null)
.createMBean
in interface javax.management.MBeanServer
createMBean
in interface javax.management.MBeanServerConnection
javax.management.ReflectionException
javax.management.InstanceAlreadyExistsException
javax.management.MBeanRegistrationException
javax.management.MBeanException
javax.management.NotCompliantMBeanException
MBeanServerConnection.createMBean(String, ObjectName, Object[], String[])
public javax.management.ObjectInstance createMBean(java.lang.String className, javax.management.ObjectName objectName, java.lang.Object[] args, java.lang.String[] parameters) throws javax.management.ReflectionException, javax.management.InstanceAlreadyExistsException, javax.management.MBeanRegistrationException, javax.management.MBeanException, javax.management.NotCompliantMBeanException
javax.management.MBeanServerConnection
MBeanRegistration
createMBean
in interface javax.management.MBeanServer
createMBean
in interface javax.management.MBeanServerConnection
className
- The class name of the MBean to be instantiated.objectName
- The ObjectName of the MBean, may be null.args
- An array containing the arguments to pass to the constructor.parameters
- An array containing the signature of the constructor.javax.management.ReflectionException
- If a reflection exception is thrown.javax.management.InstanceAlreadyExistsException
- If another MBean with the same ObjectName is already registered in the MBeanServer.javax.management.MBeanRegistrationException
- If an exception is thrown during MBean's registration.javax.management.MBeanException
- If the constructor of the MBean has thrown an exceptionjavax.management.NotCompliantMBeanException
- If the MBean is not a JMX compliant MBeanpublic javax.management.ObjectInstance createMBean(java.lang.String className, javax.management.ObjectName objectName, javax.management.ObjectName loaderName) throws javax.management.ReflectionException, javax.management.InstanceAlreadyExistsException, javax.management.MBeanRegistrationException, javax.management.MBeanException, javax.management.NotCompliantMBeanException, javax.management.InstanceNotFoundException
javax.management.MBeanServerConnection
createMBean(className, objectName, loaderName, null, null)
.createMBean
in interface javax.management.MBeanServer
createMBean
in interface javax.management.MBeanServerConnection
javax.management.ReflectionException
javax.management.InstanceAlreadyExistsException
javax.management.MBeanRegistrationException
javax.management.MBeanException
javax.management.NotCompliantMBeanException
javax.management.InstanceNotFoundException
MBeanServerConnection.createMBean(String, ObjectName, ObjectName, Object[], String[])
public javax.management.ObjectInstance createMBean(java.lang.String className, javax.management.ObjectName objectName, javax.management.ObjectName loaderName, java.lang.Object[] args, java.lang.String[] parameters) throws javax.management.ReflectionException, javax.management.InstanceAlreadyExistsException, javax.management.MBeanRegistrationException, javax.management.MBeanException, javax.management.NotCompliantMBeanException, javax.management.InstanceNotFoundException
javax.management.MBeanServerConnection
MBeanRegistration
createMBean
in interface javax.management.MBeanServer
createMBean
in interface javax.management.MBeanServerConnection
className
- The class name of the MBean to be instantiated.objectName
- The ObjectName of the MBean, may be null.loaderName
- The ObjectName of the classloader MBean to be used.args
- An array containing the arguments to pass to the constructor.parameters
- An array containing the signature of the constructor.javax.management.ReflectionException
- If a reflection exception is thrown.javax.management.InstanceAlreadyExistsException
- If another MBean with the same ObjectName is already registered in the MBeanServer.javax.management.MBeanRegistrationException
- If an exception is thrown during MBean's registration.javax.management.MBeanException
- If the constructor of the MBean has thrown an exceptionjavax.management.NotCompliantMBeanException
- If the MBean is not a JMX compliant MBeanjavax.management.InstanceNotFoundException
- If the specified classloader MBean is not registered in the MBeanServer.public javax.management.ObjectInstance registerMBean(java.lang.Object mbean, javax.management.ObjectName objectName) throws javax.management.InstanceAlreadyExistsException, javax.management.MBeanRegistrationException, javax.management.NotCompliantMBeanException
javax.management.MBeanServer
MBeanRegistration
.registerMBean
in interface javax.management.MBeanServer
mbean
- The MBean to be registered.objectName
- The ObjectName of the MBean, may be null.javax.management.InstanceAlreadyExistsException
- An MBean with the same ObjectName is already registered in the MBeanServer.javax.management.MBeanRegistrationException
- Thrown if a problem is encountered during registration.javax.management.NotCompliantMBeanException
- The given MBean is not a JMX compliant MBeanpublic void unregisterMBean(javax.management.ObjectName objectName) throws javax.management.InstanceNotFoundException, javax.management.MBeanRegistrationException
javax.management.MBeanServerConnection
unregisterMBean
in interface javax.management.MBeanServer
unregisterMBean
in interface javax.management.MBeanServerConnection
objectName
- The ObjectName of the MBean to be unregistered.javax.management.InstanceNotFoundException
- If the specified MBean is not registered in the MBeanServer.javax.management.MBeanRegistrationException
- If an exception is thrown during MBean's unregistration.public java.lang.Object getAttribute(javax.management.ObjectName objectName, java.lang.String attribute) throws javax.management.InstanceNotFoundException, javax.management.MBeanException, javax.management.AttributeNotFoundException, javax.management.ReflectionException
javax.management.MBeanServerConnection
getAttribute
in interface javax.management.MBeanServer
getAttribute
in interface javax.management.MBeanServerConnection
objectName
- The ObjectName of the MBean from which the attribute is to be retrieved.attribute
- The attribute name.javax.management.InstanceNotFoundException
- If the specified MBean is not registered in the MBeanServer.javax.management.MBeanException
- If the MBean's getter method throws an exception.javax.management.AttributeNotFoundException
- If the specified attribute does not belong to the management interface of the MBean.javax.management.ReflectionException
- If a reflection exception is thrown.MBeanServerConnection.setAttribute(javax.management.ObjectName, javax.management.Attribute)
public void setAttribute(javax.management.ObjectName objectName, javax.management.Attribute attribute) throws javax.management.InstanceNotFoundException, javax.management.AttributeNotFoundException, javax.management.InvalidAttributeValueException, javax.management.MBeanException, javax.management.ReflectionException
javax.management.MBeanServerConnection
setAttribute
in interface javax.management.MBeanServer
setAttribute
in interface javax.management.MBeanServerConnection
objectName
- The name of the MBean within which the attribute is to be set.attribute
- The Attribute to be set.javax.management.InstanceNotFoundException
- If the specified MBean is not registered in the MBeanServer.javax.management.AttributeNotFoundException
- If the specified attribute does not belong to the management interface of the MBean.javax.management.InvalidAttributeValueException
- If the value specified for the attribute does not match the attribute's typejavax.management.MBeanException
- If the MBean's setter method throws an exception.javax.management.ReflectionException
- If a reflection exception is thrown.MBeanServerConnection.getAttribute(javax.management.ObjectName, java.lang.String)
public javax.management.AttributeList getAttributes(javax.management.ObjectName objectName, java.lang.String[] attributes) throws javax.management.InstanceNotFoundException, javax.management.ReflectionException
javax.management.MBeanServerConnection
getAttributes
in interface javax.management.MBeanServer
getAttributes
in interface javax.management.MBeanServerConnection
objectName
- The ObjectName of the MBean from which the attributes are to be retrieved.attributes
- The attribute names.javax.management.InstanceNotFoundException
- If the specified MBean is not registered in the MBeanServer.javax.management.ReflectionException
- If a reflection exception is thrown.MBeanServerConnection.setAttributes(javax.management.ObjectName, javax.management.AttributeList)
public javax.management.AttributeList setAttributes(javax.management.ObjectName objectName, javax.management.AttributeList attributes) throws javax.management.InstanceNotFoundException, javax.management.ReflectionException
javax.management.MBeanServerConnection
setAttributes
in interface javax.management.MBeanServer
setAttributes
in interface javax.management.MBeanServerConnection
objectName
- The name of the MBean within which the attribute is to be set.attributes
- The AttributeList containing the Attributes to be set.javax.management.InstanceNotFoundException
- If the specified MBean is not registered in the MBeanServer.javax.management.ReflectionException
- If a reflection exception is thrown.MBeanServerConnection.getAttributes(javax.management.ObjectName, java.lang.String[])
public java.lang.Object invoke(javax.management.ObjectName objectName, java.lang.String methodName, java.lang.Object[] args, java.lang.String[] parameters) throws javax.management.InstanceNotFoundException, javax.management.MBeanException, javax.management.ReflectionException
javax.management.MBeanServerConnection
invoke
in interface javax.management.MBeanServer
invoke
in interface javax.management.MBeanServerConnection
objectName
- The ObjectName of the MBean on which the method is to be invoked.methodName
- The name of the operation to be invoked.args
- An array containing the arguments to pass to the operation.parameters
- An array containing the signature of the operation.javax.management.InstanceNotFoundException
- If the specified MBean is not registered in the MBeanServer.javax.management.MBeanException
- If the MBean's operation method throws an exception.javax.management.ReflectionException
- If a reflection exception is thrown.public java.lang.String getDefaultDomain()
javax.management.MBeanServerConnection
getDefaultDomain
in interface javax.management.MBeanServer
getDefaultDomain
in interface javax.management.MBeanServerConnection
public java.lang.String[] getDomains()
javax.management.MBeanServerConnection
getDomains
in interface javax.management.MBeanServer
getDomains
in interface javax.management.MBeanServerConnection
public java.lang.Integer getMBeanCount()
javax.management.MBeanServerConnection
getMBeanCount
in interface javax.management.MBeanServer
getMBeanCount
in interface javax.management.MBeanServerConnection
public boolean isRegistered(javax.management.ObjectName objectName)
javax.management.MBeanServerConnection
isRegistered
in interface javax.management.MBeanServer
isRegistered
in interface javax.management.MBeanServerConnection
objectName
- The ObjectName to be checked.public javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName objectName) throws javax.management.InstanceNotFoundException, javax.management.IntrospectionException, javax.management.ReflectionException
javax.management.MBeanServerConnection
getMBeanInfo
in interface javax.management.MBeanServer
getMBeanInfo
in interface javax.management.MBeanServerConnection
objectName
- The name of the MBean for which retrieve the metadata.javax.management.InstanceNotFoundException
- If the named MBean is not registered in the MBeanServer.javax.management.IntrospectionException
- If an exception occured during introspection of the MBean.javax.management.ReflectionException
- If a reflection-type exception occurredpublic javax.management.ObjectInstance getObjectInstance(javax.management.ObjectName objectName) throws javax.management.InstanceNotFoundException
javax.management.MBeanServerConnection
getObjectInstance
in interface javax.management.MBeanServer
getObjectInstance
in interface javax.management.MBeanServerConnection
objectName
- The ObjectName of the MBean.javax.management.InstanceNotFoundException
- If the specified MBean is not registered in the MBeanServer.public boolean isInstanceOf(javax.management.ObjectName objectName, java.lang.String className) throws javax.management.InstanceNotFoundException
javax.management.MBeanServerConnection
isInstanceOf
in interface javax.management.MBeanServer
isInstanceOf
in interface javax.management.MBeanServerConnection
objectName
- The ObjectName of the MBean.className
- The name of the class.javax.management.InstanceNotFoundException
- If the named MBean is not registered in the MBeanServer.public java.util.Set queryMBeans(javax.management.ObjectName patternName, javax.management.QueryExp filter)
javax.management.MBeanServerConnection
queryMBeans
in interface javax.management.MBeanServer
queryMBeans
in interface javax.management.MBeanServerConnection
patternName
- The ObjectName pattern identifying the MBeans to be retrieved, or null to retrieve all MBeans.filter
- The query expression to be evaluated for selecting MBeans, or null.public java.util.Set queryNames(javax.management.ObjectName patternName, javax.management.QueryExp filter)
javax.management.MBeanServerConnection
queryNames
in interface javax.management.MBeanServer
queryNames
in interface javax.management.MBeanServerConnection
patternName
- The ObjectName pattern identifying the MBeans to be retrieved, or null to retrieve all MBeans.filter
- The query expression to be evaluated for selecting MBeans, or null.