diff options
Diffstat (limited to 'branches/sca-java-1.x/modules/core/src/main')
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) { } } |