You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2007/06/16 14:51:04 UTC
svn commit: r547916 - in
/incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi:
BindingActivator.java ImplementationActivator.java
Author: antelder
Date: Sat Jun 16 05:51:03 2007
New Revision: 547916
URL: http://svn.apache.org/viewvc?view=rev&rev=547916
Log:
Add a bit of javadoc
Modified:
incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/BindingActivator.java
incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/ImplementationActivator.java
Modified: incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/BindingActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/BindingActivator.java?view=diff&rev=547916&r1=547915&r2=547916
==============================================================================
--- incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/BindingActivator.java (original)
+++ incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/BindingActivator.java Sat Jun 16 05:51:03 2007
@@ -24,6 +24,38 @@
import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
import org.apache.tuscany.sca.runtime.RuntimeComponentService;
+/**
+ * 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 <binding.foo>.
+ *
+ * Attributes of the <binding.foo> 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, <binding.foo bar="xxx">.
+ *
+ * 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.spi.BindingActivator and
+ * that file lists the BindingActivator implementation class name.
+ */
public interface BindingActivator<B extends Binding> {
Class<B> getBindingClass();
Modified: incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/ImplementationActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/ImplementationActivator.java?view=diff&rev=547916&r1=547915&r2=547916
==============================================================================
--- incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/ImplementationActivator.java (original)
+++ incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/ImplementationActivator.java Sat Jun 16 05:51:03 2007
@@ -22,6 +22,38 @@
import org.apache.tuscany.sca.assembly.ComponentType;
import org.apache.tuscany.sca.runtime.RuntimeComponent;
+/**
+ * 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 <implementation.foo>.
+ *
+ * Attributes of the <implementation.foo> 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, <implementation.foo bar="xxx">.
+ *
+ * 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.spi.ImplementationActivator and
+ * that file lists the ImplementationActivator implementation class name.
+ */
public interface ImplementationActivator<T> {
Class<T> getImplementationClass();
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org