Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2009-03-22 11:45:29 -0400
committerslewis2009-03-22 11:45:29 -0400
commit63784b5badfb180ebc2c62f29ec93f647ac99be3 (patch)
tree22ac238998b8a4d32b2b232fb8137f7b73839e6f /providers
parent04d837f522162afa6fa6fa4601b0eded4bb897a6 (diff)
downloadorg.eclipse.ecf-63784b5badfb180ebc2c62f29ec93f647ac99be3.tar.gz
org.eclipse.ecf-63784b5badfb180ebc2c62f29ec93f647ac99be3.tar.xz
org.eclipse.ecf-63784b5badfb180ebc2c62f29ec93f647ac99be3.zip
Added getRemoteServiceReferences(ID,String,String) to IRemoteServiceContainerAdapter as well as implementations and modified tests
Diffstat (limited to 'providers')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RegistrySharedObject.java24
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RemoteServiceContainer.java15
2 files changed, 39 insertions, 0 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RegistrySharedObject.java b/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RegistrySharedObject.java
index 2c2019e46..72b3f0e7a 100644
--- a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RegistrySharedObject.java
+++ b/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RegistrySharedObject.java
@@ -14,6 +14,7 @@ import java.security.*;
import java.util.*;
import org.eclipse.core.runtime.*;
import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.ecf.core.ContainerConnectException;
import org.eclipse.ecf.core.events.IContainerConnectedEvent;
import org.eclipse.ecf.core.events.IContainerDisconnectedEvent;
import org.eclipse.ecf.core.identity.*;
@@ -129,6 +130,16 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer
return addRegistrationRequestTimeout;
}
+ /**
+ * @since 3.0
+ */
+ public IRemoteServiceReference[] getRemoteServiceReferences(ID targetID, String clazz, String filter) throws InvalidSyntaxException, ContainerConnectException {
+ if (!isConnected()) {
+ getContext().connect(targetID, connectContext);
+ }
+ return getRemoteServiceReferences(new ID[] {targetID}, clazz, filter);
+ }
+
/* (non-Javadoc)
* @see org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter#getRemoteServiceReferences(org.eclipse.ecf.core.identity.ID[], java.lang.String, java.lang.String)
*/
@@ -1087,6 +1098,18 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer
/**
* @since 3.0
*/
+ public IFuture asyncGetRemoteServiceReferences(final ID target, final String clazz, final String filter) {
+ IExecutor executor = new JobsExecutor("asyncGetRemoteServiceReferences"); //$NON-NLS-1$
+ return executor.execute(new IProgressRunnable() {
+ public Object run(IProgressMonitor monitor) throws Exception {
+ return getRemoteServiceReferences(target, clazz, filter);
+ }
+ }, null);
+ }
+
+ /**
+ * @since 3.0
+ */
public Namespace getRemoteServiceNamespace() {
return IDFactory.getDefault().getNamespaceByName(RemoteServiceNamespace.NAME);
}
@@ -1153,4 +1176,5 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer
public void setConnectContextForAuthentication(IConnectContext connectContext) {
this.connectContext = connectContext;
}
+
}
diff --git a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RemoteServiceContainer.java b/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RemoteServiceContainer.java
index 16d004974..d2d861ef7 100644
--- a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RemoteServiceContainer.java
+++ b/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RemoteServiceContainer.java
@@ -9,6 +9,7 @@
package org.eclipse.ecf.provider.remoteservice.generic;
import java.util.Dictionary;
+import org.eclipse.ecf.core.ContainerConnectException;
import org.eclipse.ecf.core.identity.ID;
import org.eclipse.ecf.core.identity.Namespace;
import org.eclipse.ecf.core.security.IConnectContext;
@@ -101,4 +102,18 @@ public class RemoteServiceContainer extends TCPClientSOContainer implements IRem
public void setConnectContextForAuthentication(IConnectContext connectContext) {
registry.setConnectContextForAuthentication(connectContext);
}
+
+ /**
+ * @since 3.0
+ */
+ public IRemoteServiceReference[] getRemoteServiceReferences(ID target, String clazz, String filter) throws InvalidSyntaxException, ContainerConnectException {
+ return registry.getRemoteServiceReferences(target, clazz, filter);
+ }
+
+ /**
+ * @since 3.0
+ */
+ public IFuture asyncGetRemoteServiceReferences(ID target, String clazz, String filter) {
+ return registry.asyncGetRemoteServiceReferences(target, clazz, filter);
+ }
}

Back to the top