com.sun.jdmk
Class MBeanServerImpl

java.lang.Object
  extended by com.sun.jdmk.MBeanServerImpl
All Implemented Interfaces:
MBeanServerInterceptor, MBeanInterceptor, MBeanServerInt, NotificationRegistration, ProxyHandler, MBeanServer, MBeanServerConnection

Deprecated. Use objects returned by JdmkMBeanServerBuilder instead.

public class MBeanServerImpl
extends Object
implements MBeanServer, MBeanServerInt

Deprecated. Use objects returned by JdmkMBeanServerBuilder instead.

This is a JMX 1.1 implementation of the MBeanServer interface, the base class for MBean manipulation on the agent side. It contains the methods necessary for the creation, registration, and deletion of MBeans as well as the access methods for registered MBeans. This class is no longer used by the Java DMK runtime which now relies on JMX 1.2 MBeanServer implementations obtained through the MBeanServerFactory. Instead of using this class, you can obtain a Java DMK 5.0 backward compatible MBeanServer from the MBeanServerFactory by setting the system property javax.management.builder.initial value to point to the Java DMK MBeanServerBuilder com.sun.jdmk.JdmkMBeanServerBuilder. The MBeanServer instance returned by the JdmkMBeanServerBuilder is a JMX 1.2 compliant MBeanServer that also provides backward compatibility with Java DMK 5.0 APIs.


Constructor Summary
MBeanServerImpl(MBeanInstantiator instantiator)
          Deprecated. Public internal: Creates an MBeanServer with a standard default domain name.
MBeanServerImpl(MBeanInstantiator instantiator, MetaData metadata, String domain)
          Deprecated. Public internal: Creates an MBeanServer with the specified default domain name.
MBeanServerImpl(MBeanInstantiator instantiator, String domain)
          Deprecated. Public internal: Creates an MBeanServer with the specified default domain name.
 
Method Summary
 void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback)
          Deprecated. Adds a listener to a registered MBean.
 void addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback)
          Deprecated. Adds a listener to a registered MBean.
 ObjectInstance createMBean(String className, ObjectName name)
          Deprecated. Instantiates and registers an MBean in the MBean server.
 ObjectInstance createMBean(String className, ObjectName name, Object[] params, String[] signature)
          Deprecated. Instantiates and registers an MBean in the MBean server.
 ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName)
          Deprecated. Instantiates and registers an MBean in the MBean server.
 ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature)
          Deprecated. Instantiates and registers an MBean in the MBean server.
 ObjectInputStream deserialize(ObjectName name, byte[] data)
          Deprecated. De-serializes a byte array in the context of the class loader of an MBean.
 ObjectInputStream deserialize(String className, byte[] data)
          Deprecated. De-serializes a byte array in the context of a given MBean class loader.
 ObjectInputStream deserialize(String className, ObjectName loaderName, byte[] data)
          Deprecated. De-serializes a byte array in the context of a given MBean class loader.
 Object getAttribute(ObjectName name, String attribute)
          Deprecated. Gets the value of a specific attribute of a named MBean.
 AttributeList getAttributes(ObjectName name, String[] attributes)
          Deprecated. Enables the values of several attributes of a named MBean.
 ClassLoader getClassLoader(ObjectName loaderName)
          Deprecated. Implements MBeanServer.getClassLoader(ObjectName).
 ClassLoader getClassLoaderFor(ObjectName mbeanName)
          Deprecated. Return the ClassLoader that was used for loading the class of the named MBean.
 ClassLoaderRepository getClassLoaderRepository()
          Deprecated. Return the ClassLoaderRepository for this MBeanServer.
 String getDefaultDomain()
          Deprecated. Returns the default domain used for naming the MBean.
 MBeanInterceptor getDefaultMBeanInterceptor()
          Deprecated. Return the MBeanInterceptor to which all requests from the MBeanServer interface are forwarded.
 String[] getDomains()
          Deprecated. Returns the list of domains in which any MBean is currently registered.
 ClassLoader getMBeanClassLoader(ObjectName name)
          Deprecated. Return the ClassLoader of the MBean with the specified ObjectName.
 Integer getMBeanCount()
          Deprecated. Returns the number of MBeans registered in the MBean server.
 MBeanInfo getMBeanInfo(ObjectName name)
          Deprecated. This method discovers the attributes and operations that an MBean exposes for management.
 MBeanInstantiator getMBeanInstantiator()
          Deprecated. Return the MBeanInstantiator associated to this MBeanServer.
 MBeanServerDelegate getMBeanServerDelegate()
          Deprecated. Return the MBeanServerDelegate representing the MBeanServer
 MetaData getMetaData()
          Deprecated. Return the MetaData associated to this MBeanServer.
 ObjectInstance getObjectInstance(ObjectName name)
          Deprecated. Gets the ObjectInstance for a given MBean registered with the MBean server.
 Object instantiate(String className)
          Deprecated. Instantiates an object using the list of all class loaders registered in the MBean server (using its Default Loader Repository).
 Object instantiate(String className, Object[] params, String[] signature)
          Deprecated. Instantiates an object using the list of all class loaders registered in the MBean server (using its Default Loader Repository).
 Object instantiate(String className, ObjectName loaderName)
          Deprecated. Instantiates an object using the class Loader specified by its ObjectName.
 Object instantiate(String className, ObjectName loaderName, Object[] params, String[] signature)
          Deprecated. Instantiates an object.
 Object invoke(ObjectName name, String operationName, Object[] params, String[] signature)
          Deprecated. Invokes an operation on an MBean.
 boolean isInstanceOf(ObjectName name, String className)
          Deprecated. Returns true if the MBean specified is an instance of the specified class, false otherwise.
 boolean isRegistered(ObjectName name)
          Deprecated. Checks whether an MBean, identified by its object name, is already registered with the MBean server.
 Set queryMBeans(ObjectName name, QueryExp query)
          Deprecated. Gets MBeans controlled by the MBean server.
 Set queryNames(ObjectName name, QueryExp query)
          Deprecated. Gets the names of MBeans controlled by the MBean server.
 ObjectInstance registerMBean(Object object, ObjectName name)
          Deprecated. Registers a pre-existing object as an MBean with the MBean server.
 void removeNotificationListener(ObjectName name, NotificationListener listener)
          Deprecated. Removes a listener from a registered MBean.
 void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback)
          Deprecated. Only supported if the underlying interceptor is an instance of MBeanServerInterceptor Otherwise throws UnsupportedOperationException.
 void removeNotificationListener(ObjectName name, ObjectName listener)
          Deprecated. Removes a listener from a registered MBean.
 void removeNotificationListener(ObjectName name, ObjectName listenerName, NotificationFilter filter, Object handback)
          Deprecated. Only supported if the underlying interceptor is an instance of MBeanServerInterceptor Otherwise throws UnsupportedOperationException.
 void setAttribute(ObjectName name, Attribute attribute)
          Deprecated. Sets the value of a specific attribute of a named MBean.
 AttributeList setAttributes(ObjectName name, AttributeList attributes)
          Deprecated. Sets the values of several attributes of a named MBean.
 void setDefaultMBeanInterceptor(MBeanInterceptor mbi)
          Deprecated. Change the MBeanInterceptor object to which all requests from the MBeanServer interface are forwarded.
 void unregisterMBean(ObjectName name)
          Deprecated. De-registers an MBean from the MBean server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBeanServerImpl

