org.eclipse.ecf.remoteservice.rest
Class RestContainer

java.lang.Object
  extended by org.eclipse.ecf.core.AbstractContainer
      extended by org.eclipse.ecf.remoteservice.rest.RestContainer
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, IContainer, IIdentifiable, IRemoteServiceContainer, IRemoteServiceContainerAdapter

public class RestContainer
extends AbstractContainer
implements IRemoteServiceContainerAdapter, IRemoteServiceContainer

A container for REST services. This was implemented using the ECF#RemoteServiceAPI.


Field Summary
static java.lang.String NAME
           
 
Constructor Summary
RestContainer()
           
RestContainer(ID id)
           
 
Method Summary
 void addRemoteServiceListener(IRemoteServiceListener listener)
          Add listener for remote service registration/unregistration for this container
 org.eclipse.equinox.concurrent.future.IFuture asyncGetRemoteServiceReferences(ID[] idFilter, java.lang.String clazz, java.lang.String filter)
          Asynchronously returns an array of IRemoteServiceReference objects.
 org.eclipse.equinox.concurrent.future.IFuture asyncGetRemoteServiceReferences(ID target, java.lang.String clazz, java.lang.String filter)
          Asynchronously returns an array of IRemoteServiceReference objects.
 void connect(ID targetID, IConnectContext connectContext)
          Connect to a target remote process or process group.
 IRemoteFilter createRemoteFilter(java.lang.String filter)
          Creates a IRemoteFilter object.
 void disconnect()
          Disconnect.
 void dispose()
          Dispose this IContainer instance.
 IRemoteServiceReference[] getAllRemoteServiceReferences(java.lang.String clazz, java.lang.String filter)
           Returns an array of IRemoteServiceReference objects.
 ID getConnectedID()
          Get the target ID that this container instance has connected to.
 Namespace getConnectNamespace()
          Get the Namespace for creating a targetID suitable for use as the first parameter in subsequent calls to IContainer.connect(ID, IConnectContext).
 IContainer getContainer()
          Get the container instance for this remote service container.
 IRemoteServiceContainerAdapter getContainerAdapter()
          Get the container adapter for this remote service container.
 ID getID()
          Return the ID for this 'identifiable' object.
 IRemoteService getRemoteService(IRemoteServiceReference reference)
          Get remote service for given IRemoteServiceReference.
 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.
 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.
 IRemoteServiceReference getRemoteServiceReference(IRemoteServiceID serviceID)
          Get the remote service reference known to this container for the given IRemoteServiceID.
 IRemoteServiceReference[] getRemoteServiceReferences(ID[] idFilter, java.lang.String clazz, java.lang.String filter)
          Returns an array of IRemoteServiceReference objects.
 IRemoteServiceReference[] getRemoteServiceReferences(ID target, java.lang.String clazz, java.lang.String filter)
           Returns an array of IRemoteServiceReference objects.
 IRestCall lookupRestCall(IRemoteCall call)
           
 IRemoteServiceRegistration registerRemoteService(java.lang.String[] clazzes, java.lang.Object service, java.util.Dictionary properties)
          Register a new remote service.
 RestServiceRegistration registerRestService(java.lang.String[] clazzes, java.lang.Object service, java.util.Map restCalls, java.util.Dictionary properties)
          Registers a POJO object as a REST service.
 void removeRemoteServiceListener(IRemoteServiceListener listener)
          Remove remote service registration/unregistration listener for this container.
 void setConnectContextForAuthentication(IConnectContext connectContext)
          Set connect context for authentication upon subsequent calls to IRemoteServiceContainerAdapter.getRemoteServiceReferences(ID[], String, String) or IRemoteServiceContainerAdapter.asyncGetRemoteServiceReferences(ID[], String, String).
 boolean ungetRemoteService(IRemoteServiceReference reference)
          Unget IRemoteServiceReference.
 
Methods inherited from class org.eclipse.ecf.core.AbstractContainer
addListener, fireContainerEvent, getAdapter, getPasswordFromConnectContext, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values
Constructor Detail

RestContainer

public RestContainer(ID id)

RestContainer

public RestContainer()
Method Detail

connect

public void connect(ID targetID,
                    IConnectContext connectContext)
             throws ContainerConnectException
