summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/core/src
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-09-05 11:13:14 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-09-05 11:13:14 +0000
commit772d956afa3a4ec971d3f8013d66117ef462bf6b (patch)
tree09f583eabc7dd8787a2582e9edeabde1626186ed /java/sca/modules/core/src
parent6df72a7b3fce91961535e82ec5757ce59bf7d71c (diff)
Use basic authentication as a motivating scenario for looking at policy plug points. Generic username/password processing is added as an interceptor. Specific axis configuration is performed by new logic specific to binding.ws which is invoked if the basic auth policy is present (we need to think about this mechanism). I added a binding-ws-axis2-policy module as a replacement for policy-security-ws but haven't moved over to it yet. I also added a message header map to Message but have only been experimenting to date.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@692411 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/core/src')
-rw-r--r--java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java3
-rw-r--r--java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/MessageImpl.java5
-rw-r--r--java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java4
3 files changed, 11 insertions, 1 deletions
diff --git a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java
index c67ead43e9..58109fd86b 100644
--- a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java
+++ b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java
@@ -185,6 +185,7 @@ public class RuntimeWireImpl implements RuntimeWire {
if (operation.isNonBlocking()) {
addNonBlockingInterceptor(service, serviceBinding, chain);
}
+ addServiceBindingInterceptor(service, serviceBinding, chain, operation);
addImplementationInterceptor(serviceComponent, service, chain, targetOperation);
chains.add(chain);
}
@@ -249,7 +250,7 @@ public class RuntimeWireImpl implements RuntimeWire {
* @param chain
* @param operation
*/
- private void addServiceBindingInterceptor(ComponentReference service,
+ private void addServiceBindingInterceptor(ComponentService service,
Binding binding,
InvocationChain chain,
Operation operation) {
diff --git a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/MessageImpl.java b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/MessageImpl.java
index b5b41b9d00..7d7fc583c3 100644
--- a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/MessageImpl.java
+++ b/java/sca/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 Map<String, Object> header = new Hashtable<String, Object>();
private Object body;
private Object messageID;
private boolean isFault;
@@ -100,5 +101,9 @@ public class MessageImpl implements Message {
public Map<String, Object> getQoSContext() {
return qosContext;
}
+
+ public Map<String, Object> getHeader() {
+ return qosContext;
+ }
}
diff --git a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java
index e83f9e64f9..60f90fb6b5 100644
--- a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java
+++ b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java
@@ -185,6 +185,10 @@ public class NonBlockingInterceptor implements Interceptor {
public Map<String, Object> getQoSContext() {
return null;
}
+
+ public Map<String, Object> getHeader() {
+ return null;
+ }
}
}