org.apache.tuscany.sca.core
Interface ModuleActivator


public interface ModuleActivator

ModuleActivator represents a module that plugs into the Tuscany system. Each module should provide an implementation of this interface and register the ModuleActivator implementation class by defining a file named "META-INF/services/org.apache.tuscany.spi.bootstrp.ModuleActivator" The content of the file is the class name of the ModuleActivator implementation. The implementation class must have a no-arg constructor. The same instance will be used to invoke all the methods during different phases of the module activation. Note that the start and stop methods defined by this interface take a reference to the Tuscany SCA runtime ExtensionPointRegistry. This gives the ModuleActivator the oppotunity to add extension points to the registry as it is requested to start up and remove them when it is requested to shut down.

Version:
$Rev: 538948 $ $Date: 2007-05-17 15:46:42 +0100 (Thu, 17 May 2007) $

Method Summary
 java.lang.Object[] getExtensionPoints()
          Get a map of the extension points defined by this module.
 void start(ExtensionPointRegistry registry)
          This method is invoked when the module is started by the Tuscany system.
 void stop(ExtensionPointRegistry registry)
          This method is invoked when the module is stopped by the Tuscany system.
 

Method Detail

getExtensionPoints

java.lang.Object[] getExtensionPoints()
Get a map of the extension points defined by this module. The key is the java interface to represent the extension point and the the value is the instance of the implementation of the interface.

Returns:
All the extension points defined by this module

start

void start(ExtensionPointRegistry registry)
This method is invoked when the module is started by the Tuscany system. It can be used by this module to registr extensions against extension points.

Parameters:
registry - The extension point registry

stop

void stop(ExtensionPointRegistry registry)
This method is invoked when the module is stopped by the Tuscany system. It can be used by this module to unregister extensions against the extension points.

Parameters:
registry - The extension point registry