I’ve noticed that, in OpenFire 3.6.4, there is no way to override modules loaded by the XMPPServer. All the methods dealing with modules are private. For reasons I won’t go into here, I need to subclass certain modules, and replace actively running modules with my own subclasses, which I want to provide from plugins. I am accomplishing this by adding this method to XMPPServer:
public void setModule( Class clazz, Module module ) {
Module current = modules.get(clazz);
if ( current != null ){
current.stop();
current.destroy();
}
this.modules.put(clazz, module);
}
public void setModule( Class clazz, Module module ) {
Module current = modules.get(clazz);
if ( current != null ){
current.stop();
current.destroy();
}
this.modules.put(clazz, module);
}
Is this a good idea? Is there a reason that users can’t already do this, or is this just something that developers figured users wouldn’t need?
Thanks,
Mike Shea.