Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2009-03-22 11:45:34 -0400
committerslewis2009-03-22 11:45:34 -0400
commitf8c2c28bd3bee840ab3a33ac8a9b2315000ab87d (patch)
treebfc4cba9a4f973d217f312ec11299f20a05ea74e /providers
parent2b5af1b488aaad40a5f4431f08db8ea122e28902 (diff)
downloadorg.eclipse.ecf-f8c2c28bd3bee840ab3a33ac8a9b2315000ab87d.tar.gz
org.eclipse.ecf-f8c2c28bd3bee840ab3a33ac8a9b2315000ab87d.tar.xz
org.eclipse.ecf-f8c2c28bd3bee840ab3a33ac8a9b2315000ab87d.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.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiRemoteServiceContainer.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiRemoteServiceContainer.java b/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiRemoteServiceContainer.java
index 5ce91ca0a..31d20a777 100644
--- a/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiRemoteServiceContainer.java
+++ b/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiRemoteServiceContainer.java
@@ -228,6 +228,17 @@ final class R_OSGiRemoteServiceContainer implements IRemoteServiceContainerAdapt
}
}
+ public IRemoteServiceReference[] getRemoteServiceReferences(ID targetID, String clazz, String filter) throws InvalidSyntaxException, ContainerConnectException {
+ Assert.isNotNull(clazz);
+ IRemoteFilter remoteFilter = (filter == null) ? null : createRemoteFilter(filter);
+ synchronized (this) {
+ List results = new ArrayList();
+ connect(targetID, connectContext);
+ results = getRemoteServiceReferencesConnected(clazz, remoteFilter);
+ return (IRemoteServiceReference[]) results.toArray(new IRemoteServiceReference[] {});
+ }
+ }
+
private List /*IRemoteServiceReference*/connectAndGetRemoteServiceReferencesForTarget(ID currentlyConnectedID, ID targetID, String clazz, IRemoteFilter remoteFilter) {
List results = new ArrayList();
if (currentlyConnectedID != null) {
@@ -643,6 +654,15 @@ final class R_OSGiRemoteServiceContainer implements IRemoteServiceContainerAdapt
}, null);
}
+ public IFuture asyncGetRemoteServiceReferences(final ID target, final String clazz, final String filter) {
+ IExecutor executor = new ThreadsExecutor();
+ return executor.execute(new IProgressRunnable() {
+ public Object run(IProgressMonitor monitor) throws Exception {
+ return getRemoteServiceReferences(target, clazz, filter);
+ }
+ }, null);
+ }
+
public Namespace getRemoteServiceNamespace() {
return IDFactory.getDefault().getNamespaceByName(R_OSGiRemoteServiceNamespace.NAME);
}
@@ -683,4 +703,5 @@ final class R_OSGiRemoteServiceContainer implements IRemoteServiceContainerAdapt
public void setConnectContextForAuthentication(IConnectContext connectContext) {
this.connectContext = connectContext;
}
+
}

Back to the top