summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/core-spi
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-10-21 13:22:46 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-10-21 13:22:46 +0000
commit27135c0af6c70a3cc82e64b5c34c6cbdf9b738c3 (patch)
treeb403505b82aca5c2ef3ae445e5c6b6482ea78223 /java/sca/modules/core-spi
parent8cd9a3eeda24fc639227f2af6d3961974e51dfe9 (diff)
Experimental request response binding support. Just implemented for jms service binding and only activated when wireFormat appears in the SCDL. Still early stage so many more changes to come.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@706620 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/core-spi')
-rw-r--r--java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/BindingInterceptor.java46
-rw-r--r--java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OperationSelectorProvider.java39
-rw-r--r--java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OperationSelectortProviderFactory.java53
-rw-r--r--java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ServiceBindingProviderRRB.java40
-rw-r--r--java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/WireFormatProvider.java39
-rw-r--r--java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/WireFormatProviderFactory.java53
6 files changed, 270 insertions, 0 deletions
diff --git a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/BindingInterceptor.java b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/BindingInterceptor.java
new file mode 100644
index 0000000000..9aad2dd458
--- /dev/null
+++ b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/BindingInterceptor.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.invocation;
+
+/**
+ * TODO RRB experiment to allow the request and respose side of the
+ * invoke to be called independently
+ * Synchronous mediation associated with a client- or target- side wire.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface BindingInterceptor extends Invoker {
+
+ /**
+ * Process a synchronous request
+ *
+ * @param msg The request Message for the wire
+ * @return The response Message from the wire
+ */
+ Message invokeRequest(Message msg);
+
+ /**
+ * Process a synchronous response
+ *
+ * @param msg The request Message for the wire
+ * @return The response Message from the wire
+ */
+ Message invokeResponse(Message msg);
+
+}
diff --git a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OperationSelectorProvider.java b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OperationSelectorProvider.java
new file mode 100644
index 0000000000..f385c7dfba
--- /dev/null
+++ b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OperationSelectorProvider.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.provider;
+
+import org.apache.tuscany.sca.invocation.Interceptor;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface OperationSelectorProvider {
+ /**
+ * Create an interceptor for the operation selector
+ * @return An interceptor that realize the policySet
+ */
+ Interceptor createInterceptor();
+
+ /**
+ * Get the phase that the interceptor should be added
+ * @return The phase that this interceptor belongs to
+ */
+ String getPhase();
+}
diff --git a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OperationSelectortProviderFactory.java b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OperationSelectortProviderFactory.java
new file mode 100644
index 0000000000..21d36e5078
--- /dev/null
+++ b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OperationSelectortProviderFactory.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.provider;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.OperationSelector;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
+import org.apache.tuscany.sca.runtime.RuntimeComponentService;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface OperationSelectortProviderFactory<M extends OperationSelector> extends ProviderFactory<M> {
+ /**
+ * Create wire format provider for a given reference binding
+ * @param component
+ * @param reference
+ * @param binding
+ * @return
+ */
+ PolicyProvider createReferenceOperationSelectorProvider(RuntimeComponent component,
+ RuntimeComponentReference reference,
+ Binding binding);
+
+ /**
+ * Create policy provider for a given service binding
+ * @param component
+ * @param service
+ * @param binding
+ * @return
+ */
+ PolicyProvider createServiceOperationSelectorProvider(RuntimeComponent component,
+ RuntimeComponentService service,
+ Binding binding);
+}
diff --git a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ServiceBindingProviderRRB.java b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ServiceBindingProviderRRB.java
new file mode 100644
index 0000000000..cad31cb2b7
--- /dev/null
+++ b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ServiceBindingProviderRRB.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.provider;
+
+import java.util.List;
+
+import org.apache.tuscany.sca.interfacedef.InterfaceContract;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.runtime.RuntimeWire;
+
+/**
+ * TODO RRB experiment
+ * This is an experiment extension to try out the request response
+ * binding function
+ *
+ * @version $Rev$ $Date$
+ */
+public interface ServiceBindingProviderRRB extends ServiceBindingProvider {
+
+ void configureServiceBindingRequestChain(List<Invoker> bindingRequestChain, RuntimeWire runtimeWire);
+ void configureServiceBindingResponseChain(List<Invoker> bindingResponseChain, RuntimeWire runtimeWire);
+
+}
diff --git a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/WireFormatProvider.java b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/WireFormatProvider.java
new file mode 100644
index 0000000000..cc7f4626d3
--- /dev/null
+++ b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/WireFormatProvider.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.provider;
+
+import org.apache.tuscany.sca.invocation.Interceptor;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface WireFormatProvider {
+ /**
+ * Create an interceptor for the wire format
+ * @return An interceptor that realize the policySet
+ */
+ Interceptor createInterceptor();
+
+ /**
+ * Get the phase that the interceptor should be added
+ * @return The phase that this interceptor belongs to
+ */
+ String getPhase();
+}
diff --git a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/WireFormatProviderFactory.java b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/WireFormatProviderFactory.java
new file mode 100644
index 0000000000..fd748df6ca
--- /dev/null
+++ b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/WireFormatProviderFactory.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.provider;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.WireFormat;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
+import org.apache.tuscany.sca.runtime.RuntimeComponentService;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface WireFormatProviderFactory<M extends WireFormat> extends ProviderFactory<M> {
+ /**
+ * Create wire format provider for a given reference binding
+ * @param component
+ * @param reference
+ * @param binding
+ * @return
+ */
+ WireFormatProvider createReferenceWireFormatProvider(RuntimeComponent component,
+ RuntimeComponentReference reference,
+ Binding binding);
+
+ /**
+ * Create policy provider for a given service binding
+ * @param component
+ * @param service
+ * @param binding
+ * @return
+ */
+ WireFormatProvider createServiceWireFormatProvider(RuntimeComponent component,
+ RuntimeComponentService service,
+ Binding binding);
+}