JonasManagementRepr.java

00001 
00026 package org.objectweb.jonas.jmx;
00027 
00028 import java.util.Set;
00029 import java.util.Properties;
00030 import javax.naming.Context;
00031 import javax.management.ObjectName;
00032 import javax.management.MBeanInfo;
00033 
00038 public class JonasManagementRepr {
00039 
00044     private static ManagementRepr repr = ManagementReprFactory.getManagementRepr();
00045     // Let repr null and then use setRepr method, will allow to set/change representative
00046     // in order to set/change the managed server.
00047     /*private static ManagementRepr repr = null;*/
00048 
00053     public static boolean reprNull() {
00054         if (repr == null) {
00055             return true;
00056         } else {
00057             return false;
00058         }
00059     }
00064     public static boolean isRegistered(ObjectName on) {
00065         return repr.isRegistered(on);
00066     }
00067 
00073     public static Object getAttribute(ObjectName on, String attribute)
00074         throws ManagementException
00075     {
00076         return repr.getAttribute(on, attribute);
00077     }
00078 
00084     public static void setAttribute(ObjectName on, String attribute, Object value)
00085         throws ManagementException
00086     {
00087         repr.setAttribute(on, attribute, value);
00088     }
00089 
00093     public static Object invoke(ObjectName on, String operation, Object[] param, String[] signature)
00094         throws ManagementException
00095     {
00096         return repr.invoke(on, operation, param, signature);
00097     }
00098 
00102     public static java.util.Set queryNames(ObjectName on) throws ManagementException
00103     {
00104         return repr.queryNames(on);
00105     }
00106 
00111     public static MBeanInfo getMBeanInfo(ObjectName name) throws ManagementException {
00112         return (MBeanInfo)repr.getMBeanInfo(name);
00113     }
00114 
00118     public static Context getContext() throws javax.naming.NamingException {
00119         return repr.getContext();
00120     }
00125     public static String getCurrentRMIConnectorName() {
00126         return repr.getCurrentRMIConnectorName();
00127     }
00131     public static void setCurrentRMIConnectorName(String name) throws Exception {
00132         repr.setCurrentRMIConnectorName(name);
00133     }
00137     public static void resetCurrentRMIConnectorName() {
00138         repr.resetCurrentRMIConnectorName();
00139     }
00143     public static Set getRMIConnectorsNames() throws javax.naming.NamingException {
00144         return repr.getRMIConnectorsNames();
00145     }
00149     public static String getJonasNamingServiceURL() {
00150         return repr.getJonasNamingServiceURL();
00151     }
00155     public static void setJonasNamingServiceURL(String url) throws javax.naming.NamingException {
00156         repr.setJonasNamingServiceURL(url);
00157     }
00158 
00163     public static void setNamingEnvCtx(Properties env) throws javax.naming.NamingException {
00164         repr.setNamingEnvCtx(env);
00165     }
00166 
00170     public static ManagementRepr getRepr() {
00171         return repr;
00172     }
00173 
00177     public static void setRepr(ManagementRepr repr) {
00178         JonasManagementRepr.repr = repr;
00179     }
00180 }

Generated on Tue Feb 15 15:05:16 2005 for JOnAS by  doxygen 1.3.9.1