You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ed...@apache.org on 2011/01/11 15:15:08 UTC
svn commit: r1057650 - in
/tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca:
invocation/InvocationChain.java provider/OptimisingBindingProvider.java
runtime/RuntimeComponentReference.java
Author: edwardsmj
Date: Tue Jan 11 14:15:07 2011
New Revision: 1057650
URL: http://svn.apache.org/viewvc?rev=1057650&view=rev
Log:
Add capability to support Bindings that support Async invocations natively - as under TUSCANY-3801
Added:
tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OptimisingBindingProvider.java (with props)
Modified:
tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/InvocationChain.java
tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentReference.java
Modified: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/InvocationChain.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/InvocationChain.java?rev=1057650&r1=1057649&r2=1057650&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/InvocationChain.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/InvocationChain.java Tue Jan 11 14:15:07 2011
@@ -60,15 +60,35 @@ public interface InvocationChain {
void setSourceOperation(Operation operation);
/**
- * Adds an interceptor to the chain. For reference side, it will be added to
+ * Adds an interceptor to the end of the chain. For reference side, it will be added to
* Phase.REFERENCE. For service side, it will be added to Phase.SERVICE
*
* @param interceptor The interceptor to add
*/
void addInterceptor(Interceptor interceptor);
+
+ /**
+ * Add an interceptor to the end of the given phase
+ * @param phase - the phase
+ * @param interceptor - the interceptor
+ */
+ void addInterceptor(String phase, Interceptor interceptor);
+
+ /**
+ * Adds an interceptor to the head of the chain
+ * @param interceptor - the interceptor
+ */
+ void addHeadInterceptor(Interceptor interceptor);
+
+ /**
+ * Adds an interceptor to the head of the given phase
+ * @param phase - the phase
+ * @param interceptor - the interceptor
+ */
+ void addHeadInterceptor(String phase, Interceptor interceptor);
/**
- * Adds an invoker to the chain
+ * Adds an invoker to the end of the chain
*
* @param invoker The invoker to add
*/
@@ -96,13 +116,6 @@ public interface InvocationChain {
Invoker getHeadInvoker(String phase);
/**
- * Add an interceptor to the given phase
- * @param phase
- * @param interceptor
- */
- void addInterceptor(String phase, Interceptor interceptor);
-
- /**
* Indicate if the data can be passed in by reference as they won't be mutated.
* @return true if pass-by-reference is allowed
*/
Added: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OptimisingBindingProvider.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OptimisingBindingProvider.java?rev=1057650&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OptimisingBindingProvider.java (added)
+++ tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OptimisingBindingProvider.java Tue Jan 11 14:15:07 2011
@@ -0,0 +1,34 @@
+/*
+ * 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.runtime.RuntimeEndpoint;
+
+/**
+ * Defines the extra operation that binding providers implement
+ * when they provide local optimisation of reference to service invocations
+ */
+public interface OptimisingBindingProvider {
+ /**
+ * Optimise the binding chain for a service endpoint
+ */
+ void optimiseBinding( RuntimeEndpoint ep );
+
+} // end interface OptimisingBindingProvider
Propchange: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OptimisingBindingProvider.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OptimisingBindingProvider.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentReference.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentReference.java?rev=1057650&r1=1057649&r2=1057650&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentReference.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentReference.java Tue Jan 11 14:15:07 2011
@@ -35,4 +35,10 @@ public interface RuntimeComponentReferen
* @param component
*/
void setComponent(RuntimeComponent component);
+
+ /**
+ * Get the owning component
+ * @return the owning component
+ */
+ RuntimeComponent getComponent();
}