public MBeanServerImpl(MBeanInstantiator instantiator)
Deprecated. 
Public internal: Creates an MBeanServer with a standard default domain name. This constructor is used internally by the MBeanServerFactory.

The default domain name is used as the domain part in the ObjectName of MBeans, if no domain is specified by the user.
The standard default domain name is defined in ServiceName.DOMAIN

Parameters:
instantiator - The MBeanInstantiator that will be used to instantiate MBeans and take care of class loading issues. This parameter may not be null.
Throws:
IllegalArgumentException - if the instantiator is null.

MBeanServerImpl

public MBeanServerImpl(MBeanInstantiator instantiator,
                       String domain)
Deprecated. 
Public internal: Creates an MBeanServer with the specified default domain name. This constructor is used internally by the MBeanServerFactory.

The default domain name is used as the domain part in the ObjectName of MBeans if no domain is specified by the user.

Parameters:
instantiator - The MBeanInstantiator that will be used to instantiate MBeans and take care of class loading issues. This parameter may not be null.
domain - The default domain name used by this MBeanServer
Throws:
IllegalArgumentException - if the instantiator is null.

MBeanServerImpl

public MBeanServerImpl(MBeanInstantiator instantiator,
                       MetaData metadata,
                       String domain)
Deprecated. 
Public internal: Creates an MBeanServer with the specified default domain name. This constructor is used internally by the MBeanServerFactory.

The default domain name is used as the domain part in the ObjectName of MBeans if no domain is specified by the user.

Parameters:
instantiator - The MBeanInstantiator that will be used to instantiate MBeans and take care of class loading issues. This parameter may not be null.
metadata - The MetaData object that will be used by the MBean server in order to invoke the MBean interface of the registered MBeans.
domain - The default domain name used by this MBeanServer
Throws:
IllegalArgumentException - if the instantiator is null.
Method Detail

getMBeanInstantiator

public MBeanInstantiator getMBeanInstantiator()
Deprecated. 
Return the MBeanInstantiator associated to this MBeanServer.

Specified by:
getMBeanInstantiator in interface MBeanServerInt

getMetaData

public MetaData getMetaData()
Deprecated. 
Return the MetaData associated to this MBeanServer.

Specified by:
getMetaData in interface MBeanServerInt

getDefaultMBeanInterceptor

public MBeanInterceptor getDefaultMBeanInterceptor()
Deprecated. 
Return the MBeanInterceptor to which all requests from the MBeanServer interface are forwarded.

Specified by:
getDefaultMBeanInterceptor in interface MBeanServerInt

setDefaultMBeanInterceptor

public void setDefaultMBeanInterceptor(MBeanInterceptor mbi)
                                throws IllegalArgumentException
Deprecated. 

Change the MBeanInterceptor object to which all requests from the MBeanServer interface are forwarded. The old object is lost unless it was accessible by other means.

Specified by:
setDefaultMBeanInterceptor in interface MBeanServerInt
Parameters:
mbi - the new object.
Throws:
IllegalArgumentException - if mbi is null.

createMBean

public ObjectInstance createMBean(String className,
                                  ObjectName name)
                           throws ReflectionException,
                                  InstanceAlreadyExistsException,
                                  MBeanRegistrationException,
                                  MBeanException,
                                  NotCompliantMBeanException
Deprecated. 
Instantiates and registers an MBean in the MBean server. The MBean server will use its Default Loader Repository to load the class of the MBean. An object name is associated to the MBean. If the object name given is null, the MBean can automatically provide its own name by implementing the MBeanRegistration interface. The call returns an ObjectInstance object representing the newly created MBean.

