Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2011-08-27 19:56:05 +0000
committerslewis2011-08-27 19:56:05 +0000
commitf1177da68f5bdaa38411d293025a1df45048f533 (patch)
treecff8ef3b0e612d0b50af2379ef58422be303c075
parent2e0652cb0c84d46a652d6b256637c505b8f8e2fd (diff)
downloadorg.eclipse.ecf-R-Release_HEAD-sdk_feature-34_2011-08-29_00-05-20.tar.gz
org.eclipse.ecf-R-Release_HEAD-sdk_feature-34_2011-08-29_00-05-20.tar.xz
org.eclipse.ecf-R-Release_HEAD-sdk_feature-34_2011-08-29_00-05-20.zip
Added javadoc for remote service constantsR-Release_HEAD-sdk_feature-34_2011-08-29_00-05-20
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice/.settings/.api_filters4
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRemoteService.java2
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/Constants.java49
3 files changed, 51 insertions, 4 deletions
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/.settings/.api_filters b/framework/bundles/org.eclipse.ecf.remoteservice/.settings/.api_filters
index 1c1e42412..332577a70 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice/.settings/.api_filters
+++ b/framework/bundles/org.eclipse.ecf.remoteservice/.settings/.api_filters
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.ecf.remoteservice" version="2">
<resource path="src/org/eclipse/ecf/remoteservice/Constants.java" type="org.eclipse.ecf.remoteservice.Constants">
- <filter comment="Added to allow remote services to expose async proxies outside of original package." id="1211105284">
+ <filter id="1211105284">
<message_arguments>
- <message_argument value="SERVICE_ASYNC_PROXY"/>
+ <message_argument value="SERVICE_ASYNC_RSPROXY_CLASS_"/>
</message_arguments>
</filter>
</resource>
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRemoteService.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRemoteService.java
index 997b62ca6..202ce1660 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRemoteService.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRemoteService.java
@@ -198,7 +198,7 @@ public abstract class AbstractRemoteService implements IRemoteService, Invocatio
protected String convertInterfaceNameToAsyncInterfaceName(String interfaceName) {
if (interfaceName == null)
return null;
- String asyncProxyName = (String) getRemoteServiceReference().getProperty(Constants.SERVICE_ASYNC_PROXY + interfaceName);
+ String asyncProxyName = (String) getRemoteServiceReference().getProperty(Constants.SERVICE_ASYNC_RSPROXY_CLASS_ + interfaceName);
if (asyncProxyName != null)
return asyncProxyName;
// If a value has been specified by the ServiceProperty
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/Constants.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/Constants.java
index 0f4f576d3..2ac0a3dd0 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/Constants.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/Constants.java
@@ -111,7 +111,54 @@ public interface Constants {
*/
public static final String SERVICE_PREVENT_RSPROXY = "ecf.rsvc.norsproxy"; //$NON-NLS-1$
- public static final String SERVICE_ASYNC_PROXY = "ecf.rsvc.async.proxy_"; //$NON-NLS-1$
+ /**
+ * This constant allows the fully qualified async remote service proxy to be specified
+ * as a service property. For example, if the remote service interface is as so:
+ * <pre>
+ * package foo;
+ *
+ * public interface Bar {
+ * String doStuff();
+ * }
+ * </pre>
+ * then by default, the async remote service proxy interface class would be expected
+ * to be the following:
+ * <pre>
+ * package foo;
+ * import org.eclipse.ecf.remoteservice.IAsyncRemoteServiceProxy;
+ * import org.eclipse.equinox.concurrent.future.IFuture;
+ *
+ * public interface BarAsync extends IAsyncRemoteServiceProxy {
+ * IFuture doStuffAsync();
+ * }
+ * </pre>
+ * This property allows a new class to be associated with the
+ * original service interface, so that rather than looking for the foo.BarAsync class
+ * when a proxy is created, the class specified by the value of the property will
+ * be used instead. For example, assume the existance of another async
+ * remote service interface:
+ * <pre>
+ * package gogo;
+ * import org.eclipse.ecf.remoteservice.IAsyncRemoteServiceProxy;
+ * import org.eclipse.equinox.concurrent.future.IFuture;
+ *
+ * public interface MyBar extends IAsyncRemoteServiceProxy {
+ * IFuture doStuffAsync();
+ * }
+ * </pre>
+ * Further assume that when the remote service was registered, that a service property
+ * was specified:
+ * <pre>
+ * serviceProps.put("ecf.rsvc.async.proxy_&lt;fq classname&gt;","&lt;fq substitute&gt;");
+ * </pre>
+ * <pre>
+ * serviceProps.put("ecf.rsvc.async.proxy_foo.Bar","gogo.MyBar");
+ * </pre>
+ * Then, when a Bar proxy is created, if the 'gogo.MyBar' interface is available on
+ * the client, an async remote service proxy will be added to the proxy, and
+ * client will be able to asynchronously call MyBar.doStuffAsync() on the proxy.
+ */
+ public static final String SERVICE_ASYNC_RSPROXY_CLASS_ = "ecf.rsvc.async.proxy_"; //$NON-NLS-1$
/**
* @deprecated

Back to the top