mx4j.remote.rmi
Class ClientInvoker

java.lang.Object
  extended by mx4j.remote.rmi.ClientInvoker
All Implemented Interfaces:
javax.management.MBeanServerConnection

public class ClientInvoker
extends java.lang.Object
implements javax.management.MBeanServerConnection

An MBeanServerConnection that "converts" the MBeanServerConnection calls to RMIConnection calls, performing wrapping of parameters and/or the needed actions.

Version:
$Revision: 1.9 $
See Also:
RMIConnectionInvoker

Constructor Summary
ClientInvoker(javax.management.remote.rmi.RMIConnection rmiConnection, RemoteNotificationClientHandler notificationHandler, javax.security.auth.Subject delegate)
           
 
Method Summary
 void addNotificationListener(javax.management.ObjectName observed, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
          Adds a NotificationListener to a registered MBean.
 void addNotificationListener(javax.management.ObjectName observed, javax.management.ObjectName listener, javax.management.NotificationFilter filter, java.lang.Object handback)
          Adds a NotificationListener to a registered MBean.
 javax.management.ObjectInstance createMBean(java.lang.String className, javax.management.ObjectName objectName)
          A facility method for createMBean(className, objectName, null, null).
 javax.management.ObjectInstance createMBean(java.lang.String className, javax.management.ObjectName objectName, java.lang.Object[] args, java.lang.String[] parameters)
          Instantiates and registers an MBean of the specified class with the given ObjectName in the MBeanServer.
 javax.management.ObjectInstance createMBean(java.lang.String className, javax.management.ObjectName objectName, javax.management.ObjectName loaderName)
          A facility method for createMBean(className, objectName, loaderName, null, null).
 javax.management.ObjectInstance createMBean(java.lang.String className, javax.management.ObjectName objectName, javax.management.ObjectName loaderName, java.lang.Object[] args, java.lang.String[] parameters)
          Instantiates and registers an MBean of the specified class with the given ObjectName in the MBeanServer.
 java.lang.Object getAttribute(javax.management.ObjectName objectName, java.lang.String attribute)
          Gets the value of the specified attribute of the named MBean.
 javax.management.AttributeList getAttributes(javax.management.ObjectName objectName, java.lang.String[] attributes)
          Gets the values of several attributes of the named MBean.
 java.lang.String getDefaultDomain()
          Returns the default domain for this MBeanServer used in case ObjectName domain are not specified.
 java.lang.String[] getDomains()
          Returns the list of different ObjectName domains under which the MBeans in this MBeanServer are registered.
 java.lang.Integer getMBeanCount()
          Returns the number of MBeans registered in this MBeanServer.
 javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName objectName)
          Returns the metadata information exposed for management about the named MBean.
 javax.management.ObjectInstance getObjectInstance(javax.management.ObjectName objectName)
          Gets the ObjectInstance for the named MBean registered with the MBeanServer.
 java.lang.Object invoke(javax.management.ObjectName objectName, java.lang.String methodName, java.lang.Object[] args, java.lang.String[] parameters)
          Invokes the specified operation on the named MBean.
 boolean isInstanceOf(javax.management.ObjectName objectName, java.lang.String className)
          Returns whether the MBean specified is an instance of the specified class.
 boolean isRegistered(javax.management.ObjectName objectName)
          Checks whether the given ObjectName identifies an MBean registered in this MBeanServer.
 java.util.Set queryMBeans(javax.management.ObjectName patternName, javax.management.QueryExp filter)
          Gets a subset of the ObjectInstances belonging to MBeans registered in this MBeanServer.
 java.util.Set queryNames(javax.management.ObjectName patternName, javax.management.QueryExp filter)
          Gets a subset of the ObjectNames belonging to MBeans registered in this MBeanServer.
 void removeNotificationListener(javax.management.ObjectName observed, javax.management.NotificationListener listener)
          Removes the specified listener from the named source MBean.
 void removeNotificationListener(javax.management.ObjectName observed, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
          Removes the specified listener from the named source MBean.
 void removeNotificationListener(javax.management.ObjectName observed, javax.management.ObjectName listener)
          Removes the specified listener MBean from the named source MBean.
 void removeNotificationListener(javax.management.ObjectName observed, javax.management.ObjectName listener, javax.management.NotificationFilter filter, java.lang.Object handback)
          Removes the specified listener MBean from the named source MBean.
 void setAttribute(javax.management.ObjectName objectName, javax.management.Attribute attribute)
          Sets the value of the specified attribute of the named MBean.
 javax.management.AttributeList setAttributes(javax.management.ObjectName objectName, javax.management.AttributeList attributes)
          Sets the values of several attributes of the named MBean.
 void unregisterMBean(javax.management.ObjectName objectName)
          Unregisters the MBean with the specified ObjectName from this MBeanServer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientInvoker

public ClientInvoker(javax.management.remote.rmi.RMIConnection rmiConnection,
                     RemoteNotificationClientHandler notificationHandler,
                     javax.security.auth.Subject delegate)
Method Detail

addNotificationListener

public void addNotificationListener(javax.management.ObjectName observed,
                                    javax.management.NotificationListener listener,
                                    javax.management.NotificationFilter filter,
                                    java.lang.Object handback)
                             throws javax.management.InstanceNotFoundException,
                                    java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Adds a NotificationListener to a registered MBean. A notification emitted by the specified source MBean will be forwarded by the MBeanServer to the given listener, if the given NotificationFilter allows so. If the filter is null, every notification will be sent to the listener. The handback object is transparently passed to the listener by the MBeanServer. The source of the notification is the source MBean ObjectName.

Specified by:
addNotificationListener in interface javax.management.MBeanServerConnection
Parameters:
observed - The ObjectName of the source MBean on which the listener should be added.
listener - The listener which will handle the notifications emitted by the source MBean.
filter - The filter which will allow the notification to be forwarded to the listener.
handback - The context to be sent to the listener when a notification is emitted.
Throws:
javax.management.InstanceNotFoundException - If the source MBean is not registered in the MBeanServer.
java.io.IOException - If a communication problem occurred.
See Also:
MBeanServerConnection.removeNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)

