| javax.management.MBeanServer
All known Subclasses: mx4j.server.ChainedMBeanServer, mx4j.server.MX4JMBeanServer,
MBeanServer | public interface MBeanServer extends MBeanServerConnection(Code) | | A local client can create, register, unregister and access registered MBeans by means of this interface, that is
the core component of JMX.
An implementation of this interface can only be obtained from
MBeanServerFactory .
Almost all methods require an
MBeanPermission to be invoked under SecurityManager.
version: $Revision: 1.8 $ |
Method Summary | |
public void | addNotificationListener(ObjectName observed, NotificationListener listener, NotificationFilter filter, Object handback) | public void | addNotificationListener(ObjectName observed, ObjectName listener, NotificationFilter filter, Object handback) | public ObjectInstance | createMBean(String className, ObjectName objectName) | public ObjectInstance | createMBean(String className, ObjectName objectName, ObjectName loaderName) | public ObjectInstance | createMBean(String className, ObjectName objectName, Object[] args, String[] parameters) | public ObjectInstance | createMBean(String className, ObjectName objectName, ObjectName loaderName, Object[] args, String[] parameters) | public ObjectInputStream | deserialize(String className, ObjectName loaderName, byte[] bytes) | public ObjectInputStream | deserialize(String className, byte[] bytes) | public ObjectInputStream | deserialize(ObjectName objectName, byte[] bytes) | public Object | getAttribute(ObjectName objectName, String attribute) | public AttributeList | getAttributes(ObjectName objectName, String[] attributes) | public ClassLoader | getClassLoader(ObjectName loaderName) Returns the named classloader MBean. | public ClassLoader | getClassLoaderFor(ObjectName mbeanName) Returns the ClassLoader that was used for loading the named MBean.
Parameters: mbeanName - The ObjectName of the MBean. | public ClassLoaderRepository | getClassLoaderRepository() Returns the ClassLoaderRepository for this MBeanServer. | public String | getDefaultDomain() | public String[] | getDomains() | public Integer | getMBeanCount() | public MBeanInfo | getMBeanInfo(ObjectName objectName) | public ObjectInstance | getObjectInstance(ObjectName objectName) | public Object | instantiate(String className) Instantiates an object of the given class using the MBeanServer's
ClassLoaderRepository .
The given class should have a public parameterless constructor.
Parameters: className - The class name of the object to be instantiated. | public Object | instantiate(String className, ObjectName loaderName) Instantiates an object of the given class using the specified ClassLoader MBean.
If loaderName is null, the classloader of the MBeanServer will be used.
The given class should have a public parameterless constructor.
Parameters: className - The class name of the MBean to be instantiated. Parameters: loaderName - The object name of the class loader to be used. | public Object | instantiate(String className, Object[] args, String[] parameters) Instantiates an object of the given class using the MBeanServer's
ClassLoaderRepository .
The given class should have a public constructor matching the given signature, and will be called
passing the given arguments.
Parameters: className - The class name of the object to be instantiated. Parameters: args - The arguments passed to the constructor. Parameters: parameters - The signature of the constructor. | public Object | instantiate(String className, ObjectName loaderName, Object[] args, String[] parameters) Instantiates an object of the given class using the specified ClassLoader MBean.
If 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.
Parameters: className - The class name of the MBean to be instantiated. Parameters: loaderName - The object name of the class loader to be used. Parameters: args - The arguments passed to the constructor. Parameters: parameters - The signature of the constructor. | public Object | invoke(ObjectName objectName, String methodName, Object[] args, String[] parameters) | public boolean | isInstanceOf(ObjectName objectName, String className) | public boolean | isRegistered(ObjectName objectname) | public Set | queryMBeans(ObjectName patternName, QueryExp filter) | public Set | queryNames(ObjectName patternName, QueryExp filter) | public ObjectInstance | registerMBean(Object mbean, ObjectName objectName) Registers the given MBean with the given ObjectName.
The ObjectName may be null, but the MBean should then implement
MBeanRegistration .
Parameters: mbean - The MBean to be registered. Parameters: objectName - The ObjectName of the MBean, may be null. | public void | removeNotificationListener(ObjectName observed, ObjectName listener) | public void | removeNotificationListener(ObjectName observed, NotificationListener listener) | public void | removeNotificationListener(ObjectName observed, ObjectName listener, NotificationFilter filter, Object handback) | public void | removeNotificationListener(ObjectName observed, NotificationListener listener, NotificationFilter filter, Object handback) | public void | setAttribute(ObjectName objectName, Attribute attribute) | public AttributeList | setAttributes(ObjectName objectName, AttributeList attributes) | public void | unregisterMBean(ObjectName objectName) |
getClassLoader | public ClassLoader getClassLoader(ObjectName loaderName) throws InstanceNotFoundException(Code) | | Returns the named classloader MBean. If the given loaderName is null, the classloader
of the MBeanServer will be used.
Parameters: loaderName - The ObjectName of the classloader MBean, or null. The named classloader MBean. throws: InstanceNotFoundException - If the named classloader MBean is not found. since: JMX 1.2 |
getClassLoaderRepository | public ClassLoaderRepository getClassLoaderRepository()(Code) | | Returns the ClassLoaderRepository for this MBeanServer.
since: JMX 1.2 |
instantiate | public Object instantiate(String className) throws ReflectionException, MBeanException(Code) | | Instantiates an object of the given class using the MBeanServer's
ClassLoaderRepository .
The given class should have a public parameterless constructor.
Parameters: className - The class name of the object to be instantiated. The newly instantiated object. throws: ReflectionException - Wraps a Java reflection exception thrown while trying to create the instance throws: MBeanException - Thrown if the constructor of the object throws an exception |
instantiate | public Object instantiate(String className, ObjectName loaderName) throws ReflectionException, MBeanException, InstanceNotFoundException(Code) | | Instantiates an object of the given class using the specified ClassLoader MBean.
If loaderName is null, the classloader of the MBeanServer will be used.
The given class should have a public parameterless constructor.
Parameters: className - The class name of the MBean to be instantiated. Parameters: loaderName - The object name of the class loader to be used. The newly instantiated object. throws: ReflectionException - Wraps a Java reflection exception thrown while trying to create the instance throws: MBeanException - Thrown if the constructor of the object throws an exception throws: InstanceNotFoundException - The specified classloader MBean is not registered in the MBeanServer. |
instantiate | public Object instantiate(String className, Object[] args, String[] parameters) throws ReflectionException, MBeanException(Code) | | Instantiates an object of the given class using the MBeanServer's
ClassLoaderRepository .
The given class should have a public constructor matching the given signature, and will be called
passing the given arguments.
Parameters: className - The class name of the object to be instantiated. Parameters: args - The arguments passed to the constructor. Parameters: parameters - The signature of the constructor. The newly instantiated object. throws: ReflectionException - Wraps a Java reflection exception thrown while trying to create the instance throws: MBeanException - Thrown if the constructor of the object throws an exception |
instantiate | public Object instantiate(String className, ObjectName loaderName, Object[] args, String[] parameters) throws ReflectionException, MBeanException, InstanceNotFoundException(Code) | | Instantiates an object of the given class using the specified ClassLoader MBean.
If 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.
Parameters: className - The class name of the MBean to be instantiated. Parameters: loaderName - The object name of the class loader to be used. Parameters: args - The arguments passed to the constructor. Parameters: parameters - The signature of the constructor. The newly instantiated object. throws: ReflectionException - Wraps a Java reflection exception thrown while trying to create the instance throws: MBeanException - Thrown if the constructor of the object throws an exception throws: InstanceNotFoundException - The specified classloader MBean is not registered in the MBeanServer. |
|
|