org.objectweb.jonas.jmx
Interface RMIConnector

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
RMIConnectorImpl

public interface RMIConnector
extends java.rmi.Remote

Interface for JMX Remote Calls. Only methods used by the management applications are listed here, but potentially we could list all operations from JMXServer.

Author:
Michel Bruno and Guillaume Riviere

Method Summary
 void addNotificationListener(javax.management.ObjectName name, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
          Adds a listener to a registered MBean.
 void addNotificationListener(javax.management.ObjectName name, javax.management.ObjectName listener, javax.management.NotificationFilter filter, java.lang.Object handback)
          Adds a listener to a registered MBean.
 java.lang.Object getAttribute(javax.management.ObjectName name, java.lang.String attribute)
          Gets the value of a specific attribute of a named MBean.
 javax.management.AttributeList getAttributes(javax.management.ObjectName name, java.lang.String[] attributes)
           
 javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName name)
          This method discovers the attributes and operations that an MBean exposes for management.
 java.lang.Object invoke(javax.management.ObjectName name, java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature)
          Invokes an operation on an MBean.
 boolean isRegistered(javax.management.ObjectName name)
          Checks whether an MBean, identified by its object name, is already registered with the MBean server.
 java.util.Set queryNames(javax.management.ObjectName name, javax.management.QueryExp query)
          Gets the names of MBeans controlled by the MBean server.
 void setAttribute(javax.management.ObjectName name, javax.management.Attribute attribute)
          Sets the value of a specific attribute of a named MBean.
 javax.management.AttributeList setAttributes(javax.management.ObjectName name, javax.management.AttributeList attributes)
           
 

Method Detail

queryNames

java.util.Set queryNames(javax.management.ObjectName name,
                         javax.management.QueryExp query)
                         throws java.rmi.RemoteException
Gets the names of MBeans controlled by the MBean server.

Parameters:
name - - The object name pattern identifying the MBeans to be retrieved.
query - - The query expression to be applied for selecting MBeans.
Returns:
A set containing the ObjectNames for the MBeans selected. If no MBean satisfies the query, an empty list is returned.
Throws:
java.rmi.RemoteException

isRegistered

boolean isRegistered(javax.management.ObjectName name)
                     throws java.rmi.RemoteException
Checks whether an MBean, identified by its object name, is already registered with the MBean server.

Parameters:
name - - The object name pattern identifying the MBeans
Throws:
java.rmi.RemoteException

getAttribute

java.lang.Object getAttribute(javax.management.ObjectName name,
                              java.lang.String attribute)
                              throws javax.management.MBeanException,
                                     javax.management.AttributeNotFoundException,
                                     javax.management.InstanceNotFoundException,
                                     javax.management.ReflectionException,
                                     java.rmi.RemoteException
Gets the value of a specific attribute of a named MBean.

Parameters:
name - - The name of the MBean
attribute - - the name of the attribute to be retrieved.
Returns:
The value of the retrieved attribute.
Throws:
javax.management.MBeanException
javax.management.AttributeNotFoundException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException

getAttributes

javax.management.AttributeList getAttributes(javax.management.ObjectName name,
                                             java.lang.String[] attributes)
                                             throws javax.management.InstanceNotFoundException,
                                                    javax.management.ReflectionException,
                                                    java.rmi.RemoteException
Throws:
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException

setAttribute

void setAttribute(javax.management.ObjectName name,
                  javax.management.Attribute attribute)
                  throws javax.management.InstanceNotFoundException,
                         javax.management.AttributeNotFoundException,
                         javax.management.InvalidAttributeValueException,
                         javax.management.MBeanException,
                         javax.management.ReflectionException,
                         java.rmi.RemoteException
Sets the value of a specific attribute of a named MBean.

Parameters:
name - - The name of the MBean
Throws:
javax.management.InstanceNotFoundException
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.MBeanException
javax.management.ReflectionException
java.rmi.RemoteException

setAttributes

javax.management.AttributeList setAttributes(javax.management.ObjectName name,
                                             javax.management.AttributeList attributes)
                                             throws javax.management.InstanceNotFoundException,
                                                    javax.management.ReflectionException,
                                                    java.rmi.RemoteException
Throws:
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.rmi.RemoteException

invoke

java.lang.Object invoke(javax.management.ObjectName name,
                        java.lang.String operationName,
                        java.lang.Object[] params,
                        java.lang.String[] signature)
                        throws javax.management.InstanceNotFoundException,
                               javax.management.MBeanException,
                               javax.management.ReflectionException,
                               java.rmi.RemoteException
Invokes an operation on an MBean.

Parameters:
name - - The name of the MBean
operationName - - The name of the operation to be invoked.
params - - An array containing the parameters to be set when the operation is invoked
signature - - An array containing the signature of the operation. The class objects will be loaded using the same class loader as the one used for loading the MBean on which the operation was invoked.
Returns:
The object returned by the operation
Throws:
javax.management.InstanceNotFoundException
javax.management.MBeanException
javax.management.ReflectionException
java.rmi.RemoteException

getMBeanInfo

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

Parameters:
name - - The name of the MBean to analyze
Returns:
An instance of MBeanInfo allowing the retrieval of all attributes and operations of this MBean.
Throws:
javax.management.InstanceNotFoundException
javax.management.IntrospectionException
javax.management.ReflectionException
java.rmi.RemoteException

addNotificationListener

void addNotificationListener(javax.management.ObjectName name,
                             javax.management.NotificationListener listener,
                             javax.management.NotificationFilter filter,
                             java.lang.Object handback)
                             throws javax.management.InstanceNotFoundException,
                                    java.rmi.RemoteException
Adds a listener to a registered MBean.

Parameters:
name - - The name of the MBean on which the listener should be added.
listener - - The listener object which will handle the notifications emitted by the registered MBean.
listener - - The listener object which will handle the notifications emitted by the registered MBean.
filter - - The filter object. If filter is null, no filtering will be performed before handling notifications.
handback - - The context to be sent to the listener when a notification is emitted.
Throws:
javax.management.InstanceNotFoundException
java.rmi.RemoteException

addNotificationListener

void addNotificationListener(javax.management.ObjectName name,
                             javax.management.ObjectName listener,
                             javax.management.NotificationFilter filter,
                             java.lang.Object handback)
                             throws javax.management.InstanceNotFoundException,
                                    java.rmi.RemoteException
Adds a listener to a registered MBean.

Parameters:
name - - The name of the MBean on which the listener should be added.
listener - - The object name of the listener which will handle the notifications emitted by the registered MBean.
listener - - The listener object which will handle the notifications emitted by the registered MBean.
filter - - The filter object. If filter is null, no filtering will be performed before handling notifications.
handback - - The context to be sent to the listener when a notification is emitted.
Throws:
javax.management.InstanceNotFoundException
java.rmi.RemoteException