removeNotificationListener

public void removeNotificationListener(javax.management.ObjectName observed,
                                       javax.management.NotificationListener listener)
                                throws javax.management.InstanceNotFoundException,
                                       javax.management.ListenerNotFoundException,
                                       java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Removes the specified listener from the named source MBean. If the listener is registered more than once, for example with different filters or handbacks, this method will remove all those registrations.

Specified by:
removeNotificationListener in interface javax.management.MBeanServerConnection
Parameters:
observed - The ObjectName of the source MBean on which the listener should be removed.
listener - The listener to be removed.
Throws:
javax.management.InstanceNotFoundException - If the source MBean is not registered in the MBeanServer.
javax.management.ListenerNotFoundException - If the listener is not registered in the MBean.
java.io.IOException - If a communication problem occurred.
See Also:
MBeanServerConnection.addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)

removeNotificationListener

public void removeNotificationListener(javax.management.ObjectName observed,
                                       javax.management.NotificationListener listener,
                                       javax.management.NotificationFilter filter,
                                       java.lang.Object handback)
                                throws javax.management.InstanceNotFoundException,
                                       javax.management.ListenerNotFoundException,
                                       java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Removes the specified listener from the named source MBean. The MBean must have a listener that exactly matches the given listener, filter, and handback parameters.

Specified by:
removeNotificationListener in interface javax.management.MBeanServerConnection
Parameters:
observed - The ObjectName of the source 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.
Throws:
javax.management.InstanceNotFoundException - If the source MBean is not registered in the MBeanServer.
javax.management.ListenerNotFoundException - If the listener (along with filter and handback) is not registered in the MBean.
java.io.IOException - If a communication problem occurred.
See Also:
MBeanServerConnection.addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)

