diff options
author | fmoga <fmoga@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-16 06:38:58 +0000 |
---|---|---|
committer | fmoga <fmoga@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-16 06:38:58 +0000 |
commit | cb33115b3f1a451df53395e714668fb242e05fc5 (patch) | |
tree | ed3c9e06f7999c22d918eea4c703e342b87350e8 /sca-java-2.x/contrib/modules/binding-comet-runtime/src/main/java/org | |
parent | 967a400aedcf407f95c5c971bad1ef12d7fe272d (diff) |
Added javadocs.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@985812 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
3 files changed, 34 insertions, 1 deletions
diff --git a/sca-java-2.x/contrib/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometBindingProviderFactory.java b/sca-java-2.x/contrib/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometBindingProviderFactory.java index 747ea4d78e..6e5cc28abf 100644 --- a/sca-java-2.x/contrib/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometBindingProviderFactory.java +++ b/sca-java-2.x/contrib/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometBindingProviderFactory.java @@ -29,10 +29,19 @@ import org.apache.tuscany.sca.provider.ServiceBindingProvider; import org.apache.tuscany.sca.runtime.RuntimeEndpoint; import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; +/** + * Factory for binding providers. + */ public class CometBindingProviderFactory implements BindingProviderFactory<CometBinding> { + /** + * Underlying servlet host. Injected by constructor. + */ private ServletHost servletHost; + /** + * Constructor. + */ public CometBindingProviderFactory(ExtensionPointRegistry extensionPoints) { this.servletHost = ServletHostHelper.getServletHost(extensionPoints); } @@ -41,10 +50,16 @@ public class CometBindingProviderFactory implements BindingProviderFactory<Comet return CometBinding.class; } + /** + * Creates a provider for a reference that has comet binding specified in the scdl. + */ public ReferenceBindingProvider createReferenceBindingProvider(RuntimeEndpointReference endpoint) { return new CometReferenceBindingProvider(endpoint); } + /** + * Creates a provider for a service that has comet binding specified in the scdl. + */ public ServiceBindingProvider createServiceBindingProvider(RuntimeEndpoint endpoint) { return new CometServiceBindingProvider(endpoint, servletHost); } diff --git a/sca-java-2.x/contrib/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometInvoker.java b/sca-java-2.x/contrib/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometInvoker.java index 3b3f9beed3..9a7679ba3b 100644 --- a/sca-java-2.x/contrib/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometInvoker.java +++ b/sca-java-2.x/contrib/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometInvoker.java @@ -24,8 +24,12 @@ import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.invocation.Invoker; import org.apache.tuscany.sca.invocation.Message; +/** + * Invoker for a service binding. Invoking is made from client Javascript so no + * behavior is needed. + */ public class CometInvoker implements Invoker { - + protected Operation operation; protected EndpointReference endpoint; @@ -34,6 +38,9 @@ public class CometInvoker implements Invoker { this.endpoint = endpoint; } + /** + * No behavior. + */ public Message invoke(Message msg) { return null; } diff --git a/sca-java-2.x/contrib/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometReferenceBindingProvider.java b/sca-java-2.x/contrib/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometReferenceBindingProvider.java index 091fc836be..47bdbf9aab 100644 --- a/sca-java-2.x/contrib/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometReferenceBindingProvider.java +++ b/sca-java-2.x/contrib/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometReferenceBindingProvider.java @@ -25,6 +25,10 @@ import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.invocation.Invoker; import org.apache.tuscany.sca.provider.ReferenceBindingProvider; +/** + * Provider for references that have comet binding specified in the scdl. + * Not used as comet binding references would occur in client browser's Javascript. + */ public class CometReferenceBindingProvider implements ReferenceBindingProvider { private EndpointReference endpoint; @@ -32,13 +36,20 @@ public class CometReferenceBindingProvider implements ReferenceBindingProvider { public CometReferenceBindingProvider(EndpointReference endpoint) { this.endpoint = endpoint; } + public Invoker createInvoker(Operation operation) { return new CometInvoker(operation, endpoint); } + /** + * No behavior. + */ public void start() { } + /** + * No behavior. + */ public void stop() { } |