Methods Summary |
---|
private static void | debug(java.lang.String clz, java.lang.String func, java.lang.String info)
Trace.send(Trace.LEVEL_DEBUG, Trace.INFO_MBEANSERVER, clz, func, info);
|
private static void | debug(java.lang.String func, java.lang.String info)
debug(dbgTag, func, info);
|
private static void | debugX(java.lang.String func, java.lang.Throwable e)
if (isDebugOn()) {
final StringWriter s = new StringWriter();
e.printStackTrace(new PrintWriter(s));
final String stack = s.toString();
debug(dbgTag,func,"Exception caught in "+ func+"(): "+e);
debug(dbgTag,func,stack);
// java.lang.System.err.println("**** Exception caught in "+
// func+"(): "+e);
// java.lang.System.err.println(stack);
}
|
java.lang.Class | findClass(java.lang.String className, java.lang.ClassLoader loader)
try {
if (loader == null)
return Class.forName(className);
else
return loader.loadClass(className);
} catch (ClassNotFoundException x) {
throw new ReflectionException(x,x.getMessage());
}
|
public abstract java.lang.Object | getAttribute(java.lang.Object instance, java.lang.String attribute)
|
public abstract javax.management.AttributeList | getAttributes(java.lang.Object instance, java.lang.String[] attributes)
|
public java.lang.String | getMBeanClassName(java.lang.Object moi)
final MBeanInfo mbi;
try {
// Ask the MBeanInfo for the class name
mbi = getMBeanInfo(moi);
} catch (SecurityException x) {
throw x;
} catch (IntrospectionException x) {
throw x;
} catch (Exception x) {
throw new NotCompliantMBeanException("Can't obtain MBeanInfo " +
"from DynamicMBean: " + x);
}
if (mbi == null) {
throw new
NotCompliantMBeanException("The MBeanInfo returned is null");
}
final String className = mbi.getClassName();
if (className == null) {
throw new
IntrospectionException("The class Name returned is null");
}
return className;
|
public abstract javax.management.MBeanInfo | getMBeanInfo(java.lang.Object moi)
|
public abstract java.lang.Object | invoke(java.lang.Object instance, java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature)
|
private static boolean | isDebugOn()
return Trace.isSelected(Trace.LEVEL_DEBUG, Trace.INFO_MBEANSERVER);
|
public boolean | isInstanceOf(java.lang.Object instance, java.lang.String className)
try {
final String cn = getMBeanClassName(instance);
if (cn.equals(className))
return true;
try {
final ClassLoader cl = instance.getClass().getClassLoader();
final Class classNameClass = findClass(className,cl);
if (classNameClass == null) return false;
if (classNameClass.isInstance(instance)) return true;
final Class instanceClass = findClass(cn,cl);
if (instanceClass == null) return false;
return classNameClass.isAssignableFrom(instanceClass);
} catch (Exception x) {
/* Could be SecurityException or ClassNotFoundException */
debugX("isInstanceOf",x);
return false;
}
} catch (IntrospectionException x) {
debugX("isInstanceOf",x);
throw new ReflectionException(x,x.getMessage());
} catch (NotCompliantMBeanException x) {
debugX("isInstanceOf",x);
throw new ReflectionException(x,x.getMessage());
}
|
private static boolean | isTraceOn()
return Trace.isSelected(Trace.LEVEL_TRACE, Trace.INFO_MBEANSERVER);
|
public void | postDeregisterInvoker(java.lang.Object moi)
if (!(moi instanceof MBeanRegistration)) return;
try {
((MBeanRegistration)moi).postDeregister();
} catch (RuntimeException e) {
throw new RuntimeMBeanException((RuntimeException)e,
"RuntimeException thrown in postDeregister method");
} catch (Error er) {
throw new RuntimeErrorException((Error) er,
"Error thrown in postDeregister method");
}
|
public void | postRegisterInvoker(java.lang.Object moi, boolean registrationDone)
if (!(moi instanceof MBeanRegistration)) return;
try {
((MBeanRegistration)moi).
postRegister(new Boolean(registrationDone));
} catch (RuntimeException e) {
throw new RuntimeMBeanException((RuntimeException)e,
"RuntimeException thrown in postRegister method");
} catch (Error er) {
throw new RuntimeErrorException((Error) er,
"Error thrown in postRegister method");
}
|
public void | preDeregisterInvoker(java.lang.Object moi)
if (!(moi instanceof MBeanRegistration)) return;
try {
((MBeanRegistration)moi).preDeregister();
} catch (RuntimeException e) {
throw new RuntimeMBeanException((RuntimeException) e,
"RuntimeException thrown in preDeregister method");
} catch (Error er) {
throw new RuntimeErrorException((Error) er,
"Error thrown in preDeregister method");
} catch (MBeanRegistrationException t) {
throw (MBeanRegistrationException)t;
} catch (Exception ex) {
throw new MBeanRegistrationException((Exception)ex,
"Exception thrown in preDeregister method");
}
|
public javax.management.ObjectName | preRegisterInvoker(java.lang.Object moi, javax.management.ObjectName name, javax.management.MBeanServer mbs)
if (!(moi instanceof MBeanRegistration)) return name;
final ObjectName newName;
try {
newName=(ObjectName)
((MBeanRegistration)moi).preRegister(mbs, name);
} catch (RuntimeException e) {
throw new RuntimeMBeanException((RuntimeException)e,
"RuntimeException thrown in preRegister method");
} catch (Error er) {
throw new RuntimeErrorException((Error) er,
"Error thrown in preRegister method");
} catch (MBeanRegistrationException r) {
throw (MBeanRegistrationException)r;
} catch (Exception ex) {
throw new MBeanRegistrationException((Exception) ex,
"Exception thrown in preRegister method");
}
if (newName != null) return newName;
else return name;
|
public abstract java.lang.Object | setAttribute(java.lang.Object instance, javax.management.Attribute attribute)
|
public abstract javax.management.AttributeList | setAttributes(java.lang.Object instance, javax.management.AttributeList attributes)
|
private static void | trace(java.lang.String clz, java.lang.String func, java.lang.String info)
Trace.send(Trace.LEVEL_TRACE, Trace.INFO_MBEANSERVER, clz, func, info);
|
private static void | trace(java.lang.String func, java.lang.String info)
trace(dbgTag, func, info);
|