Description copied from interface: IContainer
Connect to a target remote process or process group. The target identified by the first parameter (targetID) is connected the implementation class. If authentication information is required, the required information is given via via the second parameter (connectContext). Callers note that depending upon the provider implementation this method may block. It is suggested that callers use a separate thread to call this method. This method provides an implementation independent way for container implementations to connect, authenticate, and communicate with a remote service or group of services. Providers are responsible for implementing this operation in a way appropriate to the given remote service (or group) via expected protocol.

Specified by:
connect in interface IContainer
Parameters:
targetID - the ID of the remote server or group to connect to. See IContainer.getConnectNamespace() for a explanation of the constraints upon this parameter.
connectContext - any required context to allow this container to authenticate. May be null if underlying provider does not have any authentication requirements for connection.
Throws:
ContainerConnectException - thrown if communication cannot be established with remote service. Causes can include network connection failure, authentication failure, server error, or if container is already connected.

disconnect

public void disconnect()
Description copied from interface: IContainer
Disconnect. This operation will disconnect the local container instance from any previously joined target or group. Subsequent calls to getConnectedID() will return null.

Specified by:
disconnect in interface IContainer

dispose

public void dispose()
Description copied from interface: IContainer
Dispose this IContainer instance. The container instance will be made inactive after the completion of this method and will be unavailable for subsequent usage.

Specified by:
dispose in interface IContainer
Overrides:
dispose in class AbstractContainer

getConnectNamespace

public Namespace getConnectNamespace()
Description copied from interface: IContainer
Get the Namespace for creating a targetID suitable for use as the first parameter in subsequent calls to IContainer.connect(ID, IConnectContext). If this method returns null, then it means that null is expected as a valid parameter in subsequent calls to IContainer.connect(ID, IConnectContext). If this method returns a non-null Namespace, then the targetID parameter in IContainer.connect(ID, IConnectContext) must be non-null instance created of the returned Namespace.

Specified by:
getConnectNamespace in interface IContainer
Returns:
Namespace the namespace associated with subsequent calls to IContainer.connect(ID, IConnectContext). If null, then the targetID instances passed to IContainer.connect(ID, IConnectContext) may be null. If not null, then targetID instances passed to IContainer.connect(ID, IConnectContext) must be instances of the returned Namespace.

getConnectedID

public ID getConnectedID()
Description copied from interface: IContainer
Get the target ID that this container instance has connected to. Returns null if not connected.

Specified by:
getConnectedID in interface IContainer
Returns:
ID of the target we are connected to. Returns null if container not connected.

getID

public ID getID()
Description copied from interface: IIdentifiable
Return the ID for this 'identifiable' object. The returned ID should be unique within its namespace. May return null.

Specified by:
getID in interface IIdentifiable
Returns:
the ID for this identifiable object. May return null.

addRemoteServiceListener

public void addRemoteServiceListener(IRemoteServiceListener listener)
Description copied from interface: IRemoteServiceContainerAdapter
Add listener for remote service registration/unregistration for this container

Specified by:
addRemoteServiceListener in interface IRemoteServiceContainerAdapter
Parameters:
listener - notified of service registration/unregistration events. Must not be null .

asyncGetRemoteServiceReferences

public org.eclipse.equinox.concurrent.future.IFuture asyncGetRemoteServiceReferences(ID[] idFilter,
                                                                                     java.lang.String clazz,
                                                                                     java.lang.String filter)
Description copied from interface: IRemoteServiceContainerAdapter
Asynchronously returns an array of IRemoteServiceReference objects. The returned array of IRemoteServiceReference objects contains services that were registered under the specified class and match the specified idFilter, and filter criteria.

Note this method assumes that the enclosing container has previously been connected, and uses the idFilter to filter among targets within the previously connected set of container IDs. To request connection as part of reference lookup, see IRemoteServiceContainerAdapter.getRemoteServiceReferences(ID, String, String).

The IFuture is returned immediately, and subsequent calls to IFuture.get() or IFuture.get(long) will return the actual results received. The type of the Object returned from IFuture.get() will be IRemoteServiceReference [].

The list is valid at the time of the call to this method, however since the Framework is a very dynamic environment, services can be modified or unregistered at anytime.

idFilter is used to select a registered services that were registered by a given set of containers with id in idFilter. Only services exposed by a container with id in idFilter will be returned.

If idFilter is null, all containers are considered to match the filter.