Specified by:
createMBean in interface MBeanServer
Specified by:
createMBean in interface MBeanServerConnection
Parameters:
className - The class name of the MBean to be instantiated.
name - The object name of the MBean. May be null.
Returns:
An ObjectInstance, containing the ObjectName and the Java class name of the newly instantiated MBean.
Throws:
ReflectionException - Wraps an ClassNotFoundException or an Exception that occurred when trying to invoke the MBean's constructor.
InstanceAlreadyExistsException - The MBean is already under the control of the MBean server.
MBeanRegistrationException - The preRegister() (MBeanRegistration interface) method of the MBean has thrown an exception. The MBean will not be registered.
MBeanException - The constructor of the MBean has thrown an exception.
NotCompliantMBeanException - This class is not a JMX compliant MBean.
RuntimeOperationsException - Wraps an IllegalArgumentException: The className passed in parameter is null, the ObjectName passed in parameter contains a pattern or no ObjectName is specified for the MBean.

createMBean

public ObjectInstance createMBean(String className,
                                  ObjectName name,
                                  ObjectName loaderName)
                           throws ReflectionException,
                                  InstanceAlreadyExistsException,
                                  MBeanRegistrationException,
                                  MBeanException,
                                  NotCompliantMBeanException,
                                  InstanceNotFoundException
Deprecated. 
Instantiates and registers an MBean in the MBean server. The class loader to be used is identified by its object name. An object name is associated to the MBean. If the object name of the loader is null, the ClassLoader that loaded the MBean server will be used. If the MBean's object name given is null, the MBean can automatically provide its own name by implementing the MBeanRegistration interface. The call returns an ObjectInstance object representing the newly created MBean.

Specified by:
createMBean in interface MBeanServer
Specified by:
createMBean in interface MBeanServerConnection
Parameters:
className - The class name of the MBean to be instantiated.
name - The object name of the MBean. May be null.
loaderName - The object name of the class loader to be used.
Returns:
An ObjectInstance, containing the ObjectName and the Java class name of the newly instantiated MBean.
Throws:
ReflectionException - Wraps an ClassNotFoundException or an Exception that occurred when trying to invoke the MBean's constructor.
InstanceAlreadyExistsException - The MBean is already under the control of the MBean server.
MBeanRegistrationException - The preRegister() (MBeanRegistration interface) method of the MBean has thrown an exception. The MBean will not be registered.
MBeanException - The constructor of the MBean has thrown an exception
NotCompliantMBeanException - This class is not a JMX compliant MBean.
InstanceNotFoundException - The specified class loader is not registered in the MBean server.
RuntimeOperationsException - Wraps an IllegalArgumentException: The className passed in parameter is null, the ObjectName passed in parameter contains a pattern or no ObjectName is specified for the MBean.

createMBean

public ObjectInstance createMBean(String className,
                                  ObjectName name,
                                  Object[] params,
                                  String[] signature)
                           throws ReflectionException,
                                  InstanceAlreadyExistsException,
                                  MBeanRegistrationException,
                                  MBeanException,
                                  NotCompliantMBeanException
Deprecated. 
Instantiates and registers an MBean in the MBean server. The MBean server will use its Default Loader Repository to load the class of the MBean. An object name is associated to the MBean. If the object name given is null, the MBean can automatically provide its own name by implementing the MBeanRegistration interface. The call returns an ObjectInstance object representing the newly created MBean.

Specified by:
createMBean in interface MBeanInterceptor
Specified by:
createMBean in interface MBeanServer
Specified by:
createMBean in interface MBeanServerConnection
Parameters:
className - The class name of the MBean to be instantiated.
name - The object name of the MBean. May be null.
params - An array containing the parameters of the constructor to be invoked.
signature - An array containing the signature of the constructor to be invoked.
Returns:
An ObjectInstance, containing the ObjectName and the Java class name of the newly instantiated MBean.
Throws:
ReflectionException - Wraps a ClassNotFoundException or an Exception that occurred when trying to invoke the MBean's constructor.
InstanceAlreadyExistsException - The MBean is already under the control of the MBean server.
MBeanRegistrationException - The preRegister() (MBeanRegistration interface) method of the MBean has thrown an exception. The MBean will not be registered.
MBeanException - The constructor of the MBean has thrown an exception.
RuntimeOperationsException - Wraps an IllegalArgumentException: The className passed in parameter is null, the ObjectName passed in parameter contains a pattern or no ObjectName is specified for the MBean.
NotCompliantMBeanException

createMBean

public ObjectInstance createMBean(String className,
                                  ObjectName name,
                                  ObjectName loaderName,
                                  Object[] params,
                                  String[] signature)
                           throws ReflectionException,
                                  InstanceAlreadyExistsException,
                                  MBeanRegistrationException,
                                  MBeanException,
                                  NotCompliantMBeanException,
                                  InstanceNotFoundException
Deprecated. 
Instantiates and registers an MBean in the MBean server. The class loader to be used is identified by its object name. An object name is associated to the MBean. If the object name of the loader is not specified, the ClassLoader that loaded the MBean server will be used. If the MBean object name given is null, the MBean can automatically provide its own name by implementing the MBeanRegistration interface. The call returns an ObjectInstance object representing the newly created MBean.