addNotificationListener

public void addNotificationListener(javax.management.ObjectName observed,
                                    javax.management.ObjectName listener,
                                    javax.management.NotificationFilter filter,
                                    java.lang.Object handback)
                             throws javax.management.InstanceNotFoundException,
                                    java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Adds a NotificationListener to a registered MBean. A notification emitted by the specified source MBean will be forwarded by the MBeanServer to the given listener MBean, if the given NotificationFilter allows so. If the filter is null, every notification will be sent to the listener. The handback object is transparently passed to the listener by the MBeanServer. The source of the notification is the source MBean ObjectName. If the listener MBean is unregistered, it will continue to receive notifications.

Specified by:
addNotificationListener in interface javax.management.MBeanServerConnection
Parameters:
observed - The ObjectName of the source MBean on which the listener should be added.
listener - The ObjectName of the listener MBean which will handle the notifications emitted by the source MBean.
filter - The filter which will allow the notification to be forwarded to the listener.
handback - The context to be sent to the listener when a notification is emitted.
Throws:
javax.management.InstanceNotFoundException - If the source or listener MBean are not registered in the MBeanServer.
java.io.IOException - If a communication problem occurred.
See Also:
MBeanServerConnection.removeNotificationListener(ObjectName, ObjectName, NotificationFilter, Object)

removeNotificationListener

public void removeNotificationListener(javax.management.ObjectName observed,
                                       javax.management.ObjectName listener)
                                throws javax.management.InstanceNotFoundException,
                                       javax.management.ListenerNotFoundException,
                                       java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Removes the specified listener MBean from the named source MBean. If the listener is registered more than once, for example with different filters or handbacks, this method will remove all those registrations.

Specified by:
removeNotificationListener in interface javax.management.MBeanServerConnection
Parameters:
observed - The ObjectName of the source MBean on which the listener should be removed.
listener - The ObjectName of the listener MBean to be removed.
Throws:
javax.management.InstanceNotFoundException - If the source or listener MBean are not registered in the MBeanServer.
javax.management.ListenerNotFoundException - The listener is not registered in the MBean.
java.io.IOException - If a communication problem occurred.
See Also:
MBeanServerConnection.addNotificationListener(ObjectName, ObjectName, NotificationFilter, Object)

removeNotificationListener

public void removeNotificationListener(javax.management.ObjectName observed,
                                       javax.management.ObjectName listener,
                                       javax.management.NotificationFilter filter,
                                       java.lang.Object handback)
                                throws javax.management.InstanceNotFoundException,
                                       javax.management.ListenerNotFoundException,
                                       java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Removes the specified listener MBean from the named source MBean. The MBean must have a listener that exactly matches the given listener, filter, and handback parameters.

Specified by:
removeNotificationListener in interface javax.management.MBeanServerConnection
Parameters:
observed - The ObjectName of the source MBean on which the listener should be removed.
listener - The ObjectName of the listener MBean 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.
Throws:
javax.management.InstanceNotFoundException - If the source MBean is not registered in the MBeanServer.
javax.management.ListenerNotFoundException - If the listener (along with filter and handback) is not registered in the MBean.
java.io.IOException - If a communication problem occurred.
See Also:
MBeanServerConnection.addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)

getMBeanInfo

public javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName objectName)
                                        throws javax.management.InstanceNotFoundException,
                                               javax.management.IntrospectionException,
                                               javax.management.ReflectionException,
                                               java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Returns the metadata information exposed for management about the named MBean.

Specified by:
getMBeanInfo in interface javax.management.MBeanServerConnection
Parameters:
objectName - The name of the MBean for which retrieve the metadata.
Returns:
An instance of MBeanInfo allowing the retrieval of constructors, attributes, operations and notifications of this MBean.
Throws:
javax.management.InstanceNotFoundException - If the named MBean is not registered in the MBeanServer.
javax.management.IntrospectionException - If an exception occured during introspection of the MBean.
javax.management.ReflectionException - If a reflection-type exception occurred
java.io.IOException - If a communication problem occurred.