filter is used to select the registered service whose properties objects contain keys and values which satisfy the filter. See Filter for a description of the filter string syntax.

Specified by:
asyncGetRemoteServiceReferences in interface IRemoteServiceContainerAdapter
Parameters:
idFilter - an array of ID instances that will restrict the search for matching container ids If null, all remote containers will be considered in search for matching IRemoteServiceReference instances. May be null.
clazz - the fully qualified name of the interface class that describes the desired service. Must not be null.
filter - The filter criteria. May be null.
Returns:
IFuture that through subsequent calls to IFuture#get() will return IRemoteServiceReference [] with IRemoteServiceReferences matching given search criteria. Will not return null.

asyncGetRemoteServiceReferences

public org.eclipse.equinox.concurrent.future.IFuture asyncGetRemoteServiceReferences(ID target,
                                                                                     java.lang.String clazz,
                                                                                     java.lang.String filter)
Description copied from interface: IRemoteServiceContainerAdapter
Asynchronously returns an array of IRemoteServiceReference objects. The returned array of IRemoteServiceReference objects contains services that were registered under the specified class and match the specified idFilter, and filter criteria.

The IFuture is returned immediately, and subsequent calls to IFuture.get() or IFuture.get(long) will return the actual results received. The type of the Object returned from IFuture.get() will be IRemoteServiceReference [].

The list is valid at the time of the call to this method, however since the Framework is a very dynamic environment, services can be modified or unregistered at anytime.

idFilter is used to select a registered services that were registered by a given set of containers with id in idFilter. Only services exposed by a container with id in idFilter will be returned.

target is a remote container to connect to.

filter is used to select the registered service whose properties objects contain keys and values which satisfy the filter. See Filter for a description of the filter string syntax.

Specified by:
asyncGetRemoteServiceReferences in interface IRemoteServiceContainerAdapter
Parameters:
target - an target to connect to if enclosing container is not already connected. May be null.
clazz - the fully qualified name of the interface class that describes the desired service. Must not be null.
filter - The filter criteria. May be null.
Returns:
IFuture that through subsequent calls to IFuture#get() will return IRemoteServiceReference [] with IRemoteServiceReferences matching given search criteria. Will not return null.

createRemoteFilter

public IRemoteFilter createRemoteFilter(java.lang.String filter)
                                 throws org.osgi.framework.InvalidSyntaxException
Description copied from interface: IRemoteServiceContainerAdapter
Creates a IRemoteFilter object. This IRemoteFilter object may be used to match a IRemoteServiceReference object or a Dictionary object.

If the filter cannot be parsed, an InvalidSyntaxException will be thrown with a human readable message where the filter became unparsable.

Specified by:
createRemoteFilter in interface IRemoteServiceContainerAdapter
Parameters:
filter - The filter string.
Returns:
A IRemoteFilter object encapsulating the filter string.
Throws:
org.osgi.framework.InvalidSyntaxException - If filter contains an invalid filter string that cannot be parsed.
See Also:
"Framework specification for a description of the filter string syntax.", FrameworkUtil.createFilter(String)

getAllRemoteServiceReferences

public IRemoteServiceReference[] getAllRemoteServiceReferences(java.lang.String clazz,
                                                               java.lang.String filter)
                                                        throws org.osgi.framework.InvalidSyntaxException
Description copied from interface: IRemoteServiceContainerAdapter

Returns an array of IRemoteServiceReference objects. The returned array of IRemoteServiceReference objects contains services that were registered under the specified class, or if the clazz parameter is null all services registered.

The list is valid at the time of the call to this method, however since the remote service container is a very dynamic environment, services can be modified or unregistered at anytime.

filter is used to select the registered service whose properties objects contain keys and values which satisfy the filter. See Filter for a description of the filter string syntax.

If filter is null, all registered services are considered to match the filter. If filter cannot be parsed, an InvalidSyntaxException will be thrown with a human readable message where the filter became unparsable.

Specified by:
getAllRemoteServiceReferences in interface IRemoteServiceContainerAdapter
Parameters:
clazz - the fully qualified name of the interface class that describes the desired service. May be null.
filter - The filter criteria. May be null.
Returns:
Array of IRemoteServiceReferences matching given search criteria or null if no services are found that match the search.
Throws:
org.osgi.framework.InvalidSyntaxException - If filter contains an invalid filter string that cannot be parsed.