Specified by:
createMBean in interface MBeanInterceptor
Specified by:
createMBean in interface MBeanServer
Specified by:
createMBean in interface MBeanServerConnection
Parameters:
className - The class name of the MBean to be instantiated.
name - The object name of the MBean. May be null.
params - An array containing the parameters of the constructor to be invoked.
signature - An array containing the signature of the constructor to be invoked.
loaderName - The object name of the class loader to be used.
Returns:
An ObjectInstance, containing the ObjectName and the Java class name of the newly instantiated MBean.
Throws:
ReflectionException - Wraps a ClassNotFoundException or an Exception that occurred when trying to invoke the MBean's constructor.
InstanceAlreadyExistsException - The MBean is already under the control of the MBean server.
MBeanRegistrationException - The preRegister() (MBeanRegistration interface) method of the MBean has thrown an exception. The MBean will not be registered.
MBeanException - The constructor of the MBean has thrown an exception
InstanceNotFoundException - The specified class loader is not registered in the MBean server.
RuntimeOperationsException - Wraps an IllegalArgumentException: The className passed in parameter is null, the ObjectName passed in parameter contains a pattern or no ObjectName is specified for the MBean.
NotCompliantMBeanException

registerMBean

public ObjectInstance registerMBean(Object object,
                                    ObjectName name)
                             throws InstanceAlreadyExistsException,
                                    MBeanRegistrationException,
                                    NotCompliantMBeanException
Deprecated. 
Registers a pre-existing object as an MBean with the MBean server. If the object name given is null, the MBean may automatically provide its own name by implementing the MBeanRegistration interface. The call returns an ObjectInstance object representing the registered MBean.

Specified by:
registerMBean in interface MBeanInterceptor
Specified by:
registerMBean in interface MBeanServer
Parameters:
object - The MBean to be registered as an MBean.
name - The object name of the MBean. May be null.
Returns:
The ObjectInstance for the MBean that has been registered.
Throws:
InstanceAlreadyExistsException - The MBean is already under the control of the MBean server.
MBeanRegistrationException - The preRegister() (MBeanRegistration interface) method of the MBean has thrown an exception. The MBean will not be registered.
NotCompliantMBeanException - This object is not a JMX compliant MBean
RuntimeOperationsException - Wraps an IllegalArgumentException: The object passed in parameter is null or no object name is specified.

unregisterMBean

public void unregisterMBean(ObjectName name)
                     throws InstanceNotFoundException,
                            MBeanRegistrationException
Deprecated. 
De-registers an MBean from the MBean server. The MBean is identified by its object name. Once the method has been invoked, the MBean may no longer be accessed by its object name.

Specified by:
unregisterMBean in interface MBeanInterceptor
Specified by:
unregisterMBean in interface ProxyHandler
Specified by:
unregisterMBean in interface MBeanServer
Specified by:
unregisterMBean in interface MBeanServerConnection
Parameters:
name - The object name of the MBean to be de-registered.
Throws:
InstanceNotFoundException - The MBean specified is not registered in the MBean server.
MBeanRegistrationException - The preDeregister() (MBeanRegistration interface) method of the MBean has thrown an exception.
RuntimeOperationsException - Wraps an IllegalArgumentException: The object name in parameter is null or the MBean you are when trying to de-register is the MBeanServerDelegate MBean.

getObjectInstance

public ObjectInstance getObjectInstance(ObjectName name)
                                 throws InstanceNotFoundException
Deprecated. 
Gets the ObjectInstance for a given MBean registered with the MBean server.

Specified by:
getObjectInstance in interface MBeanInterceptor
Specified by:
getObjectInstance in interface MBeanServer
Specified by:
getObjectInstance in interface MBeanServerConnection
Parameters:
name - The object name of the MBean.
Returns:
The ObjectInstance associated to the MBean specified by name.
Throws:
InstanceNotFoundException - The MBean specified is not registered in the MBean server.

queryMBeans

public Set queryMBeans(ObjectName name,
                       QueryExp query)
Deprecated. 
Gets MBeans controlled by the MBean server. This method allows any of the following to be obtained: All MBeans, a set of MBeans specified by pattern matching on the ObjectName and/or a Query expression, a specific MBean. When the object name is null or no domain and key properties are specified, all objects are to be selected (and filtered if a query is specified). It returns the set of ObjectInstance objects (containing the ObjectName and the Java Class name) for the selected MBeans.

Specified by:
queryMBeans in interface MBeanInterceptor
Specified by:
queryMBeans in interface MBeanServer
Specified by:
queryMBeans in interface MBeanServerConnection
Parameters:
name - The object name pattern identifying the MBeans to be retrieved. If null or or no domain and key properties are specified, all the MBeans registered will be retrieved.
query - The query expression to be applied for selecting MBeans. If null no query expression will be applied for selecting MBeans.
Returns:
A set containing the ObjectInstance objects for the selected MBeans. If no MBean satisfies the query an empty list is returned.

queryNames

public Set queryNames(ObjectName name,
                      QueryExp query)
Deprecated. 
Gets the names of MBeans controlled by the MBean server. This method enables any of the following to be obtained: The names of all MBeans, the names of a set of MBeans specified by pattern matching on the ObjectName and/or a Query expression, a specific MBean name (equivalent to testing whether an MBean is registered). When the object name is null or or no domain and key properties are specified, all objects are selected (and filtered if a query is specified). It returns the set of ObjectNames for the MBeans selected.

Specified by:
queryNames in interface MBeanInterceptor
Specified by:
queryNames in interface MBeanServer
Specified by:
queryNames in interface MBeanServerConnection
Parameters:
name - The object name pattern identifying the MBeans to be retrieved. If null or no domain and key properties are specified, all the MBeans registered will be retrieved.
query - The query expression to be applied for selecting MBeans. If null no query expression will be applied for selecting MBeans.
Returns:
A set containing the ObjectNames for the MBeans selected. If no MBean satisfies the query, an empty list is returned.

