org.apache.tuscany.sca.core
Interface ModuleActivator

All Known Implementing Classes:
BindingsActivator, CorbaRuntimeModuleActivator, CorbaRuntimeModuleActivator, CorbaRuntimeModuleActivator, DataBindingModuleActivator, ImplementationsActivator, JavaImplementationActivator, JavaRuntimeModuleActivator, JettyRuntimeModuleActivator, JMSBroker, JSR250Activator, NotificationBindingModuleActivator, NotificationModuleActivator, OSGiRuntimeModuleActivator, TomcatRuntimeModuleActivator, TransactionModuleActivator, WebAppModuleActivator

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.core.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 opportunity to add extension points to the registry as it is requested to start up and remove them when it is requested to shut down.


Method Summary
 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

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 register 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