getRemoteService

public IRemoteService getRemoteService(IRemoteServiceReference reference)
Description copied from interface: IRemoteServiceContainerAdapter
Get remote service for given IRemoteServiceReference. Note that clients that call this method successfully should later call IRemoteServiceContainerAdapter.ungetRemoteService(IRemoteServiceReference) when the IRemoteService will no longer be used.

Specified by:
getRemoteService in interface IRemoteServiceContainerAdapter
Parameters:
reference - the IRemoteServiceReference for the desired service. Must not be null .
Returns:
IRemoteService representing the remote service. If remote service no longer exists for reference, then null is returned.
See Also:
IRemoteServiceContainerAdapter.ungetRemoteService(IRemoteServiceReference)

getRemoteServiceID

public IRemoteServiceID getRemoteServiceID(ID containerID,
                                           long containerRelativeID)
Description copied from interface: IRemoteServiceContainerAdapter
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.

Specified by:
getRemoteServiceID in interface IRemoteServiceContainerAdapter
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.

getRemoteServiceNamespace

public Namespace getRemoteServiceNamespace()
Description copied from interface: IRemoteServiceContainerAdapter
Get namespace to use for this remote service provider.

Specified by:
getRemoteServiceNamespace in interface IRemoteServiceContainerAdapter
Returns:
Namespace to use for creating IRemoteServiceID for this remote service provider. Will not return null.

getRemoteServiceReference

public IRemoteServiceReference getRemoteServiceReference(IRemoteServiceID serviceID)
Description copied from interface: IRemoteServiceContainerAdapter
Get the remote service reference known to this container for the given IRemoteServiceID. Note that this method must be guaranteed not to block by the provider implementation.

Specified by:
getRemoteServiceReference in interface IRemoteServiceContainerAdapter
Parameters:
serviceID - the serviceID to retrieve the IRemoteServiceReference for.
Returns:
IRemoteServiceReference the remote service reference associated with the given serviceID. Will return null if no IRemoteServiceReference found for the given serviceID.

getRemoteServiceReferences

public IRemoteServiceReference[] getRemoteServiceReferences(ID[] idFilter,
                                                            java.lang.String clazz,
                                                            java.lang.String filter)
                                                     throws org.osgi.framework.InvalidSyntaxException
Description copied from interface: IRemoteServiceContainerAdapter
Returns an array of IRemoteServiceReference objects. The returned array of IRemoteServiceReference objects contains services that were registered under the specified class and match the specified idFilter, and filter criteria.

Note this method assumes that the enclosing container has previously been connected, and uses the idFilter to filter among targets within the previously connected set of container IDs. To request connection as part of reference lookup, see IRemoteServiceContainerAdapter.getRemoteServiceReferences(ID, String, String).

The list is valid at the time of the call to this method, however since the Framework is a very dynamic environment, services can be modified or unregistered at anytime.

idFilter is used to select a registered services that were registered by a given set of containers with id in idFilter. Only services exposed by a container with id in idFilter will be returned.

If idFilter is null, all containers are considered to match the filter.

filter is used to select the registered service whose properties objects contain keys and values which satisfy the filter. See Filter for a description of the filter string syntax.

If filter is null, all registered services are considered to match the filter. If filter cannot be parsed, an InvalidSyntaxException will be thrown with a human readable message where the filter became unparsable.

Specified by:
getRemoteServiceReferences in interface IRemoteServiceContainerAdapter
Parameters:
idFilter - an array of ID instances that will restrict the search for matching container ids If null, all remote containers will be considered in search for matching IRemoteServiceReference instances. May be null.
clazz - the fully qualified name of the interface class that describes the desired service. Must not be null.
filter - The filter criteria. May be null.
Returns:
Array of IRemoteServiceReferences matching given search criteria or null if no services are found that match the search.
Throws:
org.osgi.framework.InvalidSyntaxException - If filter contains an invalid filter string that cannot be parsed.

getRemoteServiceReferences

public IRemoteServiceReference[] getRemoteServiceReferences(ID target,
                                                            java.lang.String clazz,
                                                            java.lang.String filter)
                                                     throws org.osgi.framework.InvalidSyntaxException,
                                                            ContainerConnectException
Description copied from interface: IRemoteServiceContainerAdapter

Returns an array of IRemoteServiceReference objects. The returned array of IRemoteServiceReference objects contains services that were registered under the specified class and match the specified idFilter, and filter criteria.

