| javax.management.MBeanServer
All known Subclasses: org.jboss.mx.server.MBeanServerImpl,
Method Summary | |
public void | addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) Add a notification listener to an MBean. | public void | addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) Add a notification listener to an MBean. | public ObjectInstance | createMBean(String className, ObjectName name) Create an MBean registered using the given object name.
Uses the default contructor. | public ObjectInstance | createMBean(String className, ObjectName name, ObjectName loaderName) Create an MBean registered using the given object name.
The MBean is loaded using the passed classloader. | public ObjectInstance | createMBean(String className, ObjectName name, Object[] params, String[] signature) Create an MBean registered using the given object name.
Uses the specified constructor. | public ObjectInstance | createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) Create an MBean registered using the given object name.
The MBean is loaded using the passed classloader. | public ObjectInputStream | deserialize(ObjectName name, byte[] data) | public ObjectInputStream | deserialize(String className, byte[] data) | public ObjectInputStream | deserialize(String className, ObjectName loaderName, byte[] data) | public Object | getAttribute(ObjectName name, String attribute) Retrieve a value from an MBean. | public AttributeList | getAttributes(ObjectName name, String[] attributes) Retrieve a list of values from an MBean. | public ClassLoader | getClassLoader(ObjectName name) | public ClassLoader | getClassLoaderFor(ObjectName name) | public ClassLoaderRepository | getClassLoaderRepository() | public String | getDefaultDomain() Retrieve the default domain of the mbeanserver. | public String[] | getDomains() Retrieve the domains of the mbeanserver. | public Integer | getMBeanCount() Retrieve the number of mbeans registered in the server. | public MBeanInfo | getMBeanInfo(ObjectName name) | public ObjectInstance | getObjectInstance(ObjectName name) Retrieve an MBean's registration information. | public Object | instantiate(String className) Instantiates an object using the default loader repository and default
no-args constructor.
See Also: javax.management.loading.DefaultLoaderRepository Parameters: className - Class to instantiate. | public Object | instantiate(String className, ObjectName loaderName) Instantiates an object using the given class loader. | public Object | instantiate(String className, Object[] params, String[] signature) Instantiates an object using the default loader repository and a given constructor.
The class being instantiated must contain a constructor that matches the
signature given as an argument to this method call.
See Also: javax.management.loading.DefaultLoaderRepository Parameters: className - class to instantiate Parameters: params - argument values for the constructor call Parameters: signature - signature of the constructor as fully qualified class names instantiated object throws: ReflectionException - If there was an error while trying to invokethe class's constructor or the given class was not found. | public Object | instantiate(String className, ObjectName loaderName, Object[] params, String[] signature) Instantiates an object using the given class loader. | public Object | invoke(ObjectName name, String operationName, Object[] params, String[] signature) Invokes an operation on an mbean. | public boolean | isInstanceOf(ObjectName name, String className) | public boolean | isRegistered(ObjectName name) Test whether an mbean is registered. | public Set | queryMBeans(ObjectName name, QueryExp query) | public Set | queryNames(ObjectName name, QueryExp query) | public ObjectInstance | registerMBean(Object object, ObjectName name) Registers an mbean. | public void | removeNotificationListener(ObjectName name, ObjectName listener) Removes a listener from an mbean.
All registrations of the listener are removed. | public void | removeNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) Removes a listener from an mbean.
Only the listener that was registered with the same filter and handback is removed. | public void | removeNotificationListener(ObjectName name, NotificationListener listener) Removes a listener from an mbean.
All registrations of the listener are removed. | public void | removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) Removes a listener from an mbean.
Only the listener that was registered with the same filter and handback is removed. | public void | setAttribute(ObjectName name, Attribute attribute) Set a value for an MBean. | public AttributeList | setAttributes(ObjectName name, AttributeList attributes) Set a list of values for an MBean. | public void | unregisterMBean(ObjectName name) Unregisters an mbean. |
addNotificationListener | public void addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException(Code) | | Add a notification listener to an MBean.
Parameters: name - the name of the MBean broadcasting notifications Parameters: listener - the object name listener to add Parameters: filter - a filter to preprocess notifications Parameters: handback - a object to add to any notifications exception: InstanceNotFoundException - if the broadcaster or listener is not registered exception: RuntimeOperationsException - wrapping an IllegalArgumentException for anull listener or the listener does not implement the Notification Listener interface |
createMBean | public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException(Code) | | Create an MBean registered using the given object name.
The MBean is loaded using the passed classloader. Uses the specified constructor.
Parameters: className - the class name of the mbean Parameters: loaderName - an MBean that implements a classloader Parameters: name - the object name for registration, can be null Parameters: params - the parameters for the constructor Parameters: signature - the signature of the constructor an ObjectInstance describing the registration exception: ReflectionException - for class not found or an exceptioninvoking the contructor exception: InstanceAlreadyExistsException - for an MBean already registeredwith the passed or generated ObjectName exception: MBeanRegistrationException - for any exception thrown by theMBean's preRegister exception: MBeanException - for any exception thrown by the MBean's constructor exception: InstanceNotFoundException - if the loaderName is not a classloader registeredin the MBeanServer exception: NotCompliantMBeanException - if the class name does not correspond toa valid MBean exception: RuntimeOperationsException - wrapping an IllegalArgumentException for anull class name, the ObjectName could not be determined or it is a pattern |
getClassLoaderRepository | public ClassLoaderRepository getClassLoaderRepository()(Code) | | Retrieve the classloader repository for this mbean server
the classloader repository |
getDefaultDomain | public String getDefaultDomain()(Code) | | Retrieve the default domain of the mbeanserver.
the default domain |
getDomains | public String[] getDomains()(Code) | | Retrieve the domains of the mbeanserver.
the domains |
getMBeanCount | public Integer getMBeanCount()(Code) | | Retrieve the number of mbeans registered in the server.
true the number of registered mbeans |
instantiate | public Object instantiate(String className) throws ReflectionException, MBeanException(Code) | | Instantiates an object using the default loader repository and default
no-args constructor.
See Also: javax.management.loading.DefaultLoaderRepository Parameters: className - Class to instantiate. Must have a public no-argsconstructor. Cannot contain a null reference. instantiated object throws: ReflectionException - If there was an error while trying to invokethe class's constructor or the given class was not found. Thisexception wraps the actual exception thrown. throws: MBeanException - If the object constructor threw a checked exceptionduring the initialization. This exception wraps the actualexception thrown. throws: RuntimeMBeanException - If the class constructor threw a runtimeexception. This exception wraps the actual exception thrown. throws: RuntimeErrorException - If the class constructor threw an error.This exception wraps the actual error thrown. throws: RuntimeOperationsException - If the className is null.Wraps an IllegalArgumentException instance. |
instantiate | public Object instantiate(String className, ObjectName loaderName) throws ReflectionException, MBeanException, InstanceNotFoundException(Code) | | Instantiates an object using the given class loader. If the loader name contains
a null reference, the class loader of the MBean server implementation
will be used. The object must have a default, no-args constructor.
Parameters: className - Class to instantiate. Must have a public no args constructor.Cannot contain a null reference. Parameters: loaderName - Object name of a class loader that has been registered to the server.If null, the class loader of the MBean server is used. instantiated object throws: ReflectionException - If there was an error while trying to invokethe class's constructor or the given class was not found. Thisexception wraps the actual exception thrown. throws: MBeanException - If the object constructor threw a checked exceptionduring the initialization. This exception wraps the actual exceptionthrown. throws: InstanceNotFoundException - if the specified class loader was notregistered to the agent throws: RuntimeMBeanException - If the class constructor raised a runtimeexception. This exception wraps the actual exception thrown. throws: RuntimeErrorException - If the class constructor raised an error.This exception wraps the actual error thrown. throws: RuntimeOperationsException - if the className is null.Wraps an IllegalArgumentException instance. |
instantiate | public Object instantiate(String className, Object[] params, String[] signature) throws ReflectionException, MBeanException(Code) | | Instantiates an object using the default loader repository and a given constructor.
The class being instantiated must contain a constructor that matches the
signature given as an argument to this method call.
See Also: javax.management.loading.DefaultLoaderRepository Parameters: className - class to instantiate Parameters: params - argument values for the constructor call Parameters: signature - signature of the constructor as fully qualified class names instantiated object throws: ReflectionException - If there was an error while trying to invokethe class's constructor or the given class was not found. Thisexception wraps the actual exception thrown. throws: MBeanException - If the object constructor raised a checked exceptionduring the initialization. This exception wraps the actual exceptionthrown. throws: RuntimeMBeanException - If the class constructor raised a runtimeexception. This exception wraps the actual exception thrown. throws: RuntimeErrorException - If the class constructor raised an error.This exception wraps the actual error thrown. throws: RuntimeOperationsException - if the className is null.Wraps an IllegalArgumentException instance. |
instantiate | public Object instantiate(String className, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, MBeanException, InstanceNotFoundException(Code) | | Instantiates an object using the given class loader. If the loader name contains
a null reference, the class loader of the MBean server implementation
will be used. The object must contain a constructor with a matching signature
given as a parameter to this call.
Parameters: className - class to instantiate Parameters: loaderName - object name of a registered class loader in the agent. Parameters: params - argument values for the constructor call Parameters: signature - signature of the constructor as fully qualified class name strings instantiated object throws: ReflectionException - If there was an error while trying to invoke theclass's constructor or the given class was not found. this exceptionwraps the actual exception thrown. throws: MBeanException - If the object constructor raised a checked exceptionduring the initialization. This exception wraps the actual exception thrown. throws: InstanceNotFoundException - if the specified class loader was notregistered to the agent. throws: RuntimeMBeanException - If the class constructor raised a runtimeexception. This exception wraps the actual exception thrown. throws: RuntimeErrorException - If the class constructor raised an error.This exception wraps the actual error thrown. throws: RuntimeOperationsException - if the className argument is null.Wraps an IllegalArgumentException instance. |
isInstanceOf | public boolean isInstanceOf(ObjectName name, String className) throws InstanceNotFoundException(Code) | | Tests whether an mbean can be cast to the given type
Parameters: name - the name of the mbean Parameters: className - the class name to check true when it is of that type, false otherwise exception: InstanceNotFoundException - if the mbean is not registered |
isRegistered | public boolean isRegistered(ObjectName name)(Code) | | Test whether an mbean is registered.
Parameters: name - the object name of the mbean true when the mbean is registered, false otherwise exception: RuntimeOperationsException - wrapping an IllegalArgumentException for anull name |
queryMBeans | public Set queryMBeans(ObjectName name, QueryExp query)(Code) | | Retrieve a set of Object instances
Parameters: name - an ObjectName pattern, can be null for all mbeans Parameters: query - a query expression to further filter the mbeans, can be nullfor no query |
queryNames | public Set queryNames(ObjectName name, QueryExp query)(Code) | | Retrieve a set of Object names
Parameters: name - an ObjectName pattern, can be null for all mbeans Parameters: query - a query expression to further filter the mbeans, can be nullfor no query |
|
|