Registrarpublic class Registrar extends Object class to act as a dynamic loading registrar to commons-modeler, so
as to autoregister stuff |
Fields Summary |
---|
protected static Log | logour log | private static ModelerBinding | modelerBindingthe inner class that does the binding |
Methods Summary |
---|
private static void | createModelerBinding()create the modeler binding if it is needed
At the end of this call, modelerBinding != null
if (modelerBinding == null) {
modelerBinding = new ModelerBinding();
}
| public static boolean | isBound()Check for being bound to a modeler -this will force
a binding if none existed.
createModelerBinding();
return modelerBinding.canBind();
| public static boolean | register(java.lang.Object objectToRegister, java.lang.String name, java.lang.String context)register using reflection. The perf hit is moot as jmx is
all reflection anyway
if (isBound()) {
if (log.isDebugEnabled()) {
log.debug("Registering " + objectToRegister + " as "
+ name);
}
return modelerBinding.register(objectToRegister, name, context);
} else {
return false;
}
|
|