diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-11-24 12:03:57 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-11-24 12:03:57 +0000 |
commit | 97a0a82b386becd737258b9d45e4c83ecfacdf78 (patch) | |
tree | 9937f76995f393ce3c05928e33c5acc8e0b34701 /sca-java-2.x/trunk/modules/assembly/src/main | |
parent | 6b12e75324692b5420e4bd5c4382c7c1847359ad (diff) |
TUSCANY-3786 - add an operation so that the EPR can indicate whether it will do an async invocation or not.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1038575 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/assembly/src/main')
2 files changed, 18 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointReference.java b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointReference.java index f9edbe6e87..2fc8eebe4d 100644 --- a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointReference.java +++ b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointReference.java @@ -162,4 +162,13 @@ public interface EndpointReference extends Base, PolicySubject, Cloneable, Seria * @param status the new status */ void setStatus(Status status); + + /** + * 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 + * + * @return true if the reference is asynchronous + */ + boolean isAsyncInvocation(); } diff --git a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointReferenceImpl.java b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointReferenceImpl.java index ac35b45678..d5ba25f04b 100644 --- a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointReferenceImpl.java +++ b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointReferenceImpl.java @@ -230,4 +230,13 @@ public class EndpointReferenceImpl implements EndpointReference { public void setStatus(Status status) { this.status = status; } + + public boolean isAsyncInvocation() { + for(Intent intent : getRequiredIntents()){ + if (intent.getName().getLocalPart().equals("asyncInvocation")){ + return true; + } + } + return false; + } } |