atom feed1 message in org.apache.tuscany.commitssvn commit: r1041845 - in /tuscany/sc...
FromSent OnAttachments
sla...@apache.orgDec 3, 2010 6:59 am 
Subject:svn commit: r1041845 - in /tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly: Endpoint.java EndpointReference.java impl/EndpointImpl.java
From:sla...@apache.org (sla@apache.org)
Date:Dec 3, 2010 6:59:55 am
List:org.apache.tuscany.commits

Author: slaws Date: Fri Dec 3 14:59:54 2010 New Revision: 1041845

URL: http://svn.apache.org/viewvc?rev=1041845&view=rev Log: TUSCANY-3801 - allow endpoints to report when they are configured for async
invocation. Correct comment on endpoint reference version of the operation.

Modified: tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Endpoint.java tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointReference.java tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointImpl.java

Modified:
tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Endpoint.java URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Endpoint.java?rev=1041845&r1=1041844&r2=1041845&view=diff ============================================================================== ---
tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Endpoint.java
(original) +++
tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Endpoint.java
Fri Dec 3 14:59:54 2010 @@ -136,4 +136,13 @@ public interface Endpoint extends Base, */ boolean matches(String serviceURI);

+ /** + * When true this endpoint is able to process the invocation + * asynchronously. The forward call is effectively one-way + * and the response will arrive asynchronously + * + * @return true if the service is asynchronous + */ + boolean isAsyncInvocation(); + }

Modified:
tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointReference.java URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointReference.java?rev=1041845&r1=1041844&r2=1041845&view=diff ============================================================================== ---
tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointReference.java
(original) +++
tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointReference.java
Fri Dec 3 14:59:54 2010 @@ -165,8 +165,8 @@ public interface EndpointReference exten

/** * When true this endpoint reference is able to process the invocation - * as being asynchronous. The forward call is effectively one-way - * and the response will arrive asynchronously via the CallbackEndpoint + * asynchronously. The forward call is effectively one-way + * and the response will arrive asynchronously * * @return true if the reference is asynchronous */

Modified:
tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointImpl.java URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointImpl.java?rev=1041845&r1=1041844&r2=1041845&view=diff ============================================================================== ---
tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointImpl.java
(original) +++
tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointImpl.java
Fri Dec 3 14:59:54 2010 @@ -279,5 +279,20 @@ public class EndpointImpl implements End } return names; } + + public boolean isAsyncInvocation() { + if (service.getName().endsWith("_asyncCallback")){ + // this is a response service at the reference component so don't
create a + // response reference. + return false; + } + + for(Intent intent : getRequiredIntents()){ + if (intent.getName().getLocalPart().equals("asyncInvocation")){ + return true; + } + } + return false; + }