isInstanceOf

public boolean isInstanceOf(javax.management.ObjectName objectName,
                            java.lang.String className)
                     throws javax.management.InstanceNotFoundException,
                            java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Returns whether the MBean specified is an instance of the specified class.

Specified by:
isInstanceOf in interface javax.management.MBeanServerConnection
Parameters:
objectName - The ObjectName of the MBean.
className - The name of the class.
Returns:
True if the MBean specified is an instance of the specified class.
Throws:
javax.management.InstanceNotFoundException - If the named MBean is not registered in the MBeanServer.
java.io.IOException - If a communication problem occurred.

getDomains

public java.lang.String[] getDomains()
                              throws java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Returns the list of different ObjectName domains under which the MBeans in this MBeanServer are registered.

Specified by:
getDomains in interface javax.management.MBeanServerConnection
Returns:
The array of different ObjectName domains present in this MBeanServer.
Throws:
java.io.IOException - If a communication problem occurred.

getDefaultDomain

public java.lang.String getDefaultDomain()
                                  throws java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Returns the default domain for this MBeanServer used in case ObjectName domain are not specified.

Specified by:
getDefaultDomain in interface javax.management.MBeanServerConnection
Returns:
The default domain of this MBeanServer.
Throws:
java.io.IOException - If a communication problem occurred.

createMBean

public javax.management.ObjectInstance createMBean(java.lang.String className,
                                                   javax.management.ObjectName objectName)
                                            throws javax.management.ReflectionException,
                                                   javax.management.InstanceAlreadyExistsException,
                                                   javax.management.MBeanRegistrationException,
                                                   javax.management.MBeanException,
                                                   javax.management.NotCompliantMBeanException,
                                                   java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
A facility method for createMBean(className, objectName, null, null).

Specified by:
createMBean in interface javax.management.MBeanServerConnection
Throws:
javax.management.ReflectionException
javax.management.InstanceAlreadyExistsException
javax.management.MBeanRegistrationException
javax.management.MBeanException
javax.management.NotCompliantMBeanException
java.io.IOException
See Also:
MBeanServerConnection.createMBean(String, ObjectName, Object[], String[])

createMBean

public javax.management.ObjectInstance createMBean(java.lang.String className,
                                                   javax.management.ObjectName objectName,
                                                   java.lang.Object[] args,
                                                   java.lang.String[] parameters)
                                            throws javax.management.ReflectionException,
                                                   javax.management.InstanceAlreadyExistsException,
                                                   javax.management.MBeanRegistrationException,
                                                   javax.management.MBeanException,
                                                   javax.management.NotCompliantMBeanException,
                                                   java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Instantiates and registers an MBean of the specified class with the given ObjectName in the MBeanServer. The MBeanServer will use its ClassLoaderRepository to load the class of the MBean and the specified constructor's parameter classes, and creates the instance passing the specified arguments. The ObjectName may be null if the MBean implements MBeanRegistration

Specified by:
createMBean in interface javax.management.MBeanServerConnection
Parameters:
className - The class name of the MBean to be instantiated.
objectName - The ObjectName of the MBean, may be null.
args - An array containing the arguments to pass to the constructor.
parameters - An array containing the signature of the constructor.
Returns:
An ObjectInstance, containing the ObjectName and the Java class name of the newly instantiated MBean.
Throws:
javax.management.ReflectionException - If a reflection exception is thrown.
javax.management.InstanceAlreadyExistsException - If another MBean with the same ObjectName is already registered in the MBeanServer.
javax.management.MBeanRegistrationException - If an exception is thrown during MBean's registration.
javax.management.MBeanException - If the constructor of the MBean has thrown an exception
javax.management.NotCompliantMBeanException - If the MBean is not a JMX compliant MBean
java.io.IOException - If a communication problem occurred.

createMBean

