|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.jdmk.MBeanServerImpl
JdmkMBeanServerBuilder
instead.
public class MBeanServerImpl
Deprecated. Use objects returned by
JdmkMBeanServerBuilder
instead.
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 |
---|
public MBeanServerImpl(MBeanInstantiator instantiator)
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
MBeanServerFactory.createMBeanServer()
or
MBeanServerFactory.newMBeanServer()
instead.
instantiator
- The MBeanInstantiator that will be used to
instantiate MBeans and take care of class loading issues.
This parameter may not be null.
IllegalArgumentException
- if the instantiator is null.public MBeanServerImpl(MBeanInstantiator instantiator, String domain)
MBeanServerFactory
.
The default domain name is used as the domain part in the ObjectName of MBeans if no domain is specified by the user.
MBeanServerFactory.createMBeanServer(java.lang.String)
or
MBeanServerFactory.newMBeanServer(java.lang.String)
instead.
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
IllegalArgumentException
- if the instantiator is null.public MBeanServerImpl(MBeanInstantiator instantiator, MetaData metadata, String domain)
MBeanServerFactory
.
The default domain name is used as the domain part in the ObjectName of MBeans if no domain is specified by the user.
MBeanServerFactory.createMBeanServer(java.lang.String)
or
MBeanServerFactory.newMBeanServer(java.lang.String)
instead.
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
IllegalArgumentException
- if the instantiator is null.Method Detail |
---|
public MBeanInstantiator getMBeanInstantiator()
getMBeanInstantiator
in interface MBeanServerInt
public MetaData getMetaData()
getMetaData
in interface MBeanServerInt
public MBeanInterceptor getDefaultMBeanInterceptor()
getDefaultMBeanInterceptor
in interface MBeanServerInt
public void setDefaultMBeanInterceptor(MBeanInterceptor mbi) throws IllegalArgumentException
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.
setDefaultMBeanInterceptor
in interface MBeanServerInt
mbi
- the new object.
IllegalArgumentException
- if mbi
is null.public ObjectInstance createMBean(String className, ObjectName name) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException
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.
createMBean
in interface MBeanServer
createMBean
in interface MBeanServerConnection
className
- The class name of the MBean to be instantiated.name
- The object name of the MBean. May be null.
ObjectInstance
, containing the
ObjectName
and the Java class name of the newly
instantiated MBean.
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.public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException
MBeanRegistration
interface.
The call returns an ObjectInstance
object representing
the newly created MBean.
createMBean
in interface MBeanServer
createMBean
in interface MBeanServerConnection
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.
ObjectInstance
, containing the
ObjectName
and the Java class name
of the newly instantiated MBean.
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.public ObjectInstance createMBean(String className, ObjectName name, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException
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.
createMBean
in interface MBeanInterceptor
createMBean
in interface MBeanServer
createMBean
in interface MBeanServerConnection
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.
ObjectInstance
, containing the
ObjectName
and the Java class name
of the newly instantiated MBean.
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
public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException
MBeanRegistration
interface.
The call returns an ObjectInstance
object representing
the newly created MBean.
createMBean
in interface MBeanInterceptor
createMBean
in interface MBeanServer
createMBean
in interface MBeanServerConnection
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.
ObjectInstance
, containing the
ObjectName
and the Java class name of the newly
instantiated MBean.
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
public ObjectInstance registerMBean(Object object, ObjectName name) throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException
MBeanRegistration
interface.
The call returns an ObjectInstance
object representing
the registered MBean.
registerMBean
in interface MBeanInterceptor
registerMBean
in interface MBeanServer
object
- The MBean to be registered as an MBean.name
- The object name of the MBean. May be null.
ObjectInstance
for the MBean that has been
registered.
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.public void unregisterMBean(ObjectName name) throws InstanceNotFoundException, MBeanRegistrationException
unregisterMBean
in interface MBeanInterceptor
unregisterMBean
in interface ProxyHandler
unregisterMBean
in interface MBeanServer
unregisterMBean
in interface MBeanServerConnection
name
- The object name of the MBean to be de-registered.
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.
public ObjectInstance getObjectInstance(ObjectName name) throws InstanceNotFoundException
ObjectInstance
for a given MBean registered
with the MBean server.
getObjectInstance
in interface MBeanInterceptor
getObjectInstance
in interface MBeanServer
getObjectInstance
in interface MBeanServerConnection
name
- The object name of the MBean.
ObjectInstance
associated to the MBean
specified by name.
InstanceNotFoundException
- The MBean specified is not
registered in the MBean server.public Set queryMBeans(ObjectName name, QueryExp query)
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.
queryMBeans
in interface MBeanInterceptor
queryMBeans
in interface MBeanServer
queryMBeans
in interface MBeanServerConnection
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.
ObjectInstance
objects
for the selected MBeans.
If no MBean satisfies the query an empty list is returned.public Set queryNames(ObjectName name, QueryExp query)
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.
queryNames
in interface MBeanInterceptor
queryNames
in interface MBeanServer
queryNames
in interface MBeanServerConnection
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.
public boolean isRegistered(ObjectName name)
isRegistered
in interface MBeanInterceptor
isRegistered
in interface MBeanServer
isRegistered
in interface MBeanServerConnection
name
- The object name of the MBean to be checked.
RuntimeOperationsException
- Wraps an
IllegalArgumentException
: The object
name in parameter is null.public Integer getMBeanCount()
getMBeanCount
in interface MBeanInterceptor
getMBeanCount
in interface MBeanServer
getMBeanCount
in interface MBeanServerConnection
public Object getAttribute(ObjectName name, String attribute) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException
getAttribute
in interface MBeanInterceptor
getAttribute
in interface ProxyHandler
getAttribute
in interface MBeanServer
getAttribute
in interface MBeanServerConnection
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.
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.public AttributeList getAttributes(ObjectName name, String[] attributes) throws InstanceNotFoundException, ReflectionException
getAttributes
in interface MBeanInterceptor
getAttributes
in interface ProxyHandler
getAttributes
in interface MBeanServer
getAttributes
in interface MBeanServerConnection
name
- The object name of the MBean from which the attributes are
retrieved.attributes
- A list of the attributes to be retrieved.
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.public void setAttribute(ObjectName name, Attribute attribute) throws InstanceNotFoundException, AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
setAttribute
in interface MBeanInterceptor
setAttribute
in interface ProxyHandler
setAttribute
in interface MBeanServer
setAttribute
in interface MBeanServerConnection
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.
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.public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws InstanceNotFoundException, ReflectionException
setAttributes
in interface MBeanInterceptor
setAttributes
in interface ProxyHandler
setAttributes
in interface MBeanServer
setAttributes
in interface MBeanServerConnection
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.
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.public Object invoke(ObjectName name, String operationName, Object[] params, String[] signature) throws InstanceNotFoundException, MBeanException, ReflectionException
invoke
in interface MBeanInterceptor
invoke
in interface ProxyHandler
invoke
in interface MBeanServer
invoke
in interface MBeanServerConnection
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 invokedsignature
- 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.
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.public String getDefaultDomain()
getDefaultDomain
in interface MBeanInterceptor
getDefaultDomain
in interface MBeanServer
getDefaultDomain
in interface MBeanServerConnection
public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException
addNotificationListener
in interface MBeanInterceptor
addNotificationListener
in interface NotificationRegistration
addNotificationListener
in interface MBeanServer
addNotificationListener
in interface MBeanServerConnection
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.
InstanceNotFoundException
- The MBean name provided does
not match any of the registered MBeans.public void addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException
addNotificationListener
in interface MBeanInterceptor
addNotificationListener
in interface MBeanServer
addNotificationListener
in interface MBeanServerConnection
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.
InstanceNotFoundException
- The MBean name of the
notification listener or of the notification broadcaster
does not match any of the registered MBeans.public void removeNotificationListener(ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException
removeNotificationListener
in interface MBeanInterceptor
removeNotificationListener
in interface NotificationRegistration
removeNotificationListener
in interface MBeanServer
removeNotificationListener
in interface MBeanServerConnection
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.
InstanceNotFoundException
- The MBean name provided does not match any of the registered MBeans.
ListenerNotFoundException
- The listener is not registered in the MBean.public void removeNotificationListener(ObjectName name, ObjectName listener) throws InstanceNotFoundException, ListenerNotFoundException
removeNotificationListener
in interface MBeanInterceptor
removeNotificationListener
in interface MBeanServer
removeNotificationListener
in interface MBeanServerConnection
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.
InstanceNotFoundException
- The MBean name provided does not match any of the registered MBeans.
ListenerNotFoundException
- The listener is not registered in the MBean.public MBeanInfo getMBeanInfo(ObjectName name) throws InstanceNotFoundException, IntrospectionException, ReflectionException
getMBeanInfo
in interface MBeanInterceptor
getMBeanInfo
in interface ProxyHandler
getMBeanInfo
in interface MBeanServer
getMBeanInfo
in interface MBeanServerConnection
name
- The name of the MBean to analyze
MBeanInfo
allowing the retrieval of all attributes and operations
of this MBean.
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.public Object instantiate(String className) throws ReflectionException, MBeanException
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.
instantiate
in interface MBeanServer
className
- The class name of the object to be instantiated.
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.public Object instantiate(String className, ObjectName loaderName) throws ReflectionException, MBeanException, InstanceNotFoundException
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.
instantiate
in interface MBeanServer
className
- The class name of the MBean to be instantiated.loaderName
- The object name of the class loader to be used.
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.public Object instantiate(String className, Object[] params, String[] signature) throws ReflectionException, MBeanException
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.
instantiate
in interface MBeanServer
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 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.public Object instantiate(String className, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, MBeanException, InstanceNotFoundException
instantiate
in interface MBeanServer
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.
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.public boolean isInstanceOf(ObjectName name, String className) throws InstanceNotFoundException
isInstanceOf
in interface MBeanInterceptor
isInstanceOf
in interface MBeanServer
isInstanceOf
in interface MBeanServerConnection
name
- The ObjectName
of the MBean.className
- The name of the class.
InstanceNotFoundException
- The MBean specified is not
registered in the MBean server.public ObjectInputStream deserialize(ObjectName name, byte[] data) throws InstanceNotFoundException, OperationsException
deserialize
in interface MBeanServer
name
- The name of the MBean whose class loader should
be used for the de-serialization.data
- The byte array to be de-sererialized.
InstanceNotFoundException
- The MBean specified is not
found.
OperationsException
- Any of the usual Input/Output
related exceptions.public ObjectInputStream deserialize(String className, byte[] data) throws OperationsException, ReflectionException
deserialize
in interface MBeanServer
className
- The name of the class whose class loader should be
used for the de-serialization.data
- The byte array to be de-sererialized.
OperationsException
- Any of the usual Input/Output
related exceptions.
ReflectionException
- The specified class could not be
loaded by the default loader repositorypublic ObjectInputStream deserialize(String className, ObjectName loaderName, byte[] data) throws InstanceNotFoundException, OperationsException, ReflectionException
deserialize
in interface MBeanServer
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.
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.public ClassLoader getMBeanClassLoader(ObjectName name) throws InstanceNotFoundException
getMBeanClassLoader
in interface MBeanServerInterceptor
getMBeanClassLoader
in interface MBeanInterceptor
name
- The ObjectName of the MBean.
InstanceNotFoundException
- if the named MBean is not found.public ClassLoaderRepository getClassLoaderRepository()
Return the ClassLoaderRepository for this MBeanServer.
getClassLoaderRepository
in interface MBeanServer
public ClassLoader getClassLoaderFor(ObjectName mbeanName) throws InstanceNotFoundException
MBeanServerInterceptor
Return the ClassLoader
that was used for
loading the class of the named MBean.
getClassLoaderFor
in interface MBeanServerInterceptor
getClassLoaderFor
in interface MBeanServer
mbeanName
- The ObjectName of the MBean.
InstanceNotFoundException
- if the named MBean is not found.public ClassLoader getClassLoader(ObjectName loaderName) throws InstanceNotFoundException
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.
getClassLoader
in interface MBeanServerInterceptor
getClassLoader
in interface MBeanServer
loaderName
- The ObjectName of the ClassLoader.
InstanceNotFoundException
- if the named ClassLoader is
not found.public void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException
MBeanServerInterceptor
Otherwise throws UnsupportedOperationException.
removeNotificationListener
in interface MBeanServerInterceptor
removeNotificationListener
in interface MBeanServer
removeNotificationListener
in interface MBeanServerConnection
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.
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.public void removeNotificationListener(ObjectName name, ObjectName listenerName, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException
MBeanServerInterceptor
Otherwise throws UnsupportedOperationException.
removeNotificationListener
in interface MBeanServerInterceptor
removeNotificationListener
in interface MBeanServer
removeNotificationListener
in interface MBeanServerConnection
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.
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.public String[] getDomains()
MBeanServerInterceptor
getDomains
in interface MBeanServerInterceptor
getDomains
in interface MBeanServer
getDomains
in interface MBeanServerConnection
public MBeanServerDelegate getMBeanServerDelegate()
MBeanServerInt
getMBeanServerDelegate
in interface MBeanServerInt
|
Open Source build 02 opendmk-1.0-b02 2007.10.01_19:17:46_MEST |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |