Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2014-04-02 03:54:30 +0000
committerslewis2014-04-02 03:54:30 +0000
commite348f13d49783d8e22f532bf832b386c1657a773 (patch)
tree9739f193f4eeeb17d76f2675aa6808dc2202052a /providers
parent2c98d47dcc9360aa251bcf91f7e3630bedfadc23 (diff)
downloadorg.eclipse.ecf-e348f13d49783d8e22f532bf832b386c1657a773.tar.gz
org.eclipse.ecf-e348f13d49783d8e22f532bf832b386c1657a773.tar.xz
org.eclipse.ecf-e348f13d49783d8e22f532bf832b386c1657a773.zip
Changes to org.eclipse.ecf.remoteservice.AbstractRemoteService to use
AbstractAsyncProxyRemoteService as superclass...and associated changed (to import org.eclipse.ecf.remoteservice.asyncproxy package). Also added org.eclipse.ecf.remoteservice.asyncproxy bundle to org.eclipse.ecf.remoteservice.feature. Change-Id: Ib91036a8ea255716c7225a48d91d69a6774778ad
Diffstat (limited to 'providers')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.r_osgi/META-INF/MANIFEST.MF1
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8RemoteServiceContainerAdapterFactory.java35
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.remoteservice/META-INF/MANIFEST.MF1
3 files changed, 4 insertions, 33 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.r_osgi/META-INF/MANIFEST.MF b/providers/bundles/org.eclipse.ecf.provider.r_osgi/META-INF/MANIFEST.MF
index b0a7c8973..322738f0d 100644
--- a/providers/bundles/org.eclipse.ecf.provider.r_osgi/META-INF/MANIFEST.MF
+++ b/providers/bundles/org.eclipse.ecf.provider.r_osgi/META-INF/MANIFEST.MF
@@ -4,6 +4,7 @@ Bundle-Name: %plugin.name
Bundle-SymbolicName: org.eclipse.ecf.provider.r_osgi;singleton:=true
Bundle-Version: 3.4.0.qualifier
Import-Package: org.eclipse.ecf.core.util.reflection,
+ org.eclipse.ecf.remoteservice.asyncproxy;version="1.0.0",
org.eclipse.equinox.concurrent.future;version="1.0.0",
org.osgi.framework;version="1.3.0",
org.osgi.util.tracker;version="1.3.3"
diff --git a/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8RemoteServiceContainerAdapterFactory.java b/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8RemoteServiceContainerAdapterFactory.java
index 9a91c810d..c591adee3 100644
--- a/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8RemoteServiceContainerAdapterFactory.java
+++ b/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8RemoteServiceContainerAdapterFactory.java
@@ -8,49 +8,18 @@
******************************************************************************/
package org.eclipse.ecf.provider.internal.remoteservice.java8;
-import java.util.concurrent.CompletableFuture;
-
import org.eclipse.ecf.core.identity.ID;
-import org.eclipse.ecf.core.sharedobject.*;
+import org.eclipse.ecf.core.sharedobject.ISharedObject;
+import org.eclipse.ecf.core.sharedobject.ISharedObjectContainer;
import org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject;
import org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceContainerAdapterFactory;
-import org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceImpl;
-import org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceRegistrationImpl;
-import org.eclipse.ecf.remoteservice.IRemoteCall;
import org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter;
-import org.eclipse.ecf.remoteservice.events.IRemoteCallCompleteEvent;
-import org.eclipse.ecf.remoteservice.events.IRemoteCallEvent;
public class J8RemoteServiceContainerAdapterFactory extends RemoteServiceContainerAdapterFactory {
protected ISharedObject createAdapter(ISharedObjectContainer container, @SuppressWarnings("rawtypes") Class adapterType, ID adapterID) {
if (adapterType.equals(IRemoteServiceContainerAdapter.class)) {
return new RegistrySharedObject() {
- @Override
- protected RemoteServiceImpl createRemoteService(
- RemoteServiceRegistrationImpl registration) {
- return new RemoteServiceImpl(this,registration) {
- @SuppressWarnings("unchecked")
- @Override
- protected Object callFuture(IRemoteCall call, @SuppressWarnings("rawtypes") Class returnType) {
- if (CompletableFuture.class.isAssignableFrom(returnType)) {
- @SuppressWarnings("rawtypes")
- CompletableFuture result = new CompletableFuture();
- callAsyncWithResult(call, (IRemoteCallEvent e) -> {
- if (e instanceof IRemoteCallCompleteEvent) {
- IRemoteCallCompleteEvent cce = (IRemoteCallCompleteEvent) e;
- if (cce.hadException())
- result.completeExceptionally(cce.getException());
- else
- result.complete(cce.getResponse());
- }
- });
- return result;
- }
- return super.callFuture(call, returnType);
- }
- };
- }
};
}
return null;
diff --git a/providers/bundles/org.eclipse.ecf.provider.remoteservice/META-INF/MANIFEST.MF b/providers/bundles/org.eclipse.ecf.provider.remoteservice/META-INF/MANIFEST.MF
index 3cc6ac131..ddeeacb5e 100644
--- a/providers/bundles/org.eclipse.ecf.provider.remoteservice/META-INF/MANIFEST.MF
+++ b/providers/bundles/org.eclipse.ecf.provider.remoteservice/META-INF/MANIFEST.MF
@@ -18,6 +18,7 @@ Require-Bundle: org.eclipse.equinox.common,
org.eclipse.ecf.provider,
org.eclipse.ecf.remoteservice;bundle-version="6.0.0"
Import-Package: org.eclipse.core.runtime.jobs,
+ org.eclipse.ecf.remoteservice.asyncproxy;version="1.0.0",
org.eclipse.equinox.concurrent.future,
org.eclipse.osgi.framework.eventmgr,
org.osgi.framework,

Back to the top