public javax.management.ObjectInstance createMBean(java.lang.String className,
                                                   javax.management.ObjectName objectName,
                                                   javax.management.ObjectName loaderName)
                                            throws javax.management.ReflectionException,
                                                   javax.management.InstanceAlreadyExistsException,
                                                   javax.management.MBeanRegistrationException,
                                                   javax.management.MBeanException,
                                                   javax.management.NotCompliantMBeanException,
                                                   javax.management.InstanceNotFoundException,
                                                   java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
A facility method for createMBean(className, objectName, loaderName, null, null).

Specified by:
createMBean in interface javax.management.MBeanServerConnection
Throws:
javax.management.ReflectionException
javax.management.InstanceAlreadyExistsException
javax.management.MBeanRegistrationException
javax.management.MBeanException
javax.management.NotCompliantMBeanException
javax.management.InstanceNotFoundException
java.io.IOException
See Also:
MBeanServerConnection.createMBean(String, ObjectName, ObjectName, Object[], String[])

createMBean

public javax.management.ObjectInstance createMBean(java.lang.String className,
                                                   javax.management.ObjectName objectName,
                                                   javax.management.ObjectName loaderName,
                                                   java.lang.Object[] args,
                                                   java.lang.String[] parameters)
                                            throws javax.management.ReflectionException,
                                                   javax.management.InstanceAlreadyExistsException,
                                                   javax.management.MBeanRegistrationException,
                                                   javax.management.MBeanException,
                                                   javax.management.NotCompliantMBeanException,
                                                   javax.management.InstanceNotFoundException,
                                                   java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Instantiates and registers an MBean of the specified class with the given ObjectName in the MBeanServer. The MBeanServer will use the specified classloader MBean to load the class of the MBean and the specified constructor's parameter classes, and creates the instance passing the specified arguments, or the classloader of the MBeanServer if the classloader ObjectName is null. The ObjectName may be null if the MBean implements MBeanRegistration

Specified by:
createMBean in interface javax.management.MBeanServerConnection
Parameters:
className - The class name of the MBean to be instantiated.
objectName - The ObjectName of the MBean, may be null.
loaderName - The ObjectName of the classloader MBean to be used.
args - An array containing the arguments to pass to the constructor.
parameters - An array containing the signature of the constructor.
Returns:
An ObjectInstance, containing the ObjectName and the Java class name of the newly instantiated MBean.
Throws:
javax.management.ReflectionException - If a reflection exception is thrown.
javax.management.InstanceAlreadyExistsException - If another MBean with the same ObjectName is already registered in the MBeanServer.
javax.management.MBeanRegistrationException - If an exception is thrown during MBean's registration.
javax.management.MBeanException - If the constructor of the MBean has thrown an exception
javax.management.NotCompliantMBeanException - If the MBean is not a JMX compliant MBean
javax.management.InstanceNotFoundException - If the specified classloader MBean is not registered in the MBeanServer.
java.io.IOException - If a communication problem occurred.

unregisterMBean

public void unregisterMBean(javax.management.ObjectName objectName)
                     throws javax.management.InstanceNotFoundException,
                            javax.management.MBeanRegistrationException,
                            java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Unregisters the MBean with the specified ObjectName from this MBeanServer.

Specified by:
unregisterMBean in interface javax.management.MBeanServerConnection
Parameters:
objectName - The ObjectName of the MBean to be unregistered.
Throws:
javax.management.InstanceNotFoundException - If the specified MBean is not registered in the MBeanServer.
javax.management.MBeanRegistrationException - If an exception is thrown during MBean's unregistration.
java.io.IOException - If a communication problem occurred.

getAttribute

public java.lang.Object getAttribute(javax.management.ObjectName objectName,
                                     java.lang.String attribute)
                              throws javax.management.MBeanException,
                                     javax.management.AttributeNotFoundException,
                                     javax.management.InstanceNotFoundException,
                                     javax.management.ReflectionException,
                                     java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Gets the value of the specified attribute of the named MBean.