isRegistered

public boolean isRegistered(ObjectName name)
Deprecated. 
Checks whether an MBean, identified by its object name, is already registered with the MBean server.

Specified by:
isRegistered in interface MBeanInterceptor
Specified by:
isRegistered in interface MBeanServer
Specified by:
isRegistered in interface MBeanServerConnection
Parameters:
name - The object name of the MBean to be checked.
Returns:
True if the MBean is already registered in the MBean server, false otherwise.
Throws:
RuntimeOperationsException - Wraps an IllegalArgumentException: The object name in parameter is null.

getMBeanCount

public Integer getMBeanCount()
Deprecated. 
Returns the number of MBeans registered in the MBean server.

Specified by:
getMBeanCount in interface MBeanInterceptor
Specified by:
getMBeanCount in interface MBeanServer
Specified by:
getMBeanCount in interface MBeanServerConnection

getAttribute

public Object getAttribute(ObjectName name,
                           String attribute)
                    throws MBeanException,
                           AttributeNotFoundException,
                           InstanceNotFoundException,
                           ReflectionException
Deprecated. 
Gets the value of a specific attribute of a named MBean. The MBean is identified by its object name.

Specified by:
getAttribute in interface MBeanInterceptor
Specified by:
getAttribute in interface ProxyHandler
Specified by:
getAttribute in interface MBeanServer
Specified by:
getAttribute in interface MBeanServerConnection
Parameters:
name - The object name of the MBean from which the attribute is to be retrieved.
attribute - A String specifying the name of the attribute to be retrieved.
Returns:
The value of the retrieved attribute.
Throws:
AttributeNotFoundException - The attribute specified is not accessible in the MBean.
MBeanException - Wraps an exception thrown by the MBean's getter.
InstanceNotFoundException - The MBean specified is not registered in the MBean server.
ReflectionException - Wraps an Exception thrown when trying to invoke the setter.
RuntimeOperationsException - Wraps an IllegalArgumentException: The object name in parameter is null or the attribute in parameter is null.

getAttributes

public AttributeList getAttributes(ObjectName name,
                                   String[] attributes)
                            throws InstanceNotFoundException,
                                   ReflectionException
Deprecated. 
Enables the values of several attributes of a named MBean. The MBean is identified by its object name.

Specified by:
getAttributes in interface MBeanInterceptor
Specified by:
getAttributes in interface ProxyHandler
Specified by:
getAttributes in interface MBeanServer
Specified by:
getAttributes in interface MBeanServerConnection
Parameters:
name - The object name of the MBean from which the attributes are retrieved.
attributes - A list of the attributes to be retrieved.
Returns:
The list of the retrieved attributes.
Throws:
InstanceNotFoundException - The MBean specified is not registered in the MBean server.
ReflectionException - An exception occurred when trying to invoke the getAttributes method of a Dynamic MBean.
RuntimeOperationsException - Wrap an IllegalArgumentException: The object name in parameter is null or attributes in parameter is null.

setAttribute

public void setAttribute(ObjectName name,
                         Attribute attribute)
                  throws InstanceNotFoundException,
                         AttributeNotFoundException,
                         InvalidAttributeValueException,
                         MBeanException,
                         ReflectionException
Deprecated. 
Sets the value of a specific attribute of a named MBean. The MBean is identified by its object name.

Specified by:
setAttribute in interface MBeanInterceptor
Specified by:
setAttribute in interface ProxyHandler
Specified by:
setAttribute in interface MBeanServer
Specified by:
setAttribute in interface MBeanServerConnection
Parameters:
name - The name of the MBean within which the attribute is to be set.
attribute - The identification of the attribute to be set and the value it is to be set to.
Throws:
InstanceNotFoundException - The MBean specified is not registered in the MBean server.
AttributeNotFoundException - The attribute specified is not accessible in the MBean.
InvalidAttributeValueException - The value specified for the attribute is not valid.
MBeanException - Wraps an exception thrown by the MBean's setter.
ReflectionException - Wraps an Exception thrown when trying to invoke the setter.
RuntimeOperationsException - Wraps an IllegalArgumentException: The object name in parameter is null or the attribute in parameter is null.

setAttributes

public AttributeList setAttributes(ObjectName name,
                                   AttributeList attributes)
                            throws InstanceNotFoundException,
                                   ReflectionException
Deprecated. 
Sets the values of several attributes of a named MBean. The MBean is identified by its object name.

Specified by:
setAttributes in interface MBeanInterceptor
Specified by:
setAttributes in interface ProxyHandler
Specified by:
setAttributes in interface MBeanServer
Specified by:
setAttributes in interface MBeanServerConnection
Parameters:
name - The object name of the MBean within which the attributes are to be set.
attributes - A list of attributes: The identification of the attributes to be set and the values they are to be set to.
Returns:
The list of attributes that were set, with their new values.
Throws:
InstanceNotFoundException - The MBean specified is not registered in the MBean server.
ReflectionException - An exception occurred when trying to invoke the getAttributes method of a Dynamic MBean.
RuntimeOperationsException - Wraps an IllegalArgumentException: The object name in parameter is null or attributes in parameter is null.

invoke

public Object invoke(ObjectName name,
                     String operationName,
                     Object[] params,
                     String[] signature)
              throws InstanceNotFoundException,
                     MBeanException,
                     ReflectionException
Deprecated. 
Invokes an operation on an MBean.

