org.eclipse.ecf.remoteservice
Interface IRemoteServiceHost

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable
All Known Subinterfaces:
IOSGiRemoteServiceContainerAdapter, IRemoteServiceClientContainerAdapter, IRemoteServiceContainerAdapter
All Known Implementing Classes:
AbstractClientContainer, AbstractSoapClientContainer, RegistrySharedObject, RemoteServiceContainer, RestClientContainer, RpcClientContainer

public interface IRemoteServiceHost
extends org.eclipse.core.runtime.IAdaptable

Since:
5.0

Method Summary
 void addRemoteServiceListener(IRemoteServiceListener listener)
          Add listener for remote service registration/unregistration for this container
 IRemoteServiceID getRemoteServiceID(ID containerID, long containerRelativeID)
          Get a remote service ID from a containerID and a containerRelative long value.
 Namespace getRemoteServiceNamespace()
          Get namespace to use for this remote service provider.
 IRemoteServiceRegistration registerRemoteService(java.lang.String[] clazzes, java.lang.Object service, java.util.Dictionary properties)
          Register a new remote service.
 void removeRemoteServiceListener(IRemoteServiceListener listener)
          Remove remote service registration/unregistration listener for this container.
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Method Detail

registerRemoteService

IRemoteServiceRegistration registerRemoteService(java.lang.String[] clazzes,
                                                 java.lang.Object service,
                                                 java.util.Dictionary properties)
Register a new remote service. This method is to be called by the service server...i.e. the client that wishes to make available a service to other client within this container.

Parameters:
clazzes - the interface classes that the service exposes to remote clients. Must not be null and must not be an empty array.
service - the service object. Under normal conditions this object must
  • not be null
  • implement all of the classes specified by the first parameter
The only situation when the service object may be null is if the service property Constants.SERVICE_REGISTER_PROXY is set in the properties. If Constants.SERVICE_REGISTER_PROXY is set in the properties parameter (to an arbitrary value), then the service object may then be null.
properties - to be associated with service
Returns:
IRemoteServiceRegistration the service registration. Will not return null .

addRemoteServiceListener

void addRemoteServiceListener(IRemoteServiceListener listener)
Add listener for remote service registration/unregistration for this container

Parameters:
listener - notified of service registration/unregistration events. Must not be null .

removeRemoteServiceListener

void removeRemoteServiceListener(IRemoteServiceListener listener)
Remove remote service registration/unregistration listener for this container.

Parameters:
listener - to remove. Must not be null .

getRemoteServiceNamespace

Namespace getRemoteServiceNamespace()
Get namespace to use for this remote service provider.

Returns:
Namespace to use for creating IRemoteServiceID for this remote service provider. Will not return null.
Since:
3.0

getRemoteServiceID

IRemoteServiceID getRemoteServiceID(ID containerID,
                                    long containerRelativeID)
Get a remote service ID from a containerID and a containerRelative long value. Will return a non-null value if the IRemoteServiceRegistration/Reference is currently 'known' to this container adapter. null if not.

Parameters:
containerID - the containerID that is the server/host for the remote service. Must not be null. This must be the containerID for the server/host of the remote service.
containerRelativeID - the long value identifying the remote service relative to the container ID.
Returns:
IRemoteServiceID instance if the associated IRemoteServiceRegistration/Reference is known to this container adapter, null if it is not.
Since:
3.0