Specified by:
getAttribute in interface javax.management.MBeanServerConnection
Parameters:
objectName - The ObjectName of the MBean from which the attribute is to be retrieved.
attribute - The attribute name.
Returns:
The value of the specified attribute.
Throws:
javax.management.MBeanException - If the MBean's getter method throws an exception.
javax.management.AttributeNotFoundException - If the specified attribute does not belong to the management interface of the MBean.
javax.management.InstanceNotFoundException - If the specified MBean is not registered in the MBeanServer.
javax.management.ReflectionException - If a reflection exception is thrown.
java.io.IOException - If a communication problem occurred.
See Also:
MBeanServerConnection.setAttribute(javax.management.ObjectName, javax.management.Attribute)

setAttribute

public void setAttribute(javax.management.ObjectName objectName,
                         javax.management.Attribute attribute)
                  throws javax.management.InstanceNotFoundException,
                         javax.management.AttributeNotFoundException,
                         javax.management.InvalidAttributeValueException,
                         javax.management.MBeanException,
                         javax.management.ReflectionException,
                         java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Sets the value of the specified attribute of the named MBean.

Specified by:
setAttribute in interface javax.management.MBeanServerConnection
Parameters:
objectName - The name of the MBean within which the attribute is to be set.
attribute - The Attribute to be set.
Throws:
javax.management.InstanceNotFoundException - If the specified MBean is not registered in the MBeanServer.
javax.management.AttributeNotFoundException - If the specified attribute does not belong to the management interface of the MBean.
javax.management.InvalidAttributeValueException - If the value specified for the attribute does not match the attribute's type
javax.management.MBeanException - If the MBean's setter method throws an exception.
javax.management.ReflectionException - If a reflection exception is thrown.
java.io.IOException - If a communication problem occurred.
See Also:
MBeanServerConnection.getAttribute(javax.management.ObjectName, java.lang.String)

getAttributes

public javax.management.AttributeList getAttributes(javax.management.ObjectName objectName,
                                                    java.lang.String[] attributes)
                                             throws javax.management.InstanceNotFoundException,
                                                    javax.management.ReflectionException,
                                                    java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Gets the values of several attributes of the named MBean.

Specified by:
getAttributes in interface javax.management.MBeanServerConnection
Parameters:
objectName - The ObjectName of the MBean from which the attributes are to be retrieved.
attributes - The attribute names.
Returns:
An AttributeList containing the values of the attributes that it has been possible to retrieve.
Throws:
javax.management.InstanceNotFoundException - If the specified MBean is not registered in the MBeanServer.
javax.management.ReflectionException - If a reflection exception is thrown.
java.io.IOException - If a communication problem occurred.
See Also:
MBeanServerConnection.setAttributes(javax.management.ObjectName, javax.management.AttributeList)

setAttributes

public javax.management.AttributeList setAttributes(javax.management.ObjectName objectName,
                                                    javax.management.AttributeList attributes)
                                             throws javax.management.InstanceNotFoundException,
                                                    javax.management.ReflectionException,
                                                    java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Sets the values of several attributes of the named MBean.

Specified by:
setAttributes in interface javax.management.MBeanServerConnection
Parameters:
objectName - The name of the MBean within which the attribute is to be set.
attributes - The AttributeList containing the Attributes to be set.
Returns:
The AttributeList containing the attributes that it has been possible to set.
Throws:
javax.management.InstanceNotFoundException - If the specified MBean is not registered in the MBeanServer.
javax.management.ReflectionException - If a reflection exception is thrown.
java.io.IOException - If a communication problem occurred.
See Also:
MBeanServerConnection.getAttributes(javax.management.ObjectName, java.lang.String[])

invoke

public java.lang.Object invoke(javax.management.ObjectName objectName,
                               java.lang.String methodName,
                               java.lang.Object[] args,
                               java.lang.String[] parameters)
                        throws javax.management.InstanceNotFoundException,
                               javax.management.MBeanException,
                               javax.management.ReflectionException,
                               java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Invokes the specified operation on the named MBean.

