diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-12 16:24:26 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-12 16:24:26 +0000 |
commit | f23d76120aa71b7d9cd0c45ad04c4bb01270342a (patch) | |
tree | 10f1103ec4a438a1e735657a6aaa52849b380ca0 | |
parent | 09dc3294d4dda4d78f18abb92c9b5e3e8d74d1ed (diff) |
Enable addition of policies to binding chains
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@909489 13f79535-47bb-0310-9956-ffa450edef68
2 files changed, 9 insertions, 18 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java index 733880a9b3..e0b866ddb9 100644 --- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java +++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java @@ -315,16 +315,12 @@ public class RuntimeEndpointImpl extends EndpointImpl implements RuntimeEndpoint List<PolicyProvider> pps = getPolicyProviders(); if (pps != null) { for (PolicyProvider p : pps) { - // TODO - SL - Need to get the binding policy providers -/* - if (p instanceof BindingPolicyProvider) { - Interceptor interceptor = ((BindingPolicyProvider)p).createBindingInterceptor(); - if (interceptor != null) { - bindingInvocationChain.addInterceptor(interceptor); - } + Interceptor interceptor = p.createBindingInterceptor(); + if (interceptor != null) { + bindingInvocationChain.addInterceptor(interceptor); } -*/ } + } // TODO - add something on the end of the wire to invoke the diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java index fc5a942186..e2cd2960ba 100644 --- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java +++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java @@ -346,15 +346,10 @@ public class RuntimeEndpointReferenceImpl extends EndpointReferenceImpl implemen // add the policy interceptors to the service binding wire // find out which policies are active for (PolicyProvider p : getPolicyProviders()) { - // TODO - SL - Need to get the binding policy providers -/* - if (p instanceof BindingPolicyProvider) { - Interceptor interceptor = ((BindingPolicyProvider)p).createBindingInterceptor(); - if (interceptor != null) { - bindingInvocationChain.addInterceptor(interceptor); - } + Interceptor interceptor = p.createBindingInterceptor(); + if (interceptor != null) { + bindingInvocationChain.addInterceptor(interceptor); } -*/ } } @@ -392,9 +387,9 @@ public class RuntimeEndpointReferenceImpl extends EndpointReferenceImpl implemen List<PolicyProvider> pps = getPolicyProviders(); if (pps != null) { for (PolicyProvider p : pps) { - Interceptor interceptor = p.createInterceptor(operation); + Interceptor interceptor = p.createBindingInterceptor(); if (interceptor != null) { - chain.addInterceptor(p.createInterceptor(operation)); + chain.addInterceptor(interceptor); } } } |