org.eclipse.ecf.remoteservice
Class RemoteServiceContainer

java.lang.Object
  extended by org.eclipse.ecf.remoteservice.RemoteServiceContainer
All Implemented Interfaces:
IRemoteServiceContainer

public class RemoteServiceContainer
extends java.lang.Object
implements IRemoteServiceContainer

Since:
3.0

Constructor Summary
RemoteServiceContainer(IContainer container)
           
RemoteServiceContainer(IContainer container, IRemoteServiceContainerAdapter containerAdapter)
           
 
Method Summary
 IContainer getContainer()
          Get the container instance for this remote service container.
 IRemoteServiceContainerAdapter getContainerAdapter()
          Get the container adapter for this remote service container.
 IRemoteService getRemoteService(java.lang.String serviceInterfaceClass)
          Get the remote service for given serviceInterface class.
 IRemoteService getRemoteService(java.lang.String targetLocation, java.lang.String serviceInterfaceClass)
          Get the remote service for given targetLocation and given serviceInterface class.
 IRemoteService getRemoteService(java.lang.String targetLocation, java.lang.String serviceInterfaceClass, java.lang.String filter)
          Get the remote service for given targetLocation and given serviceInterface class.
protected  IRemoteServiceReference getServiceReference(ID targetId, java.lang.String serviceInterfaceClass, java.lang.String filter)
           
protected  IRemoteServiceReference selectReference(IRemoteServiceReference[] references)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteServiceContainer

public RemoteServiceContainer(IContainer container,
                              IRemoteServiceContainerAdapter containerAdapter)

RemoteServiceContainer

public RemoteServiceContainer(IContainer 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 return null.

Specified by:
getContainer in interface IRemoteServiceContainer
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 return null

Specified by:
getContainerAdapter in interface IRemoteServiceContainer
Returns:
IRemoteServiceContainerAdapter that is the adapter for the container returned from IRemoteServiceContainer.getContainer().

getRemoteService

public IRemoteService getRemoteService(java.lang.String targetLocation,
                                       java.lang.String serviceInterfaceClass,
                                       java.lang.String filter)
                                throws ContainerConnectException,
                                       org.osgi.framework.InvalidSyntaxException
Description copied from interface: IRemoteServiceContainer
Get the remote service for given targetLocation and given serviceInterface class.

Specified by:
getRemoteService in interface IRemoteServiceContainer
Parameters:
targetLocation - the targetLocation to connect to. See IRemoteServiceContainerAdapter.getRemoteServiceReferences(org.eclipse.ecf.core.identity.ID, String, String). May be null.
serviceInterfaceClass - the service to find. Must not be null.
filter - the IRemoteFilter 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.
org.osgi.framework.InvalidSyntaxException - thrown if the filter does not have correct syntax.

getServiceReference

protected IRemoteServiceReference getServiceReference(ID targetId,
                                                      java.lang.String serviceInterfaceClass,
                                                      java.lang.String filter)
                                               throws ContainerConnectException,
                                                      org.osgi.framework.InvalidSyntaxException
Throws:
ContainerConnectException
org.osgi.framework.InvalidSyntaxException

selectReference

protected IRemoteServiceReference selectReference(IRemoteServiceReference[] references)

getRemoteService

public IRemoteService getRemoteService(java.lang.String targetLocation,
                                       java.lang.String serviceInterfaceClass)
                                throws ContainerConnectException
Description copied from interface: IRemoteServiceContainer
Get the remote service for given targetLocation and given serviceInterface class.

Specified by:
getRemoteService in interface IRemoteServiceContainer
Parameters:
targetLocation - the targetLocation to connect to. See IRemoteServiceContainerAdapter.getRemoteServiceReferences(org.eclipse.ecf.core.identity.ID, String, String). May be null.
serviceInterfaceClass - the service to find. Must not be null.
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(java.lang.String serviceInterfaceClass)
Description copied from interface: IRemoteServiceContainer
Get the remote service for given serviceInterface class.

Specified by:
getRemoteService in interface IRemoteServiceContainer
Parameters:
serviceInterfaceClass - the service to find. Must not be null.
Returns:
IRemoteService the remote service. May be null if the desired remote service is not available.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object