diff options
Diffstat (limited to 'java/sca')
10 files changed, 19 insertions, 230 deletions
diff --git a/java/sca/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomServiceBindingProvider.java b/java/sca/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomServiceBindingProvider.java index 958f1f8591..e1d470f5a3 100644 --- a/java/sca/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomServiceBindingProvider.java +++ b/java/sca/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomServiceBindingProvider.java @@ -79,9 +79,6 @@ class AtomServiceBindingProvider implements ServiceBindingProvider { servletMapping += "*"; } servletHost.addServletMapping(servletMapping, servlet); - - // Save the actual binding URI in the binding - binding.setURI(servletHost.getURLMapping(binding.getURI()).toString()); } public void stop() { diff --git a/java/sca/modules/binding-atom/src/main/java/org/apache/tuscany/sca/binding/atom/impl/AtomBindingImpl.java b/java/sca/modules/binding-atom/src/main/java/org/apache/tuscany/sca/binding/atom/impl/AtomBindingImpl.java index 04f1412fd8..8b0b9451fb 100644 --- a/java/sca/modules/binding-atom/src/main/java/org/apache/tuscany/sca/binding/atom/impl/AtomBindingImpl.java +++ b/java/sca/modules/binding-atom/src/main/java/org/apache/tuscany/sca/binding/atom/impl/AtomBindingImpl.java @@ -37,7 +37,7 @@ import org.apache.tuscany.sca.policy.PolicySetAttachPoint; * * @version $Rev$ $Date$ */ -class AtomBindingImpl implements AtomBinding, OptimizableBinding, PolicySetAttachPoint { +class AtomBindingImpl implements AtomBinding, PolicySetAttachPoint { private String name; private String uri; @@ -107,40 +107,9 @@ class AtomBindingImpl implements AtomBinding, OptimizableBinding, PolicySetAttac public void setRequiredIntents(List<Intent> intents) { this.requiredIntents = intents; } - - //FIXME Temporary to get access to the target binding information - // To be removed when the distributed domain supports wiring of other - // bindings than the SCA binding - private Binding targetBinding; - private Component targetComponent; - private ComponentService targetComponentService; - + + @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } - - public Binding getTargetBinding() { - return targetBinding; - } - - public void setTargetBinding(Binding binding) { - this.targetBinding = binding; - } - - public Component getTargetComponent() { - return targetComponent; - } - - public void setTargetComponent(Component component) { - this.targetComponent = component; - } - - public ComponentService getTargetComponentService() { - return targetComponentService; - } - - public void setTargetComponentService(ComponentService service) { - this.targetComponentService = service; - } - } diff --git a/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/impl/AtomBindingImpl.java b/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/impl/AtomBindingImpl.java index 6a46ff6e5b..76551bc412 100644 --- a/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/impl/AtomBindingImpl.java +++ b/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/impl/AtomBindingImpl.java @@ -22,10 +22,6 @@ package org.apache.tuscany.sca.binding.feed.impl; import java.util.ArrayList; import java.util.List; -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.ComponentService; -import org.apache.tuscany.sca.assembly.OptimizableBinding; import org.apache.tuscany.sca.binding.feed.AtomBinding; import org.apache.tuscany.sca.policy.Intent; import org.apache.tuscany.sca.policy.IntentAttachPointType; @@ -37,7 +33,7 @@ import org.apache.tuscany.sca.policy.PolicySetAttachPoint; * * @version $Rev$ $Date$ */ -class AtomBindingImpl implements AtomBinding, OptimizableBinding, PolicySetAttachPoint { +class AtomBindingImpl implements AtomBinding, PolicySetAttachPoint { private String name; private String uri; @@ -91,47 +87,10 @@ class AtomBindingImpl implements AtomBinding, OptimizableBinding, PolicySetAttac public void setType(IntentAttachPointType intentAttachPointType) { this.intentAttachPointType = intentAttachPointType; } - - //FIXME Temporary to get access to the target binding information - // To be removed when the distributed domain supports wiring of other - // bindings than the SCA binding - private Binding targetBinding; - private Component targetComponent; - private ComponentService targetComponentService; + @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } - - public Binding getTargetBinding() { - return targetBinding; - } - - public void setTargetBinding(Binding binding) { - this.targetBinding = binding; - } - - public Component getTargetComponent() { - return targetComponent; - } - - public void setTargetComponent(Component component) { - this.targetComponent = component; - } - - public ComponentService getTargetComponentService() { - return targetComponentService; - } - - public void setTargetComponentService(ComponentService service) { - this.targetComponentService = service; - } - - public void setPolicySets(List<PolicySet> policySets) { - this.policySets = policySets; - } - public void setRequiredIntents(List<Intent> intents) { - this.requiredIntents = intents; - } } diff --git a/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/AtomServiceBindingProvider.java b/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/AtomServiceBindingProvider.java index bffa5dec0e..23c36f51e3 100644 --- a/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/AtomServiceBindingProvider.java +++ b/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/AtomServiceBindingProvider.java @@ -79,9 +79,6 @@ class AtomServiceBindingProvider implements ServiceBindingProvider { servletMapping += "*"; } servletHost.addServletMapping(servletMapping, servlet); - - // Save the actual binding URI in the binding - binding.setURI(servletHost.getURLMapping(binding.getURI()).toString()); } public void stop() { diff --git a/java/sca/modules/binding-gdata-gsoc/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GdataBindingImpl.java b/java/sca/modules/binding-gdata-gsoc/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GdataBindingImpl.java index 03891f9228..c389bacdc9 100644 --- a/java/sca/modules/binding-gdata-gsoc/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GdataBindingImpl.java +++ b/java/sca/modules/binding-gdata-gsoc/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GdataBindingImpl.java @@ -36,7 +36,7 @@ import org.apache.tuscany.sca.policy.PolicySetAttachPoint; * Implementation of the GData binding model. * */ -class GdataBindingImpl implements GdataBinding, OptimizableBinding, PolicySetAttachPoint { +class GdataBindingImpl implements GdataBinding, PolicySetAttachPoint { private String name; private String uri; @@ -127,41 +127,6 @@ class GdataBindingImpl implements GdataBinding, OptimizableBinding, PolicySetAtt this.intentAttachPointType = intentAttachPointType; } - //FIXME Temporary to get access to the target binding information - // To be removed when the distributed domain supports wiring of other - // bindings than the SCA binding - private Binding targetBinding; - private Component targetComponent; - private ComponentService targetComponentService; - - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - public Binding getTargetBinding() { - return targetBinding; - } - - public void setTargetBinding(Binding binding) { - this.targetBinding = binding; - } - - public Component getTargetComponent() { - return targetComponent; - } - - public void setTargetComponent(Component component) { - this.targetComponent = component; - } - - public ComponentService getTargetComponentService() { - return targetComponentService; - } - - public void setTargetComponentService(ComponentService service) { - this.targetComponentService = service; - } - public void setPolicySets(List<PolicySet> policySets) { this.policySets = policySets; } @@ -169,4 +134,9 @@ class GdataBindingImpl implements GdataBinding, OptimizableBinding, PolicySetAtt public void setRequiredIntents(List<Intent> intents) { this.requiredIntents = intents; } + + @Override + public Object clone() throws CloneNotSupportedException { + return super.clone(); + } } diff --git a/java/sca/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GDataBindingImpl.java b/java/sca/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GDataBindingImpl.java index 3081816185..1d58552c8f 100644 --- a/java/sca/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GDataBindingImpl.java +++ b/java/sca/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GDataBindingImpl.java @@ -21,10 +21,6 @@ package org.apache.tuscany.sca.binding.gdata.impl; import java.util.ArrayList; import java.util.List; -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.ComponentService; -import org.apache.tuscany.sca.assembly.OptimizableBinding; import org.apache.tuscany.sca.binding.gdata.GDataBinding; import org.apache.tuscany.sca.policy.Intent; import org.apache.tuscany.sca.policy.IntentAttachPointType; @@ -36,7 +32,7 @@ import org.apache.tuscany.sca.policy.PolicySetAttachPoint; * * @version $Rev$ $Date$ */ -class GDataBindingImpl implements GDataBinding, OptimizableBinding, PolicySetAttachPoint { +class GDataBindingImpl implements GDataBinding, PolicySetAttachPoint { private String password; private String username; @@ -100,41 +96,12 @@ class GDataBindingImpl implements GDataBinding, OptimizableBinding, PolicySetAtt public void setType(IntentAttachPointType intentAttachPointType) { this.intentAttachPointType = intentAttachPointType; - } //FIXME Temporary to get access to the target binding information - // To be removed when the distributed domain supports wiring of other - // bindings than the SCA binding - private Binding targetBinding; - private Component targetComponent; - private ComponentService targetComponentService; - + } + public Object clone() throws CloneNotSupportedException { return super.clone(); } - public Binding getTargetBinding() { - return targetBinding; - } - - public void setTargetBinding(Binding binding) { - this.targetBinding = binding; - } - - public Component getTargetComponent() { - return targetComponent; - } - - public void setTargetComponent(Component component) { - this.targetComponent = component; - } - - public ComponentService getTargetComponentService() { - return targetComponentService; - } - - public void setTargetComponentService(ComponentService service) { - this.targetComponentService = service; - } - public void setPolicySets(List<PolicySet> policySets) { this.policySets = policySets; } diff --git a/java/sca/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceBindingProvider.java b/java/sca/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceBindingProvider.java index ef3b993c1f..4584a479b3 100644 --- a/java/sca/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceBindingProvider.java +++ b/java/sca/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceBindingProvider.java @@ -90,9 +90,6 @@ public class HTTPServiceBindingProvider implements ServiceBindingProvider { servletMapping += "*"; } servletHost.addServletMapping(servletMapping, servlet); - - // Save the actual binding URI in the binding - binding.setURI(servletHost.getURLMapping(binding.getURI()).toString()); } public void stop() { diff --git a/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java b/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java index 19fd0e5665..36caa9f510 100644 --- a/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java +++ b/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java @@ -31,7 +31,7 @@ import org.apache.tuscany.sca.binding.http.HTTPBinding; * * @version $Rev$ $Date$ */ -class HTTPBindingImpl implements HTTPBinding, OptimizableBinding { +class HTTPBindingImpl implements HTTPBinding { private String name; private String uri; @@ -65,35 +65,4 @@ class HTTPBindingImpl implements HTTPBinding, OptimizableBinding { return super.clone(); } - //FIXME Temporary to get access to the target binding information - // To be removed when the distributed domain supports wiring of other - // bindings than the SCA binding - private Binding targetBinding; - private Component targetComponent; - private ComponentService targetComponentService; - - public Binding getTargetBinding() { - return targetBinding; - } - - public void setTargetBinding(Binding binding) { - this.targetBinding = binding; - } - - public Component getTargetComponent() { - return targetComponent; - } - - public void setTargetComponent(Component component) { - this.targetComponent = component; - } - - public ComponentService getTargetComponentService() { - return targetComponentService; - } - - public void setTargetComponentService(ComponentService service) { - this.targetComponentService = service; - } - } diff --git a/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceBindingProvider.java b/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceBindingProvider.java index 9ee70d5adc..8d9f8193e9 100644 --- a/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceBindingProvider.java +++ b/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceBindingProvider.java @@ -109,12 +109,9 @@ public class JSONRPCServiceBindingProvider implements ServiceBindingProvider { servletHost.addServletMapping(binding.getURI(), serviceServlet); servletMappings.add(binding.getURI()); - // Save the actual binding URI - binding.setURI(servletHost.getURLMapping(binding.getURI()).toString()); - // Register service to scaDomain.js int port; - URI uri = URI.create(binding.getURI()); + URI uri = URI.create(servletHost.getURLMapping(binding.getURI()).toString()); port = uri.getPort(); if (port == -1) { port = servletHost.getDefaultPort(); diff --git a/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBinding.java b/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBinding.java index 409acf99f7..4160213e8c 100644 --- a/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBinding.java +++ b/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBinding.java @@ -20,16 +20,13 @@ package org.apache.tuscany.sca.binding.jsonrpc; import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.ComponentService; -import org.apache.tuscany.sca.assembly.OptimizableBinding; /** * A model for the JSONRPC binding. * * @version $Rev$ $Date$ */ -public class JSONRPCBinding implements OptimizableBinding { +public class JSONRPCBinding implements Binding { private String name; private String uri; @@ -58,39 +55,9 @@ public class JSONRPCBinding implements OptimizableBinding { // The binding is always resolved } - //FIXME Temporary to get access to the target binding information - // To be removed when the distributed domain supports wiring of other - // bindings than the SCA binding - private Binding targetBinding; - private Component targetComponent; - private ComponentService targetComponentService; - + @Override public Object clone() throws CloneNotSupportedException { + // TODO Auto-generated method stub return super.clone(); } - - public Binding getTargetBinding() { - return targetBinding; - } - - public void setTargetBinding(Binding binding) { - this.targetBinding = binding; - } - - public Component getTargetComponent() { - return targetComponent; - } - - public void setTargetComponent(Component component) { - this.targetComponent = component; - } - - public ComponentService getTargetComponentService() { - return targetComponentService; - } - - public void setTargetComponentService(ComponentService service) { - this.targetComponentService = service; - } - } |