diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-25 11:59:58 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-25 11:59:58 +0000 |
commit | ce82a7f210ae1567db740532e451a9ec28f176b9 (patch) | |
tree | 7b28a1ef814cadd26213b3fe9ee7197e6c4c765c /sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany | |
parent | f35d48772e6d3bf5c4a2006cf23bf4731e420b1b (diff) |
TUSCANY-3932 - Rework the callack wire calculation to be based on non-runtime configurations. I've modified the Endpoint writing algorithm to write out automatically calculated callback bindings as well as callback bindings specified explicitly by the user.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1161527 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany')
-rw-r--r-- | sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/EndpointProcessor.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/EndpointProcessor.java b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/EndpointProcessor.java index d128897df0..9f323a5507 100644 --- a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/EndpointProcessor.java +++ b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/EndpointProcessor.java @@ -26,10 +26,12 @@ import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import org.apache.tuscany.sca.assembly.Binding; +import org.apache.tuscany.sca.assembly.Callback; import org.apache.tuscany.sca.assembly.Component; import org.apache.tuscany.sca.assembly.ComponentService; import org.apache.tuscany.sca.assembly.Composite; import org.apache.tuscany.sca.assembly.Endpoint; +import org.apache.tuscany.sca.assembly.EndpointReference; import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.contribution.processor.ContributionResolveException; import org.apache.tuscany.sca.contribution.processor.ContributionWriteException; @@ -114,7 +116,20 @@ public class EndpointProcessor extends BaseAssemblyProcessor implements StAXArti if (endpoint.getBinding() != null) { Binding binding = (Binding)endpoint.getBinding().clone(); service.getBindings().add(binding); - } + } + // put both manually configured AND automatically generated callback bindings + // into the wrapping model so that we can pass callback configuarion via + // the registry + if (service.getCallbackReference() != null) { + Callback callback = service.getCallback(); + if(callback == null){ + callback = assemblyFactory.createCallback(); + } + for (EndpointReference epr : service.getCallbackReference().getEndpointReferences()){ + callback.getBindings().add(epr.getBinding()); + } + service.setCallback(callback); + } } } return composite; |