|
Java™ Platform Standard Ed. 7 DRAFT ea-b76 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.management.namespace.MBeanServerConnectionWrapper
public class MBeanServerConnectionWrapper extends Object implements MBeanServer
An object of this class implements the MBeanServer interface
and, for each of its methods forwards the request to a wrapped
MBeanServerConnection object.
Some methods of the MBeanServer interface do not have
any equivalent in MBeanServerConnection. In that case, an
UnsupportedOperationException will be thrown.
A typical use of this class is to apply a QueryExp object locally,
on an MBean that resides in a remote MBeanServer. Since an
MBeanServerConnection is not an MBeanServer, it cannot be passed
to the setMBeanServer() method of the QueryExp
object. However, this object can.
| Constructor and Description |
|---|
MBeanServerConnectionWrapper(MBeanServerConnection wrapped)
Construct a new object that implements MBeanServer by
forwarding its methods to the given MBeanServerConnection. |
MBeanServerConnectionWrapper(MBeanServerConnection wrapped,
ClassLoader defaultCl)
Construct a new object that implements MBeanServer by
forwarding its methods to the given MBeanServerConnection. |
| Modifier and Type | Method and Description |
|---|---|
void |
addNotificationListener(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback)
Forward this method to the wrapped object. |
void |
addNotificationListener(ObjectName name,
ObjectName listener,
NotificationFilter filter,
Object handback)
Forward this method to the wrapped object. |
ObjectInstance |
createMBean(String className,
ObjectName name)
Forward this method to the wrapped object. |
ObjectInstance |
createMBean(String className,
ObjectName name,
Object[] params,
String[] signature)
Forward this method to the wrapped object. |
ObjectInstance |
createMBean(String className,
ObjectName name,
ObjectName loaderName)
Forward this method to the wrapped object. |
ObjectInstance |
createMBean(String className,
ObjectName name,
ObjectName loaderName,
Object[] params,
String[] signature)
Forward this method to the wrapped object. |
ObjectInputStream |
deserialize(ObjectName name,
byte[] data)
Deprecated. see MBeanServer |
ObjectInputStream |
deserialize(String className,
byte[] data)
Deprecated. see MBeanServer |
ObjectInputStream |
deserialize(String className,
ObjectName loaderName,
byte[] data)
Deprecated. see MBeanServer |
Object |
getAttribute(ObjectName name,
String attribute)
Forward this method to the wrapped object. |
AttributeList |
getAttributes(ObjectName name,
String[] attributes)
Forward this method to the wrapped object. |
ClassLoader |
getClassLoader(ObjectName loaderName)
Throws an UnsupportedOperationException. |
ClassLoader |
getClassLoaderFor(ObjectName mbeanName)
Returns the default class loader. |
ClassLoaderRepository |
getClassLoaderRepository()
Returns a ClassLoaderRepository based on the class loader
returned by getDefaultClassLoader(). |
ClassLoader |
getDefaultClassLoader()
Returns the default class loader passed to the constructor. |
String |
getDefaultDomain()
Forward this method to the wrapped object. |
String[] |
getDomains()
Forward this method to the wrapped object. |
Integer |
getMBeanCount()
Forward this method to the wrapped object. |
MBeanInfo |
getMBeanInfo(ObjectName name)
Forward this method to the wrapped object. |
protected MBeanServerConnection |
getMBeanServerConnection()
Returns an MBeanServerConnection. |
ObjectInstance |
getObjectInstance(ObjectName name)
Forward this method to the wrapped object. |
Object |
instantiate(String className)
Throws an UnsupportedOperationException. |
Object |
instantiate(String className,
Object[] params,
String[] signature)
Throws an UnsupportedOperationException. |
Object |
instantiate(String className,
ObjectName loaderName)
Throws an UnsupportedOperationException. |
Object |
instantiate(String className,
ObjectName loaderName,
Object[] params,
String[] signature)
Throws an UnsupportedOperationException. |
Object |
invoke(ObjectName name,
String operationName,
Object[] params,
String[] signature)
Forward this method to the wrapped object. |
boolean |
isInstanceOf(ObjectName name,
String className)
Forward this method to the wrapped object. |
boolean |
isRegistered(ObjectName name)
Forward this method to the wrapped object. |
Set<ObjectInstance> |
queryMBeans(ObjectName name,
QueryExp query)
Forward this method to the wrapped object. |
Set<ObjectName> |
queryNames(ObjectName name,
QueryExp query)
Forward this method to the wrapped object. |
ObjectInstance |
registerMBean(Object object,
ObjectName name)
Throws an UnsupportedOperationException. |
void |
removeNotificationListener(ObjectName name,
NotificationListener listener)
Forward this method to the wrapped object. |
void |
removeNotificationListener(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback)
Forward this method to the wrapped object. |
void |
removeNotificationListener(ObjectName name,
ObjectName listener)
Forward this method to the wrapped object. |
void |
removeNotificationListener(ObjectName name,
ObjectName listener,
NotificationFilter filter,
Object handback)
Forward this method to the wrapped object. |
void |
setAttribute(ObjectName name,
Attribute attribute)
Forward this method to the wrapped object. |
AttributeList |
setAttributes(ObjectName name,
AttributeList attributes)
Forward this method to the wrapped object. |
void |
unregisterMBean(ObjectName name)
Forward this method to the wrapped object. |
protected RuntimeException |
wrapIOException(IOException x,
String method)
This method is called each time an IOException is raised when trying to forward an operation to the underlying MBeanServerConnection, as a result of calling getMBeanServerConnection() or as a result of invoking the
operation on the returned connection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MBeanServerConnectionWrapper(MBeanServerConnection wrapped)
MBeanServer by
forwarding its methods to the given MBeanServerConnection.
This constructor is equivalent to MBeanServerConnectionWrapper(wrapped,
null).
wrapped - the MBeanServerConnection to which methods
are to be forwarded. This parameter can be null, in which case the
MBeanServerConnection will typically be supplied by overriding
getMBeanServerConnection().
public MBeanServerConnectionWrapper(MBeanServerConnection wrapped,
ClassLoader defaultCl)
MBeanServer by
forwarding its methods to the given MBeanServerConnection.
The defaultCl parameter specifies the value to be returned
by getDefaultClassLoader(). A null value is equivalent to
Thread.getContextClassLoader().
wrapped - the MBeanServerConnection to which methods
are to be forwarded. This parameter can be null, in which case the
MBeanServerConnection will typically be supplied by overriding
getMBeanServerConnection().defaultCl - the value to be returned by getDefaultClassLoader(). A null value is equivalent to the current
thread's Thread.getContextClassLoader().| Method Detail |
|---|
protected MBeanServerConnection getMBeanServerConnection()
public ClassLoader getDefaultClassLoader()
protected RuntimeException wrapIOException(IOException x,
String method)
This method is called each time an IOException is raised when
trying to forward an operation to the underlying
MBeanServerConnection, as a result of calling
getMBeanServerConnection() or as a result of invoking the
operation on the returned connection. Since the methods in
MBeanServer are not declared to throw IOException,
this method must return a RuntimeException to be thrown
instead. Typically, the original IOException will be in the
cause chain of the RuntimeException.
Subclasses may redefine this method if they need to perform any specific handling of IOException (logging etc...).
x - The raised IOException.method - The name of the method in which the exception was
raised. This is one of the methods of the MBeanServer
interface.RuntimeException wrapping x.
public void addNotificationListener(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback)
throws InstanceNotFoundException
addNotificationListener in interface NotificationManageraddNotificationListener in interface MBeanServeraddNotificationListener in interface MBeanServerConnectionname - 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.NotificationManager.removeNotificationListener(ObjectName, NotificationListener),
NotificationManager.removeNotificationListener(ObjectName, NotificationListener,
NotificationFilter, Object)
public void addNotificationListener(ObjectName name,
ObjectName listener,
NotificationFilter filter,
Object handback)
throws InstanceNotFoundException
addNotificationListener in interface MBeanServeraddNotificationListener in interface MBeanServerConnectionname - 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.MBeanServerConnection.removeNotificationListener(ObjectName, ObjectName),
MBeanServerConnection.removeNotificationListener(ObjectName, ObjectName,
NotificationFilter, Object)
public ObjectInstance createMBean(String className,
ObjectName name)
throws ReflectionException,
InstanceAlreadyExistsException,
MBeanRegistrationException,
MBeanException,
NotCompliantMBeanException
createMBean in interface MBeanServercreateMBean in interface MBeanServerConnectionclassName - 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. If the contained ObjectName
is n, the contained Java class name is
getMBeanInfo(n).getClassName().ReflectionException - Wraps a
java.lang.ClassNotFoundException or a
java.lang.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 exceptionNotCompliantMBeanException - This class is not a JMX
compliant MBeanMBeanRegistration
public ObjectInstance createMBean(String className,
ObjectName name,
Object[] params,
String[] signature)
throws ReflectionException,
InstanceAlreadyExistsException,
MBeanRegistrationException,
MBeanException,
NotCompliantMBeanException
createMBean in interface MBeanServercreateMBean in interface MBeanServerConnectionclassName - 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. If the contained ObjectName
is n, the contained Java class name is
getMBeanInfo(n).getClassName().ReflectionException - Wraps a
java.lang.ClassNotFoundException or a
java.lang.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 exceptionNotCompliantMBeanException - This class is not a JMX
compliant MBeanMBeanRegistration
public ObjectInstance createMBean(String className,
ObjectName name,
ObjectName loaderName)
throws ReflectionException,
InstanceAlreadyExistsException,
MBeanRegistrationException,
MBeanException,
NotCompliantMBeanException,
InstanceNotFoundException
createMBean in interface MBeanServercreateMBean in interface MBeanServerConnectionclassName - 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. If the contained ObjectName
is n, the contained Java class name is
getMBeanInfo(n).getClassName().ReflectionException - Wraps a
java.lang.ClassNotFoundException or a
java.lang.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 exceptionNotCompliantMBeanException - This class is not a JMX
compliant MBeanInstanceNotFoundException - The specified class loader
is not registered in the MBean server.MBeanRegistration
public ObjectInstance createMBean(String className,
ObjectName name,
ObjectName loaderName,
Object[] params,
String[] signature)
throws ReflectionException,
InstanceAlreadyExistsException,
MBeanRegistrationException,
MBeanException,
NotCompliantMBeanException,
InstanceNotFoundException
createMBean in interface MBeanServercreateMBean in interface MBeanServerConnectionclassName - 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.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. If the contained ObjectName
is n, the contained Java class name is
getMBeanInfo(n).getClassName().ReflectionException - Wraps a
java.lang.ClassNotFoundException or a
java.lang.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 exceptionNotCompliantMBeanException - This class is not a JMX
compliant MBeanInstanceNotFoundException - The specified class loader
is not registered in the MBean server.MBeanRegistration
@Deprecated
public ObjectInputStream deserialize(ObjectName name,
byte[] data)
throws InstanceNotFoundException,
OperationsException
MBeanServer
UnsupportedOperationException. This behavior can
be changed by subclasses.
deserialize in interface MBeanServername - 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.
@Deprecated
public ObjectInputStream deserialize(String className,
byte[] data)
throws OperationsException,
ReflectionException
MBeanServer
UnsupportedOperationException. This behavior can
be changed by subclasses.
deserialize in interface MBeanServerclassName - 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 class loader repository
@Deprecated
public ObjectInputStream deserialize(String className,
ObjectName loaderName,
byte[] data)
throws InstanceNotFoundException,
OperationsException,
ReflectionException
MBeanServer
UnsupportedOperationException. This behavior can
be changed by subclasses.
deserialize in interface MBeanServerclassName - 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, the MBean Server's 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.
public Object getAttribute(ObjectName name,
String attribute)
throws MBeanException,
AttributeNotFoundException,
InstanceNotFoundException,
ReflectionException
getAttribute in interface MBeanServergetAttribute in interface MBeanServerConnectionname - 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.MBeanException - Wraps an exception thrown by the
MBean's getter.AttributeNotFoundException - The attribute specified
is not accessible in the MBean.InstanceNotFoundException - The MBean specified is not
registered in the MBean server.ReflectionException - Wraps a
java.lang.Exception thrown when trying to invoke
the setter.MBeanServerConnection.setAttribute(javax.management.ObjectName, javax.management.Attribute)
public AttributeList getAttributes(ObjectName name,
String[] attributes)
throws InstanceNotFoundException,
ReflectionException
getAttributes in interface MBeanServergetAttributes in interface MBeanServerConnectionname - 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.MBeanServerConnection.setAttributes(javax.management.ObjectName, javax.management.AttributeList)
public ClassLoader getClassLoader(ObjectName loaderName)
throws InstanceNotFoundException
UnsupportedOperationException. This behavior can
be changed by subclasses.
getClassLoader in interface MBeanServerloaderName - The ObjectName of the ClassLoader. May be
null, in which case the MBean server's own ClassLoader is
returned..loadClass(s) is the
same as l.loadClass(s) for any string s.
InstanceNotFoundException - if the named ClassLoader is
not found.
public ClassLoader getClassLoaderFor(ObjectName mbeanName)
throws InstanceNotFoundException
getClassLoaderFor in interface MBeanServermbeanName - The ObjectName of the MBean..loadClass(s) is the
same as l.loadClass(s) for any string s.
InstanceNotFoundException - if the named MBean is not found.public ClassLoaderRepository getClassLoaderRepository()
Returns a ClassLoaderRepository based on the class loader
returned by getDefaultClassLoader().
getClassLoaderRepository in interface MBeanServerClassLoaderRepository that contains a single
class loader, returned by getDefaultClassLoader().public String getDefaultDomain()
getDefaultDomain in interface MBeanServergetDefaultDomain in interface MBeanServerConnectionpublic String[] getDomains()
getDomains in interface MBeanServergetDomains in interface MBeanServerConnectionpublic Integer getMBeanCount()
getMBeanCount in interface MBeanServergetMBeanCount in interface MBeanServerConnection
public MBeanInfo getMBeanInfo(ObjectName name)
throws InstanceNotFoundException,
IntrospectionException,
ReflectionException
getMBeanInfo in interface MBeanServergetMBeanInfo in interface MBeanServerConnectionname - The name of the MBean to analyzeMBeanInfo allowing the
retrieval of all attributes and operations of this MBean.InstanceNotFoundException - The MBean specified was
not found.IntrospectionException - An exception occurred during
introspection.ReflectionException - An exception occurred when
trying to invoke the getMBeanInfo of a Dynamic MBean.
public ObjectInstance getObjectInstance(ObjectName name)
throws InstanceNotFoundException
getObjectInstance in interface MBeanServergetObjectInstance in interface MBeanServerConnectionname - The object name of the MBean.ObjectInstance associated with the MBean
specified by name. The contained ObjectName
is name and the contained class name is
getMBeanInfo(name).getClassName().InstanceNotFoundException - The MBean specified is not
registered in the MBean server.
public Object instantiate(String className)
throws ReflectionException,
MBeanException
UnsupportedOperationException. This behavior can
be changed by subclasses.
instantiate in interface MBeanServerclassName - 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
public Object instantiate(String className,
Object[] params,
String[] signature)
throws ReflectionException,
MBeanException
UnsupportedOperationException. This behavior can
be changed by subclasses.
instantiate in interface MBeanServerclassName - 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
public Object instantiate(String className,
ObjectName loaderName)
throws ReflectionException,
MBeanException,
InstanceNotFoundException
UnsupportedOperationException. This behavior can
be changed by subclasses.
instantiate in interface MBeanServerclassName - 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 MBeanServer.
public Object instantiate(String className,
ObjectName loaderName,
Object[] params,
String[] signature)
throws ReflectionException,
MBeanException,
InstanceNotFoundException
UnsupportedOperationException. This behavior can
be changed by subclasses.
instantiate in interface MBeanServerclassName - 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 exceptionInstanceNotFoundException - The specified class loader
is not registered in the MBean server.
public Object invoke(ObjectName name,
String operationName,
Object[] params,
String[] signature)
throws InstanceNotFoundException,
MBeanException,
ReflectionException
invoke in interface MBeanServerinvoke in interface MBeanServerConnectionname - 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, an array of class names in the format returned by
Class.getName(). 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 a
java.lang.Exception thrown while trying to invoke
the method.
public boolean isInstanceOf(ObjectName name,
String className)
throws InstanceNotFoundException
isInstanceOf in interface MBeanServerisInstanceOf in interface MBeanServerConnectionname - The ObjectName of the MBean.className - The name of the class.InstanceNotFoundException - The MBean specified is not
registered in the MBean server.Class.isInstance(java.lang.Object)public boolean isRegistered(ObjectName name)
isRegistered in interface MBeanServerisRegistered in interface MBeanServerConnectionname - The object name of the MBean to be checked.
public Set<ObjectInstance> queryMBeans(ObjectName name,
QueryExp query)
queryMBeans in interface MBeanServerqueryMBeans in interface MBeanServerConnectionname - 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. ObjectName patterns that may be contained in the
query expression will be
evaluated in the context of the
namespace
in which the MBeans selected by name are registered.
Thus, in the query parameter, no ObjectName pattern containing a
namespace path can match any of the MBean names selected by name.
See the
namespaces documentation for more details.ObjectInstance
objects for the selected MBeans. If no MBean satisfies the
query an empty list is returned.
public Set<ObjectName> queryNames(ObjectName name,
QueryExp query)
queryNames in interface MBeanServerqueryNames in interface MBeanServerConnectionname - The object name pattern identifying the MBean names
to be retrieved. If null or no domain and key properties are
specified, the name of all registered MBeans will be retrieved.query - The query expression to be applied for selecting
MBeans. If null no query expression will be applied for
selecting MBeans. ObjectName patterns that may be contained in the
query expression will be
evaluated in the context of the
namespace
in which the MBeans slected by name are registered.
Thus, in the query parameter, no ObjectName pattern containing a
namespace path can match any of the MBean names selected by name.
See the
namespaces documentation for more details.
public ObjectInstance registerMBean(Object object,
ObjectName name)
throws InstanceAlreadyExistsException,
MBeanRegistrationException,
NotCompliantMBeanException
UnsupportedOperationException. This behavior can
be changed by subclasses.
registerMBean in interface MBeanServerobject - The MBean to be registered as an MBean.name - The object name of the MBean. May be null.ObjectInstance, containing the
ObjectName and the Java class name of the newly
registered MBean. If the contained ObjectName
is n, the contained Java class name is
getMBeanInfo(n).getClassName().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 MBeanMBeanRegistration
public void removeNotificationListener(ObjectName name,
NotificationListener listener)
throws InstanceNotFoundException,
ListenerNotFoundException
removeNotificationListener in interface NotificationManagerremoveNotificationListener in interface MBeanServerremoveNotificationListener in interface MBeanServerConnectionname - The name of the MBean on which the listener should
be removed.listener - The listener to be removed.InstanceNotFoundException - The MBean name provided
does not match any of the registered MBeans.ListenerNotFoundException - The listener is not
registered in the MBean.NotificationManager.addNotificationListener(ObjectName, NotificationListener,
NotificationFilter, Object)
public void removeNotificationListener(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback)
throws InstanceNotFoundException,
ListenerNotFoundException
removeNotificationListener in interface NotificationManagerremoveNotificationListener in interface MBeanServerremoveNotificationListener in interface MBeanServerConnectionname - The name of the MBean on which the listener should
be removed.listener - The listener to be removed.filter - The filter that was specified when the listener
was added.handback - The handback that was specified when the
listener was added.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.NotificationManager.addNotificationListener(ObjectName, NotificationListener,
NotificationFilter, Object)
public void removeNotificationListener(ObjectName name,
ObjectName listener)
throws InstanceNotFoundException,
ListenerNotFoundException
removeNotificationListener in interface MBeanServerremoveNotificationListener in interface MBeanServerConnectionname - The name of the MBean on which the listener should
be removed.listener - The object name of the listener to be removed.InstanceNotFoundException - The MBean name provided
does not match any of the registered MBeans.ListenerNotFoundException - The listener is not
registered in the MBean.MBeanServerConnection.addNotificationListener(ObjectName, ObjectName,
NotificationFilter, Object)
public void removeNotificationListener(ObjectName name,
ObjectName listener,
NotificationFilter filter,
Object handback)
throws InstanceNotFoundException,
ListenerNotFoundException
removeNotificationListener in interface MBeanServerremoveNotificationListener in interface MBeanServerConnectionname - The name of the MBean on which the listener should
be removed.listener - The object name of the listener to be removed.filter - The filter that was specified when the listener
was added.handback - The handback that was specified when the
listener was added.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.MBeanServerConnection.addNotificationListener(ObjectName, ObjectName,
NotificationFilter, Object)
public void setAttribute(ObjectName name,
Attribute attribute)
throws InstanceNotFoundException,
AttributeNotFoundException,
InvalidAttributeValueException,
MBeanException,
ReflectionException
setAttribute in interface MBeanServersetAttribute in interface MBeanServerConnectionname - 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 a
java.lang.Exception thrown when trying to invoke
the setter.MBeanServerConnection.getAttribute(javax.management.ObjectName, java.lang.String)
public AttributeList setAttributes(ObjectName name,
AttributeList attributes)
throws InstanceNotFoundException,
ReflectionException
setAttributes in interface MBeanServersetAttributes in interface MBeanServerConnectionname - 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.MBeanServerConnection.getAttributes(javax.management.ObjectName, java.lang.String[])
public void unregisterMBean(ObjectName name)
throws InstanceNotFoundException,
MBeanRegistrationException
unregisterMBean in interface MBeanServerunregisterMBean in interface MBeanServerConnectionname - The object name of the MBean to be unregistered.InstanceNotFoundException - The MBean specified is not
registered in the MBean server.MBeanRegistrationException - The preDeregister
((MBeanRegistration interface) method of the MBean
has thrown an exception.MBeanRegistration
|
Java™ Platform Standard Ed. 7 DRAFT ea-b76 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.