Specified by:
invoke in interface javax.management.MBeanServerConnection
Parameters:
objectName - The ObjectName of the MBean on which the method is to be invoked.
methodName - The name of the operation to be invoked.
args - An array containing the arguments to pass to the operation.
parameters - An array containing the signature of the operation.
Returns:
The return value of the operation, or null if the operation returns void.
Throws:
javax.management.InstanceNotFoundException - If the specified MBean is not registered in the MBeanServer.
javax.management.MBeanException - If the MBean's operation method throws an exception.
javax.management.ReflectionException - If a reflection exception is thrown.
java.io.IOException - If a communication problem occurred.

getMBeanCount

public java.lang.Integer getMBeanCount()
                                throws java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Returns the number of MBeans registered in this MBeanServer.

Specified by:
getMBeanCount in interface javax.management.MBeanServerConnection
Throws:
java.io.IOException - If a communication problem occurred.

isRegistered

public boolean isRegistered(javax.management.ObjectName objectName)
                     throws java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Checks whether the given ObjectName identifies an MBean registered in this MBeanServer.

Specified by:
isRegistered in interface javax.management.MBeanServerConnection
Parameters:
objectName - The ObjectName to be checked.
Returns:
True if an MBean with the specified ObjectName is already registered in the MBeanServer.
Throws:
java.io.IOException - If a communication problem occurred.

getObjectInstance

public javax.management.ObjectInstance getObjectInstance(javax.management.ObjectName objectName)
                                                  throws javax.management.InstanceNotFoundException,
                                                         java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Gets the ObjectInstance for the named MBean registered with the MBeanServer.

Specified by:
getObjectInstance in interface javax.management.MBeanServerConnection
Parameters:
objectName - The ObjectName of the MBean.
Returns:
The ObjectInstance associated with the named MBean.
Throws:
javax.management.InstanceNotFoundException - If the specified MBean is not registered in the MBeanServer.
java.io.IOException - If a communication problem occurred.

queryMBeans

public java.util.Set queryMBeans(javax.management.ObjectName patternName,
                                 javax.management.QueryExp filter)
                          throws java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Gets a subset of the ObjectInstances belonging to MBeans registered in this MBeanServer. It is possible to filter the set of MBeans by specifying a pattern for MBean's ObjectNames, and a query expression to be evaluated to further filter the set of MBeans. The set can be further restricted if any exception is thrown during retrieval of MBean (for example for security reasons): the failing MBean will not be included.

Specified by:
queryMBeans in interface javax.management.MBeanServerConnection
Parameters:
patternName - The ObjectName pattern identifying the MBeans to be retrieved, or null to retrieve all MBeans.
filter - The query expression to be evaluated for selecting MBeans, or null.
Returns:
A set containing the ObjectInstance objects for the selected MBeans.
Throws:
java.io.IOException - If a communication problem occurred.

queryNames

public java.util.Set queryNames(javax.management.ObjectName patternName,
                                javax.management.QueryExp filter)
                         throws java.io.IOException
Description copied from interface: javax.management.MBeanServerConnection
Gets a subset of the ObjectNames belonging to MBeans registered in this MBeanServer. It is possible to filter the set of MBeans by specifying a pattern for MBean's ObjectNames, and a query expression to be evaluated to further filter the set of MBeans. The set can be further restricted if any exception is thrown during retrieval of MBean (for example for security reasons): the failing MBean will not be included.

Specified by:
queryNames in interface javax.management.MBeanServerConnection
Parameters:
patternName - The ObjectName pattern identifying the MBeans to be retrieved, or null to retrieve all MBeans.
filter - The query expression to be evaluated for selecting MBeans, or null.
Returns:
A set containing the ObjectNames for the selected MBeans.
Throws:
java.io.IOException - If a communication problem occurred.


Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.