2016/05/28 - Apache Tuscany has been retired.
For more information, please explore the Attic.
org.apache.tuscany.sca.extension.helper
Interface ImplementationActivator<T>
- All Known Implementing Classes:
- ScriptImplementationActivator
public interface ImplementationActivator<T>
An ImplementationActivator adds an SCA implementation type to the Tuscany runtime.
The SCDL XML used for the implementation is derived from the name of the
class returned from the getImplementationClass method - the package name and
any trailing "Implementation" string is removed, leading upper case characters
are converted to lowercase, and the suffix "implementation." is added. For
example if getImplementationClass returns a class named "mypkg.FooImplementation"
then the SCDL for the implementation will be .
Attributes of the SCDL are based on the getters/setters of
the Implementation class. So if FooImplementation had getBar/setBar then there
would be an attribute name 'bar', for example, .
BindingActivator implementations may use constructor arguments to have
Tuscany ExtensionPointRegistry objects passed in on their constructor.
For example:
public class MyImplementationActivator implements ImplementationActivator {
ServletHost servletHost;
public MyImplementationActivator(ServletHost servletHost) {
this.servletHost = servletHost;
}
...
}
ImplementationActivator implementations are discovered by the Tuscany runtime
using the J2SE jar file extensions for service provider discovery. All
that means is packaging the new binding type in a jar which contains a
file META-INF/services/org.apache.tuscany.sca.extension.helper.ImplementationActivator and
that file lists the ImplementationActivator implementation class name.
getImplementationClass
java.lang.Class<T> getImplementationClass()
createInvokerFactory
InvokerFactory createInvokerFactory(RuntimeComponent rc,
ComponentType ct,
T implementation)