java.lang.Object | |
↳ | com.sun.jmx.mbeanserver.MBeanInstantiator |
Implements the MBeanInstantiator interface. Provides methods for instantiating objects, finding the class given its name and using different class loaders, deserializing objects in the context of a given class loader.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
De-serializes a byte array in the context of a given MBean class loader.
| |||||||||||
De-serializes a byte array in the context of a classloader.
| |||||||||||
Gets the class for the specified class name using the MBean
Interceptor's classloader
| |||||||||||
Gets the class for the specified class name using the specified
class loader
| |||||||||||
Loads the class with the specified name using this object's
Default Loader Repository.
| |||||||||||
Return an array of Class corresponding to the given signature, using
the specified class loader.
| |||||||||||
Return the Default Loader Repository used by this instantiator object.
| |||||||||||
Instantiates an object.
| |||||||||||
Instantiates an object using the class Loader specified by its
ObjectName . | |||||||||||
Instantiates an object given its class, the parameters and
signature of its constructor The call returns a reference to
the newly created object.
| |||||||||||
Instantiates an object using the list of all class loaders registered
in the MBean server
(using its
ClassLoaderRepository ). | |||||||||||
Instantiates an object given its class, using its empty constructor.
| |||||||||||
Instantiates an object using the list of all class loaders registered
in the MBean Interceptor
(using its
ClassLoaderRepository ). | |||||||||||
This methods tests if the MBean class makes it possible to
instantiate an MBean of this class in the MBeanServer.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
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, a default one has to be provided (for a MBean Server, its own class loader will be used).
className | The name of the class whose class loader should be used for the de-serialization. |
---|---|
loaderName | The name of the class loader to be used for loading the specified class. If null, a default one has to be provided (for a MBean Server, its own class loader will be used). |
data | The byte array to be de-sererialized. |
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. |
De-serializes a byte array in the context of a classloader.
loader | the classloader to use for de-serialization |
---|---|
data | The byte array to be de-sererialized. |
OperationsException | Any of the usual Input/Output related exceptions. |
---|
Gets the class for the specified class name using the MBean Interceptor's classloader
ReflectionException |
---|
Gets the class for the specified class name using the specified class loader
Loads the class with the specified name using this object's Default Loader Repository.
ReflectionException |
---|
Return an array of Class corresponding to the given signature, using the specified class loader.
ReflectionException |
---|
Return the Default Loader Repository used by this instantiator object.
Instantiates an object. The class loader to be used is identified by its object name.
If the object name of the loader is null, a default has to be provided (for example, for a MBean Server, the ClassLoader that loaded it 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.
className | The class name of the object to be instantiated. |
---|---|
loaderName | The object name of the class loader to be used. |
params | An array containing the parameters of the constructor to be invoked. |
signature | An array containing the signature of the constructor to be invoked. |
ReflectionException | Wraps a
java.lang.ClassNotFoundException or the
java.lang.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 Interceptor. |
RuntimeOperationsException | Wraps a
java.lang.IllegalArgumentException : the className passed in
parameter is null.
|
Instantiates an object using the class Loader specified by its
ObjectName
.
If the loader name is null, a default one has to be provided (for a MBean Server, the ClassLoader that loaded it 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 Interceptor.
className | The class name of the MBean to be instantiated. |
---|---|
loaderName | The object name of the class loader to be used. |
ReflectionException | Wraps a
java.lang.ClassNotFoundException or the
java.lang.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 MBeanServerInterceptor. |
RuntimeOperationsException | Wraps a
java.lang.IllegalArgumentException : the className passed in
parameter is null.
|
Instantiates an object given its class, the parameters and signature of its constructor The call returns a reference to the newly created object.
Instantiates an object using the list of all class loaders registered
in the MBean server
(using its ClassLoaderRepository
).
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 Interceptor.
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. |
ReflectionException | Wraps a
java.lang.ClassNotFoundException or the
java.lang.Exception that occurred when trying to invoke the
object's constructor. |
---|---|
MBeanException | The constructor of the object has thrown an exception |
RuntimeOperationsException | Wraps a
java.lang.IllegalArgumentException : the className passed in
parameter is null.
|
Instantiates an object given its class, using its empty constructor. The call returns a reference to the newly created object.
Instantiates an object using the list of all class loaders registered
in the MBean Interceptor
(using its ClassLoaderRepository
).
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 Interceptor.
className | The class name of the object to be instantiated. |
---|
ReflectionException | Wraps a
java.lang.ClassNotFoundException or the
java.lang.Exception that occurred when trying to invoke the
object's constructor. |
---|---|
MBeanException | The constructor of the object has thrown an exception |
RuntimeOperationsException | Wraps a
java.lang.IllegalArgumentException : the className passed in
parameter is null.
|
This methods tests if the MBean class makes it possible to instantiate an MBean of this class in the MBeanServer. e.g. it must have a public constructor, be a concrete class...
NotCompliantMBeanException |
---|