Specified by:
invoke in interface MBeanInterceptor
Specified by:
invoke in interface ProxyHandler
Specified by:
invoke in interface MBeanServer
Specified by:
invoke in interface MBeanServerConnection
Parameters:
name - The object name of the MBean on which the method is to be invoked.
operationName - The name of the operation to be invoked.
params - An array containing the parameters to be set when the operation is invoked
signature - An array containing the signature of the operation. The class objects will be loaded using the same class loader as the one used for loading the MBean on which the operation was invoked.
Returns:
The object returned by the operation, which represents the result of invoking the operation on the MBean specified.
Throws:
InstanceNotFoundException - The MBean specified is not registered in the MBean server.
MBeanException - Wraps an exception thrown by the MBean's invoked method.
ReflectionException - Wraps an Exception thrown while trying to invoke the method.

getDefaultDomain

public String getDefaultDomain()
Deprecated. 
Returns the default domain used for naming the MBean. The default domain name is used as the domain part in the ObjectName of MBeans if no domain is specified by the user.

Specified by:
getDefaultDomain in interface MBeanInterceptor
Specified by:
getDefaultDomain in interface MBeanServer
Specified by:
getDefaultDomain in interface MBeanServerConnection

addNotificationListener

public void addNotificationListener(ObjectName name,
                                    NotificationListener listener,
                                    NotificationFilter filter,
                                    Object handback)
                             throws InstanceNotFoundException
Deprecated. 
Adds a listener to a registered MBean.

Specified by:
addNotificationListener in interface MBeanInterceptor
Specified by:
addNotificationListener in interface NotificationRegistration
Specified by:
addNotificationListener in interface MBeanServer
Specified by:
addNotificationListener in interface MBeanServerConnection
Parameters:
name - The name of the MBean on which the listener should be added.
listener - The listener object which will handle the notifications emitted by the registered MBean.
filter - The filter object. If filter is null, no filtering will be performed before handling notifications.
handback - The context to be sent to the listener when a notification is emitted.
Throws:
InstanceNotFoundException - The MBean name provided does not match any of the registered MBeans.

addNotificationListener

public void addNotificationListener(ObjectName name,
                                    ObjectName listener,
                                    NotificationFilter filter,
                                    Object handback)
                             throws InstanceNotFoundException
Deprecated. 
Adds a listener to a registered MBean.

Specified by:
addNotificationListener in interface MBeanInterceptor
Specified by:
addNotificationListener in interface MBeanServer
Specified by:
addNotificationListener in interface MBeanServerConnection
Parameters:
name - The name of the MBean on which the listener should be added.
listener - The object name of the listener which will handle the notifications emitted by the registered MBean.
filter - The filter object. If filter is null, no filtering will be performed before handling notifications.
handback - The context to be sent to the listener when a notification is emitted.
Throws:
InstanceNotFoundException - The MBean name of the notification listener or of the notification broadcaster does not match any of the registered MBeans.

removeNotificationListener

public void removeNotificationListener(ObjectName name,
                                       NotificationListener listener)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Deprecated. 
Removes a listener from a registered MBean.

Specified by:
removeNotificationListener in interface MBeanInterceptor
Specified by:
removeNotificationListener in interface NotificationRegistration
Specified by:
removeNotificationListener in interface MBeanServer
Specified by:
removeNotificationListener in interface MBeanServerConnection
Parameters:
name - The name of the MBean on which the listener should be removed.
listener - The listener object which will handle the notifications emitted by the registered MBean. This method will remove all the information related to this listener.
Throws:
InstanceNotFoundException - The MBean name provided does not match any of the registered MBeans.
ListenerNotFoundException - The listener is not registered in the MBean.

removeNotificationListener

public void removeNotificationListener(ObjectName name,
                                       ObjectName listener)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Deprecated. 
Removes a listener from a registered MBean.

Specified by:
removeNotificationListener in interface MBeanInterceptor
Specified by:
removeNotificationListener in interface MBeanServer
Specified by:
removeNotificationListener in interface MBeanServerConnection
Parameters:
name - The name of the MBean on which the listener should be removed.
listener - The object name of the listener which will handle the notifications emitted by the registered MBean. This method will remove all the information related to this listener.
Throws:
InstanceNotFoundException - The MBean name provided does not match any of the registered MBeans.
ListenerNotFoundException - The listener is not registered in the MBean.

getMBeanInfo

public MBeanInfo getMBeanInfo(ObjectName name)
                       throws InstanceNotFoundException,
                              IntrospectionException,
                              ReflectionException
Deprecated. 
This method discovers the attributes and operations that an MBean exposes for management.

Specified by:
getMBeanInfo in interface MBeanInterceptor
Specified by:
getMBeanInfo in interface ProxyHandler
Specified by:
getMBeanInfo in interface MBeanServer
Specified by:
getMBeanInfo in interface MBeanServerConnection
Parameters:
name - The name of the MBean to analyze
Returns:
An instance of MBeanInfo allowing the retrieval of all attributes and operations of this MBean.
Throws:
IntrospectionException - An exception occurs during introspection.
InstanceNotFoundException - The MBean specified is not found.
ReflectionException - An exception occurred when trying to invoke the getMBeanInfo of a Dynamic MBean.

instantiate

public Object instantiate(String className)
                   throws ReflectionException,
                          MBeanException
Deprecated. 
Instantiates an object using the list of all class loaders registered in the MBean server (using its Default Loader Repository). The object's class should have a public constructor. It returns a reference to the newly created object. The newly created object is not registered in the MBean server.