The list is valid at the time of the call to this method, however since the Framework is a very dynamic environment, services can be modified or unregistered at anytime.

target is a remote container to connect to.

filter is used to select the registered service whose properties objects contain keys and values which satisfy the filter. See Filter for a description of the filter string syntax.

If filter is null, all registered services are considered to match the filter. If filter cannot be parsed, an InvalidSyntaxException will be thrown with a human readable message where the filter became unparsable.

Specified by:
getRemoteServiceReferences in interface IRemoteServiceContainerAdapter
Parameters:
target - an target to connect to if enclosing container is not already connected. May be null.
clazz - the fully qualified name of the interface class that describes the desired service. Must not be null.
filter - The filter criteria. May be null.
Returns:
Array of IRemoteServiceReferences matching given search criteria or null if no services are found that match the search.
Throws:
org.osgi.framework.InvalidSyntaxException - If filter contains an invalid filter string that cannot be parsed.
ContainerConnectException

registerRemoteService

public IRemoteServiceRegistration registerRemoteService(java.lang.String[] clazzes,
                                                        java.lang.Object service,
                                                        java.util.Dictionary properties)
Description copied from interface: IRemoteServiceContainerAdapter
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.

Specified by:
registerRemoteService in interface IRemoteServiceContainerAdapter
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 itself. This object must implement all of the classes specified by the first parameter
properties - to be associated with service
Returns:
IRemoteServiceRegistration the service registration. Will not return null .

removeRemoteServiceListener

public void removeRemoteServiceListener(IRemoteServiceListener listener)
Description copied from interface: IRemoteServiceContainerAdapter
Remove remote service registration/unregistration listener for this container.

Specified by:
removeRemoteServiceListener in interface IRemoteServiceContainerAdapter
Parameters:
listener - to remove. Must not be null .

setConnectContextForAuthentication

public void setConnectContextForAuthentication(IConnectContext connectContext)
Description copied from interface: IRemoteServiceContainerAdapter
Set connect context for authentication upon subsequent calls to IRemoteServiceContainerAdapter.getRemoteServiceReferences(ID[], String, String) or IRemoteServiceContainerAdapter.asyncGetRemoteServiceReferences(ID[], String, String). This method should be called with a non-null connectContext in order to allow authentication to occur during.

Specified by:
setConnectContextForAuthentication in interface IRemoteServiceContainerAdapter
Parameters:
connectContext - the connect context to use for authenticating. If null, then no authentication will be attempted.

ungetRemoteService

public boolean ungetRemoteService(IRemoteServiceReference reference)
Description copied from interface: IRemoteServiceContainerAdapter
Unget IRemoteServiceReference. Release all resources associated with the given IRemoteServiceReference. This method should be called by users of the IRemoteServiceReference that have previously called IRemoteServiceContainerAdapter.getRemoteService(IRemoteServiceReference). If this method returns true, then the previously used IRemoteService will no longer be usable.

Specified by:
ungetRemoteService in interface IRemoteServiceContainerAdapter
Parameters:
reference - the IRemoteServiceReference to unget
Returns:
true if unget successful, false if not. If this method returns true, then the IRemoteService instance previously retrieved via the given IRemoteServiceReference instance provided will no longer be usable.
See Also:
IRemoteServiceContainerAdapter.getRemoteService(IRemoteServiceReference)

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.

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.

lookupRestCall

public IRestCall lookupRestCall(IRemoteCall call)

registerRestService

public RestServiceRegistration registerRestService(java.lang.String[] clazzes,
                                                   java.lang.Object service,
                                                   java.util.Map restCalls,
                                                   java.util.Dictionary properties)
                                            throws ECFException
Registers a POJO object as a REST service. The service object has to implement IRestResponseProcessor to get notified about an incoming response. This method also registers a IRemoteService object for the rest service. To associate a IRemoteCall to the rest service object the IRemoteCall.getMethod() will be used. Therefore a Map has to passed to this method with a String as key and an IRestCall object as value.

Parameters:
clazzes - a String array woth classnames which the service object has to implement.
service - the service object as a POJO
restCalls - a Map with String as keys and IRestCall objects as value.
properties - to be associated with service.
Returns:
The service registration for the registered IRemoteService. Will not return null.
Throws:
ECFException