[jdev]: how to implement my plugin as a component to be started	within the start of wildfire !
    Abdeltif Nouqrat 
    nouqrat at cs.tu-berlin.de
       
    Tue Jan  3 11:19:19 CST 2006
    
    
  
Hi all,
in order to implement my plugin as internal component of wildfire, I
implemented the "Component-interface" and the "Plugin-Interface".
I want that my component will be started at start of wildfire. Such as " 
multi user chat service".
My plugin-initialization shows as follows:
public void initializePlugin(PluginManager manager, File pluginDirectory) 
{
 		 XMPPServer server = XMPPServer.getInstance();
 		 initialize(server);
 		 hostname = server.getServerInfo().getName();
 		 userManager = server.getUserManager();
         	 presenceManager = server.getPresenceManager();
 	         componentName = "presence";
 	         internalComponentMgr = InternalComponentManager.getInstance();
 	         setServiceName(componentName);
 	         start();
 	     try {
 	    	internalComponentMgr.addComponent(componentName,this);
 		componentLog = internalComponentMgr.getLog();//To log information sent and received from/into component
 	     } catch (ComponentException e) {
 			e.printStackTrace();
 		}
 	}
where:
public void setServiceName(String name) {
         JiveGlobals.setProperty("xmpp.ipresence.service", name);
     }
public void start() {
 	internalComponentMgr.start();
     }
PLEASE correct me if I am at wrong way. Additional hints are welcome.
Best regards
Abdelatif
    
    
More information about the JDev
mailing list