Specified by:
instantiate in interface MBeanServer
Parameters:
className - The class name of the object to be instantiated.
Returns:
The newly instantiated object.
Throws:
ReflectionException - Wraps the ClassNotFoundException or the Exception that occurred when trying to invoke the object's constructor.
MBeanException - The constructor of the object has thrown an exception.
RuntimeOperationsException - Wraps an IllegalArgumentException: The className passed in parameter is null.

instantiate

public Object instantiate(String className,
                          ObjectName loaderName)
                   throws ReflectionException,
                          MBeanException,
                          InstanceNotFoundException
Deprecated. 
Instantiates an object using the class Loader specified by its ObjectName. If the loader name is null, the ClassLoader that loaded the MBean Server will be used. The object's class should have a public constructor. It returns a reference to the newly created object. The newly created object is not registered in the MBean server.

Specified by:
instantiate in interface MBeanServer
Parameters:
className - The class name of the MBean to be instantiated.
loaderName - The object name of the class loader to be used.
Returns:
The newly instantiated object.
Throws:
ReflectionException - Wraps the ClassNotFoundException or the Exception that occurred when trying to invoke the object's constructor.
MBeanException - The constructor of the object has thrown an exception.
InstanceNotFoundException - The specified class loader is not registered in the MBaenServer.
RuntimeOperationsException - Wraps an IllegalArgumentException: The className passed in parameter is null.

instantiate

public Object instantiate(String className,
                          Object[] params,
                          String[] signature)
                   throws ReflectionException,
                          MBeanException
Deprecated. 
Instantiates an object using the list of all class loaders registered in the MBean server (using its Default Loader Repository). The object's class should have a public constructor. The call returns a reference to the newly created object. The newly created object is not registered in the MBean server.

Specified by:
instantiate in interface MBeanServer
Parameters:
className - The class name of the object to be instantiated.
params - An array containing the parameters of the constructor to be invoked.
signature - An array containing the signature of the constructor to be invoked.
Returns:
The newly instantiated object.
Throws:
ReflectionException - Wraps the ClassNotFoundException or the Exception that occurred when trying to invoke the object's constructor.
MBeanException - The constructor of the object has thrown an exception.
RuntimeOperationsException - Wraps an IllegalArgumentException: The className passed in parameter is null.

instantiate

public Object instantiate(String className,
                          ObjectName loaderName,
                          Object[] params,
                          String[] signature)
                   throws ReflectionException,
                          MBeanException,
                          InstanceNotFoundException
Deprecated. 
Instantiates an object. The class loader to be used is identified by its object name. If the object name of the loader is null, the ClassLoader that loaded the MBean server will be used. The object's class should have a public constructor. The call returns a reference to the newly created object. The newly created object is not registered in the MBean server.

Specified by:
instantiate in interface MBeanServer
Parameters:
className - The class name of the object to be instantiated.
params - An array containing the parameters of the constructor to be invoked.
signature - An array containing the signature of the constructor to be invoked.
loaderName - The object name of the class loader to be used.
Returns:
The newly instantiated object.
Throws:
ReflectionException - Wraps the ClassNotFoundException or the Exception that occurred when trying to invoke the object's constructor.
MBeanException - The constructor of the object has thrown an exception.
InstanceNotFoundException - The specified class loader is not registered in the MBean server.
RuntimeOperationsException - Wraps an IllegalArgumentException: The className passed in parameter is null.

isInstanceOf

public boolean isInstanceOf(ObjectName name,
                            String className)
                     throws InstanceNotFoundException
Deprecated. 
Returns true if the MBean specified is an instance of the specified class, false otherwise.

Specified by:
isInstanceOf in interface MBeanInterceptor
Specified by:
isInstanceOf in interface MBeanServer
Specified by:
isInstanceOf in interface MBeanServerConnection
Parameters:
name - The ObjectName of the MBean.
className - The name of the class.
Returns:
true if the MBean specified is an instance of the specified class, false otherwise.
Throws:
InstanceNotFoundException - The MBean specified is not registered in the MBean server.

deserialize

public ObjectInputStream deserialize(ObjectName name,
                                     byte[] data)
                              throws InstanceNotFoundException,
                                     OperationsException
Deprecated. 
De-serializes a byte array in the context of the class loader of an MBean.

Specified by:
deserialize in interface MBeanServer
Parameters:
name - The name of the MBean whose class loader should be used for the de-serialization.
data - The byte array to be de-sererialized.
Returns:
The de-serialized object stream.
Throws:
InstanceNotFoundException - The MBean specified is not found.
OperationsException - Any of the usual Input/Output related exceptions.

deserialize

public ObjectInputStream deserialize(String className,
                                     byte[] data)
                              throws OperationsException,
                                     ReflectionException
Deprecated. 
De-serializes a byte array in the context of a given MBean class loader. The class loader is the one that loaded the class with name "className".

Specified by:
deserialize in interface MBeanServer
Parameters:
className - The name of the class whose class loader should be used for the de-serialization.
data - The byte array to be de-sererialized.
Returns:
The de-serialized object stream.
Throws:
OperationsException - Any of the usual Input/Output related exceptions.
ReflectionException - The specified class could not be loaded by the default loader repository

deserialize

public ObjectInputStream deserialize(String className,
                                     ObjectName loaderName,
                                     byte[] data)
                              throws InstanceNotFoundException,
                                     OperationsException,
                                     ReflectionException
Deprecated. 
De-serializes a byte array in the context of a given MBean class loader. The class loader is the one that loaded the class with name "className". The name of the class loader to be used for loading the specified class is specified. If null, the MBean Server's class loader will be used.

