diff options
author | slewis | 2009-04-13 19:31:58 +0000 |
---|---|---|
committer | slewis | 2009-04-13 19:31:58 +0000 |
commit | 5ae82b867bbadb15550e890ffd3985aec7eb8b86 (patch) | |
tree | b91bd4f85e78d6d7c4b5121c25701cc616d6e3ee | |
parent | de5856b9c5ccff0a3cb61dfcc396c9e58379a42b (diff) | |
download | org.eclipse.ecf-20090413-2200.tar.gz org.eclipse.ecf-20090413-2200.tar.xz org.eclipse.ecf-20090413-2200.zip |
Added getRemoteService(String intfClassName) to IRemoteServiceContainerv20090413-2200
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; + } + } + } |