Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2007-09-12 05:22:25 +0000
committerslewis2007-09-12 05:22:25 +0000
commitd198f7090741caf9f34d910becc209c4564367ca (patch)
tree90e8b12bad6599826fef296bc25435acbb2ceff7 /framework
parentfcd6f5655526df83c66eda8c9f5451ee6e2bad7e (diff)
downloadorg.eclipse.ecf-d198f7090741caf9f34d910becc209c4564367ca.tar.gz
org.eclipse.ecf-d198f7090741caf9f34d910becc209c4564367ca.tar.xz
org.eclipse.ecf-d198f7090741caf9f34d910becc209c4564367ca.zip
Changed name of AsynchResult to AsyncResult. Abstracted public API for AsyncResult to IAsyncResult. Added method to IRemoteService.callAsynch that returns IAsyncResult. Implemented new method in org.eclipse.ecf.provider.remoteservice. Added test case for testing new API.
Diffstat (limited to 'framework')
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteService.java14
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/events/IRemoteCallCompleteEvent.java2
2 files changed, 15 insertions, 1 deletions
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteService.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteService.java
index 08d39337b..cc7c314ca 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteService.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteService.java
@@ -12,6 +12,7 @@
package org.eclipse.ecf.remoteservice;
import org.eclipse.ecf.core.util.ECFException;
+import org.eclipse.ecf.core.util.IAsyncResult;
/**
* Interface providing runtime access to a remote service. An instance
@@ -74,6 +75,19 @@ public interface IRemoteService {
public void callAsynch(IRemoteCall call, IRemoteCallListener listener);
/**
+ * Call remote method specified by call parameter asynchronously, and immediately
+ * return {@link IAsyncResult} instance. Returned IAsynchResult will not be <code>null</code>,
+ * and allows the caller to retrieve the actual resulting value from the remote call
+ * (or exception).
+ *
+ * @param call the remote call to make. Must not be <code>null</code> .
+ * @return IAsyncResult the asynchronous result to allow the caller to poll
+ * for whether the result {@link IAsyncResult#isReady()}, and then to {@link IAsyncResult#get(long)}
+ * the actual result.
+ */
+ public IAsyncResult callAsynch(IRemoteCall call);
+
+ /**
* Fire remote method specified by call parameter. The remote method will be
* invoked as a result of asynchronous message send, but no
* failure/exception information will be returned, and no result will be
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/events/IRemoteCallCompleteEvent.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/events/IRemoteCallCompleteEvent.java
index bf81c054b..7edcd387b 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/events/IRemoteCallCompleteEvent.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/events/IRemoteCallCompleteEvent.java
@@ -19,7 +19,7 @@ public interface IRemoteCallCompleteEvent extends IRemoteCallEvent {
/**
* Get response object.
*
- * @return Object that is response to remmote call. May be null.
+ * @return Object that is response to remmote call. May be <code>null</code>.
*/
public Object getResponse();

Back to the top