2016/05/28 - Apache Tuscany has been retired.
For more information, please explore the Attic.
org.apache.tuscany.sca.extension.helper
Interface BindingActivator<B>
- All Known Implementing Classes:
- DWRBindingActivator
public interface BindingActivator<B>
A BindingActivator adds an SCA binding type to the Tuscany runtime.
The SCDL XML used for the binding is derived from the name of the
class returned from the getBindingClass method - the package name and
any trailing "Binding" string is removed, leading upper case characters
are converted to lowercase, and the suffix "binding." is added.
For example if getBindingClass returns a class named "mypkg.FooBinding"
then the SCDL for the binding will be .
Attributes of the SCDL are based on the getters/setters of
the binding class. So if FooBinding 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 MyBindingActivator implements BindingActivator {
ServletHost servletHost;
public MyBindingActivator(ServletHost servletHost) {
this.servletHost = servletHost;
}
...
}
BindingActivator 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.BindingActivator and
that file lists the BindingActivator implementation class name.
getBindingClass
java.lang.Class<B> getBindingClass()
createInvokerFactory
InvokerFactory createInvokerFactory(RuntimeComponent rc,
RuntimeComponentReference rcr,
Binding b,
B pojoBinding)
createService
ComponentLifecycle createService(RuntimeComponent rc,
RuntimeComponentService rcs,
Binding b,
B pojoBinding)