Hi all…
I’m a newbie in openfire , i was learning about develop a plugin , and i learned from broadcast.jar source code.
What I want to ask is about ComponentManagerFactory.getComponentManager() ?
What is actually ComponentManager Implementation Class created by ComponentManagerFactory above ?
this a chuck of code from broadcast plugin :
public void initializePlugin(PluginManager manager, File pluginDirectory)
{
pluginManager = manager;
sessionManager = SessionManager.getInstance();
groupManager = GroupManager.getInstance();
userManager = UserManager.getInstance();
componentManager = ComponentManagerFactory.getComponentManager(); // <---------------- MY POINT !!!
try
{
componentManager.addComponent(serviceName, this);
}
catch(Exception e)
{
Log.error(e.getMessage(), e);
}
PropertyEventDispatcher.addListener(this);
}
I have read from API about ComponentManagerFactory, I’ve got this :
Factory to get a ComponentManager implementation. The ComponentManager implementation used will determined in the following way:
- An external process can set the ComponentManager using
setComponentManager(ComponentManager)
. - If the component manager is
null
, the factory will check for the Java system property “whack.componentManagerClass”. The value of the property should be the fully qualified class name of a ComponentManager implementation (e.g. com.foo.MyComponentManager). The class must have a default constructor.
I want to ask about second point , if anyone could explain to me what is avtually happened ??
I don’t about CHECK FOR JAVA SYSTEM PROPERTY “whack.componentManagerClass” ( WHERE I Can found this value ) ?? Is it means openfire system property from admin console ??
Wish anyone could help me , to explain all about this
Thanks a lot
God Bless You