Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2009-04-16 20:09:28 -0400
committerslewis2009-04-16 20:09:28 -0400
commitf21debbddaa11b58e9d6e473b2c7a5e20d66d2f1 (patch)
tree148400a36b50706665e3a05359959b24f656aab5
parentcae2aafcfc36510165e8b082c20d00254e5f0ed6 (diff)
downloadorg.eclipse.ecf-f21debbddaa11b58e9d6e473b2c7a5e20d66d2f1.tar.gz
org.eclipse.ecf-f21debbddaa11b58e9d6e473b2c7a5e20d66d2f1.tar.xz
org.eclipse.ecf-f21debbddaa11b58e9d6e473b2c7a5e20d66d2f1.zip
Added IRemoteServiceContainerAdapter.getAllRemoteServiceReferences
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RegistrySharedObject.java18
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RemoteServiceContainer.java7
2 files changed, 25 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 2a6ce9788..d21587473 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
@@ -133,6 +133,24 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer
/**
* @since 3.0
*/
+ public IRemoteServiceReference[] getAllRemoteServiceReferences(String clazz, String filter) throws InvalidSyntaxException {
+ Trace.entering(Activator.PLUGIN_ID, IRemoteServiceProviderDebugOptions.METHODS_ENTERING, this.getClass(), "getAllRemoteServiceReferences", new Object[] {clazz, filter}); //$NON-NLS-1$
+ final IRemoteFilter remoteFilter = (filter == null) ? null : new RemoteFilterImpl(filter);
+ final List references = new ArrayList();
+ // Add any from local registry
+ synchronized (localRegistry) {
+ addReferencesFromRegistry(clazz, remoteFilter, localRegistry, references);
+ }
+ // Lookup from remote registrys...add to given references List
+ addReferencesFromRemoteRegistrys(null, clazz, remoteFilter, references);
+ final IRemoteServiceReference[] result = (IRemoteServiceReference[]) references.toArray(new IRemoteServiceReference[references.size()]);
+ Trace.exiting(Activator.PLUGIN_ID, IRemoteServiceProviderDebugOptions.METHODS_EXITING, this.getClass(), "getAllRemoteServiceReferences", result); //$NON-NLS-1$
+ return (result.length == 0) ? null : result;
+ }
+
+ /**
+ * @since 3.0
+ */
public IRemoteServiceReference[] getRemoteServiceReferences(ID targetID, String clazz, String filter) throws InvalidSyntaxException, ContainerConnectException {
// If no target specified, just search for all available references
if (targetID == null)
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 d2d861ef7..41c475d09 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
@@ -116,4 +116,11 @@ public class RemoteServiceContainer extends TCPClientSOContainer implements IRem
public IFuture asyncGetRemoteServiceReferences(ID target, String clazz, String filter) {
return registry.asyncGetRemoteServiceReferences(target, clazz, filter);
}
+
+ /**
+ * @since 3.0
+ */
+ public IRemoteServiceReference[] getAllRemoteServiceReferences(String clazz, String filter) throws InvalidSyntaxException {
+ return registry.getAllRemoteServiceReferences(clazz, filter);
+ }
}

Back to the top