diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2008-11-30 13:46:51 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2008-11-30 13:46:51 +0000 |
commit | c8f58fe2afa3f2f3bdf86846a48cb5a6dd7d503b (patch) | |
tree | b96a10cd0bf623da0612ceff196be9315c7da2e8 /branches/sca-java-1.x/modules/core/src/main/java | |
parent | b30b676df944c0444a7a6ec8df26f8208a01e896 (diff) |
Tidy jms policy implementations to remove code from the binding and put it into binding wire interceptors. The implication is that the JMS runtime no longer depends on the JMS policy package. Also get rid of split packages in wire format and operation selector packages. Add a binding context to the Tuscany message so that you don't have to keep finding it in the message header.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@721811 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/core/src/main/java')
3 files changed, 19 insertions, 4 deletions
diff --git a/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java b/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java index b6f949f081..f03071ae88 100644 --- a/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java +++ b/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java @@ -238,7 +238,7 @@ public class RuntimeWireImpl implements RuntimeWire { if (p instanceof PolicyProviderRRB) { Interceptor interceptor = ((PolicyProviderRRB)p).createBindingInterceptor(); if (interceptor != null) { - bindingInvocationChain.addInterceptor(p.getPhase(), interceptor); + bindingInvocationChain.addInterceptor(Phase.REFERENCE_BINDING_POLICY, interceptor); } } } @@ -263,13 +263,12 @@ public class RuntimeWireImpl implements RuntimeWire { if (p instanceof PolicyProviderRRB) { Interceptor interceptor = ((PolicyProviderRRB)p).createBindingInterceptor(); if (interceptor != null) { - bindingInvocationChain.addInterceptor(p.getPhase(), interceptor); + bindingInvocationChain.addInterceptor(Phase.SERVICE_BINDING_POLICY, interceptor); } } } } - // TODO - add something on the end of the wire to invoke the // invocation chain. Need to split out the runtime // wire invoker into conversation, callback interceptors etc diff --git a/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/MessageImpl.java b/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/MessageImpl.java index a45362a92d..ca2bf051c8 100644 --- a/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/MessageImpl.java +++ b/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/MessageImpl.java @@ -32,6 +32,7 @@ import org.apache.tuscany.sca.runtime.EndpointReference; * @version $Rev $Date$ */ public class MessageImpl implements Message { + private Object bindingContext; private List<Object> headers = new ArrayList<Object>(); private Object body; private Object messageID; @@ -99,6 +100,14 @@ public class MessageImpl implements Message { public List<Object> getHeaders() { return headers; - } + } + + @SuppressWarnings("unchecked") + public <T> T getBindingContext() { + return (T)bindingContext; + } + public <T> void setBindingContext(T bindingContext) { + this.bindingContext = bindingContext; + } } diff --git a/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java b/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java index 582d1ee141..d6911281c8 100644 --- a/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java +++ b/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java @@ -189,6 +189,13 @@ public class NonBlockingInterceptor implements Interceptor { public List<Object> getHeaders() { return null; + } + + public <T> T getBindingContext() { + return null; + } + + public <T> void setBindingContext(T bindingContext) { } } |