org.objectweb.jonas.jmx.vjadmin
Class JonasManagementRepr

java.lang.Object
  |
  +--org.objectweb.jonas.jmx.vjadmin.JonasManagementRepr

public class JonasManagementRepr
extends java.lang.Object

Wraper class. Apply the management operations on the ManagementRep instance. The ManagementRep is an instance of one of the provided implementations. Curretly, is an instance of ManagementRepImpl, if the Jonas JmxService is based on sun ri, or an instance of Mx4jManagementRepImpl, if the Jonas JmxService is based on the mx4j jmx implementation.


Constructor Summary
JonasManagementRepr()
           
 
Method Summary
static java.lang.Object getAttribute(javax.management.ObjectName on, java.lang.String attribute)
           
static javax.naming.Context getContext()
           
static java.lang.String getCurrentRMIConnectorName()
           
static java.lang.String getJonasNamingServiceURL()
           
static javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName name)
           
static java.util.Set getRMIConnectorsNames()
           
static java.lang.Object invoke(javax.management.ObjectName on, java.lang.String operation, java.lang.Object[] param, java.lang.String[] signature)
           
static boolean isRegistered(javax.management.ObjectName on)
           
static java.util.Set queryNames(javax.management.ObjectName on)
           
static boolean reprNull()
          Test if rep null.
static void resetCurrentRMIConnectorName()
          Set the currentRMIConnectorName to null
static void setAttribute(javax.management.ObjectName on, java.lang.String attribute, java.lang.Object value)
           
static void setCurrentRMIConnectorName(java.lang.String name)
          Set the currentRMIConnectorName to the specified value
static void setJonasNamingServiceURL(java.lang.String url)
          Sets the PROVIDER_URL property to the specified value.
static void setNamingEnvCtx(java.util.Properties env)
          Create a new naming context based on the given env. properties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JonasManagementRepr

public JonasManagementRepr()
Method Detail

reprNull

public static boolean reprNull()
Test if rep null. This means that the ManagementRepFactory did not managed to instantiate the ManagementRep class.

isRegistered

public static boolean isRegistered(javax.management.ObjectName on)
Returns:
True if the MBean is already registered in the MBean server, false otherwise or if an exception is catched.

getAttribute

public static java.lang.Object getAttribute(javax.management.ObjectName on,
                                            java.lang.String attribute)
                                     throws ManagementException
Parameters:
on - The ObjectName of the MBean from which the attribute is to be retrieved.
attribute - A String specifying the name of the attribute to be retrieve.
Returns:
The value of the attribute.

setAttribute

public static void setAttribute(javax.management.ObjectName on,
                                java.lang.String attribute,
                                java.lang.Object value)
                         throws ManagementException
Parameters:
on - The ObjectName of the MBean within which the attribute is to be set.
attribute - A String specifying the name of the attribute to be retrieve.
value - The value to set to the attribute.

invoke

public static java.lang.Object invoke(javax.management.ObjectName on,
                                      java.lang.String operation,
                                      java.lang.Object[] param,
                                      java.lang.String[] signature)
                               throws ManagementException
Parameters:
on -  

queryNames

public static java.util.Set queryNames(javax.management.ObjectName on)
                                throws ManagementException
Returns:
A set containing the ObjectNames for the MBeans selected.

getMBeanInfo

public static javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName name)
                                               throws ManagementException
Returns:
An instance of MBeanInfo allowing the retrieval of all attributes and operations of this MBean.

getContext

public static javax.naming.Context getContext()
                                       throws javax.naming.NamingException
Returns:
Context the current application context.

getCurrentRMIConnectorName

public static java.lang.String getCurrentRMIConnectorName()
Returns:
String the name of the current RMI connector. Return null if no RMI connector is available.

setCurrentRMIConnectorName

public static void setCurrentRMIConnectorName(java.lang.String name)
                                       throws java.lang.Exception
Set the currentRMIConnectorName to the specified value

resetCurrentRMIConnectorName

public static void resetCurrentRMIConnectorName()
Set the currentRMIConnectorName to null

getRMIConnectorsNames

public static java.util.Set getRMIConnectorsNames()
                                           throws javax.naming.NamingException
Returns:
Set a set containning all RMI connector names available in the current context.

getJonasNamingServiceURL

public static java.lang.String getJonasNamingServiceURL()
Returns:
String the value of the PROVIDER_URL property in the current context.

setJonasNamingServiceURL

public static void setJonasNamingServiceURL(java.lang.String url)
                                     throws javax.naming.NamingException
Sets the PROVIDER_URL property to the specified value.

setNamingEnvCtx

public static void setNamingEnvCtx(java.util.Properties env)
                            throws javax.naming.NamingException
Create a new naming context based on the given env. properties
Parameters:
env - properties to create a new naming context