Package org.eclipse.ecf.remoteservice
Class RemoteServiceContainer
- java.lang.Object
-
- org.eclipse.ecf.remoteservice.RemoteServiceContainer
-
- All Implemented Interfaces:
IRemoteServiceContainer
public class RemoteServiceContainer extends Object implements IRemoteServiceContainer
- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description RemoteServiceContainer(IContainer container)
RemoteServiceContainer(IContainer container, IRemoteServiceContainerAdapter containerAdapter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IContainer
getContainer()
Get the container instance for this remote service container.IRemoteServiceContainerAdapter
getContainerAdapter()
Get the container adapter for this remote service container.IRemoteService
getRemoteService(String serviceInterfaceClass)
Get the remote service for given serviceInterface class.IRemoteService
getRemoteService(String targetLocation, String serviceInterfaceClass)
Get the remote service for given targetLocation and given serviceInterface class.IRemoteService
getRemoteService(String targetLocation, String serviceInterfaceClass, String filter)
Get the remote service for given targetLocation and given serviceInterface class.protected IRemoteServiceReference
getServiceReference(ID targetId, String serviceInterfaceClass, String filter)
protected IRemoteServiceReference
selectReference(IRemoteServiceReference[] references)
String
toString()
-
-
-
Constructor Detail
-
RemoteServiceContainer
public RemoteServiceContainer(IContainer container, IRemoteServiceContainerAdapter containerAdapter)
-
RemoteServiceContainer
public RemoteServiceContainer(IContainer container)
- Parameters:
container
- container- Since:
- 3.2
-
-
Method Detail
-
getContainer
public IContainer getContainer()
Description copied from interface:IRemoteServiceContainer
Get the container instance for this remote service container. Will not returnnull
.- Specified by:
getContainer
in interfaceIRemoteServiceContainer
- Returns:
- IContainer for this remote service container. Will not return
null
.
-
getContainerAdapter
public IRemoteServiceContainerAdapter getContainerAdapter()
Description copied from interface:IRemoteServiceContainer
Get the container adapter for this remote service container. Will not returnnull
- Specified by:
getContainerAdapter
in interfaceIRemoteServiceContainer
- Returns:
- IRemoteServiceContainerAdapter that is the adapter for the container
returned from
IRemoteServiceContainer.getContainer()
.
-
getRemoteService
public IRemoteService getRemoteService(String targetLocation, String serviceInterfaceClass, String filter) throws ContainerConnectException, InvalidSyntaxException
Description copied from interface:IRemoteServiceContainer
Get the remote service for given targetLocation and given serviceInterface class.- Specified by:
getRemoteService
in interfaceIRemoteServiceContainer
- Parameters:
targetLocation
- the targetLocation to connect to. SeeIRemoteServiceContainerAdapter.getRemoteServiceReferences(org.eclipse.ecf.core.identity.ID, String, String)
. May benull
.serviceInterfaceClass
- the service to find. Must not benull
.filter
- theIRemoteFilter
to use for finding the desired remote service.- Returns:
- IRemoteService the remote service. May be
null
if the desired remote service is not available. - Throws:
ContainerConnectException
- thrown if underlying container cannot connect to get remote service.InvalidSyntaxException
- thrown if the filter does not have correct syntax.
-
getServiceReference
protected IRemoteServiceReference getServiceReference(ID targetId, String serviceInterfaceClass, String filter) throws ContainerConnectException, InvalidSyntaxException
-
selectReference
protected IRemoteServiceReference selectReference(IRemoteServiceReference[] references)
-
getRemoteService
public IRemoteService getRemoteService(String targetLocation, String serviceInterfaceClass) throws ContainerConnectException
Description copied from interface:IRemoteServiceContainer
Get the remote service for given targetLocation and given serviceInterface class.- Specified by:
getRemoteService
in interfaceIRemoteServiceContainer
- Parameters:
targetLocation
- the targetLocation to connect to. SeeIRemoteServiceContainerAdapter.getRemoteServiceReferences(org.eclipse.ecf.core.identity.ID, String, String)
. May benull
.serviceInterfaceClass
- the service to find. Must not benull
.- Returns:
- IRemoteService the remote service. May be
null
if the desired remote service is not available. - Throws:
ContainerConnectException
- thrown if underlying container cannot connect to get remote service.
-
getRemoteService
public IRemoteService getRemoteService(String serviceInterfaceClass)
Description copied from interface:IRemoteServiceContainer
Get the remote service for given serviceInterface class.- Specified by:
getRemoteService
in interfaceIRemoteServiceContainer
- Parameters:
serviceInterfaceClass
- the service to find. Must not benull
.- Returns:
- IRemoteService the remote service. May be
null
if the desired remote service is not available.
-
-