Specified by:
deserialize in interface MBeanServer
Parameters:
className - The name of the class whose class loader should be used for the de-serialization.
data - The byte array to be de-sererialized.
loaderName - The name of the class loader to be used for loading the specified class. If null, the MBean Server's class loader will be used.
Returns:
The de-serialized object stream.
Throws:
InstanceNotFoundException - The specified class loader MBean is not found.
OperationsException - Any of the usual Input/Output related exceptions.
ReflectionException - The specified class could not be loaded by the specified class loader.

getMBeanClassLoader

public ClassLoader getMBeanClassLoader(ObjectName name)
                                throws InstanceNotFoundException
Deprecated. 
Return the ClassLoader of the MBean with the specified ObjectName.

Specified by:
getMBeanClassLoader in interface MBeanServerInterceptor
Specified by:
getMBeanClassLoader in interface MBeanInterceptor
Parameters:
name - The ObjectName of the MBean.
Returns:
The ClassLoader used for that MBean.
Throws:
InstanceNotFoundException - if the named MBean is not found.

getClassLoaderRepository

public ClassLoaderRepository getClassLoaderRepository()
Deprecated. 

Return the ClassLoaderRepository for this MBeanServer.

Specified by:
getClassLoaderRepository in interface MBeanServer
Returns:
The ClassLoaderRepository for this MBeanServer.
Since:
Java DMK 5.1 (JMX 1.2)

getClassLoaderFor

public ClassLoader getClassLoaderFor(ObjectName mbeanName)
                              throws InstanceNotFoundException
Deprecated. 
Description copied from interface: MBeanServerInterceptor

Return the ClassLoader that was used for loading the class of the named MBean.

Specified by:
getClassLoaderFor in interface MBeanServerInterceptor
Specified by:
getClassLoaderFor in interface MBeanServer
Parameters:
mbeanName - The ObjectName of the MBean.
Returns:
The ClassLoader used for that MBean.
Throws:
InstanceNotFoundException - if the named MBean is not found.
Since:
Java DMK 5.1 (JMX 1.2)

getClassLoader

public ClassLoader getClassLoader(ObjectName loaderName)
                           throws InstanceNotFoundException
Deprecated. 
Implements MBeanServer.getClassLoader(ObjectName). Contrarily to JMX 1.2 specifications, this methods only works for ClassLoaders that are registered in the ClassLoaderRepository. If you need a fully JMX 1.2 compatible MBeanServer use JdmkMBeanServerBuilder to create one.

Specified by:
getClassLoader in interface MBeanServerInterceptor
Specified by:
getClassLoader in interface MBeanServer
Parameters:
loaderName - The ObjectName of the ClassLoader.
Returns:
The named ClassLoader.
Throws:
InstanceNotFoundException - if the named ClassLoader is not found.
Since:
Java DMK 5.1 (JMX 1.2)

removeNotificationListener

public void removeNotificationListener(ObjectName name,
                                       NotificationListener listener,
                                       NotificationFilter filter,
                                       Object handback)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Deprecated. 
Only supported if the underlying interceptor is an instance of MBeanServerInterceptor Otherwise throws UnsupportedOperationException.

Specified by:
removeNotificationListener in interface MBeanServerInterceptor
Specified by:
removeNotificationListener in interface MBeanServer
Specified by:
removeNotificationListener in interface MBeanServerConnection
Parameters:
name - The name of the MBean on which the listener should be removed.
listener - A listener that was previously added to this MBean.
filter - The filter that was specified when the listener was added.
handback - The handback that was specified when the listener was added.
Throws:
UnsupportedOperationException - if the operation is not supported by the underlying interceptor.
InstanceNotFoundException - The MBean name provided does not match any of the registered MBeans.
ListenerNotFoundException - The listener is not registered in the MBean, or it is not registered with the given filter and handback.
Since:
Java DMK 1.5

removeNotificationListener

public void removeNotificationListener(ObjectName name,
                                       ObjectName listenerName,
                                       NotificationFilter filter,
                                       Object handback)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Deprecated. 
Only supported if the underlying interceptor is an instance of MBeanServerInterceptor Otherwise throws UnsupportedOperationException.

Specified by:
removeNotificationListener in interface MBeanServerInterceptor
Specified by:
removeNotificationListener in interface MBeanServer
Specified by:
removeNotificationListener in interface MBeanServerConnection
Parameters:
name - The name of the MBean on which the listener should be removed.
listenerName - A listener that was previously added to this MBean.
filter - The filter that was specified when the listener was added.
handback - The handback that was specified when the listener was added.
Throws:
UnsupportedOperationException - if the operation is not supported by the underlying interceptor.
InstanceNotFoundException - The MBean name provided does not match any of the registered MBeans.
ListenerNotFoundException - The listener is not registered in the MBean, or it is not registered with the given filter and handback.
Since:
Java DMK 1.5

getDomains

public String[] getDomains()
Deprecated. 
Description copied from interface: MBeanServerInterceptor
Returns the list of domains in which any MBean is currently registered.

Specified by:
getDomains in interface MBeanServerInterceptor
Specified by:
getDomains in interface MBeanServer
Specified by:
getDomains in interface MBeanServerConnection
Since:
Java DMK 1.5

getMBeanServerDelegate

public MBeanServerDelegate getMBeanServerDelegate()
Deprecated. 
Description copied from interface: MBeanServerInt
Return the MBeanServerDelegate representing the MBeanServer

Specified by:
getMBeanServerDelegate in interface MBeanServerInt

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.