org.objectweb.jonas.jmx.sunri
Class RMIConnectorImpl
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--org.objectweb.common.RemoteObject
|
+--org.objectweb.jonas.jmx.sunri.RMIConnectorImpl
- All Implemented Interfaces:
- java.rmi.Remote, RMIConnector, java.io.Serializable
- public class RMIConnectorImpl
- extends RemoteObject
- implements RMIConnector
a simple remote delegation of JMX Server method
Used by JAdmin.
- See Also:
- Serialized Form
Field Summary |
protected javax.management.MBeanServer |
server
|
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Method Summary |
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.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. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
server
protected javax.management.MBeanServer server
RMIConnectorImpl
public RMIConnectorImpl(javax.management.MBeanServer server)
throws java.rmi.RemoteException
queryNames
public 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.
- Specified by:
queryNames
in interface RMIConnector
- 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.
isRegistered
public 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.
- Specified by:
isRegistered
in interface RMIConnector
- Parameters:
name
- - The object name pattern identifying the MBeans
getAttribute
public 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.
- Specified by:
getAttribute
in interface RMIConnector
- Parameters:
name
- - The name of the MBeanattribute
- - the name of the attribute to be retrieved.- Returns:
- The value of the retrieved attribute.
setAttribute
public 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.
- Specified by:
setAttribute
in interface RMIConnector
- Parameters:
name
- - The name of the MBean
invoke
public 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.
- Specified by:
invoke
in interface RMIConnector
- Parameters:
name
- - The name of the MBeanoperationName
- - 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.- Returns:
- The object returned by the operation
getMBeanInfo
public 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.
- Specified by:
getMBeanInfo
in interface RMIConnector
- 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.