Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteServiceContainer.java8
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceContainer.java9
2 files changed, 17 insertions, 0 deletions
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteServiceContainer.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteServiceContainer.java
index 50b91f703..bda21f0a1 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteServiceContainer.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/IRemoteServiceContainer.java
@@ -55,4 +55,12 @@ public interface IRemoteServiceContainer {
* @exception ContainerConnectException thrown if underlying container cannot connect to get remote service.
*/
public IRemoteService getRemoteService(String targetLocation, String serviceInterfaceClass) throws ContainerConnectException;
+
+ /**
+ * Get the remote service for given serviceInterface class.
+ * @param serviceInterfaceClass the service to find. Must not be <code>null</code>.
+ * @return IRemoteService the remote service. May be <code>null</code> if the desired remote service is not available.
+ */
+ public IRemoteService getRemoteService(String serviceInterfaceClass);
+
}
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceContainer.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceContainer.java
index 30bc3e839..dda935526 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceContainer.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/RemoteServiceContainer.java
@@ -106,4 +106,13 @@ public class RemoteServiceContainer implements IRemoteServiceContainer {
}
}
+ public IRemoteService getRemoteService(String serviceInterfaceClass) {
+ try {
+ return getRemoteService(null, serviceInterfaceClass);
+ } catch (ContainerConnectException e) {
+ // if targetLocation is null, cannot happen
+ return null;
+ }
+ }
+
}

Back to the top