org.eclipse.ecf.remoteservice.rest.client
Class RestClientContainer

java.lang.Object
  extended by org.eclipse.ecf.core.AbstractContainer
      extended by org.eclipse.ecf.remoteservice.client.AbstractClientContainer
          extended by org.eclipse.ecf.remoteservice.rest.client.RestClientContainer
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, IContainer, IIdentifiable, IRemoteServiceClientContainerAdapter, IRemoteServiceConsumer, IRemoteServiceContainerAdapter, IRemoteServiceHost

public class RestClientContainer
extends AbstractClientContainer
implements IRemoteServiceClientContainerAdapter

A container for REST services.


Field Summary
 
Fields inherited from class org.eclipse.ecf.remoteservice.client.AbstractClientContainer
alwaysSendDefaultParameters, connectContext, connectedID, connectLock, containerID, parameterSerializer, parameterSerializerLock, registry, remoteResponseDeserializer, remoteResponseDeserializerLock, remoteServiceListeners
 
Constructor Summary
RestClientContainer(RestID id)
           
 
Method Summary
protected  IRemoteService createRemoteService(RemoteServiceClientRegistration registration)
          Create an implementer of IRemoteService for the given registration.
 Namespace getConnectNamespace()
          Get the Namespace for creating a targetID suitable for use as the first parameter in subsequent calls to IContainer.connect(ID, IConnectContext).
 java.lang.String prepareEndpointAddress(IRemoteCall call, IRemoteCallable callable)
          Prepare an endpoint address for the given call and callable.
 
Methods inherited from class org.eclipse.ecf.remoteservice.client.AbstractClientContainer
addRemoteServiceListener, asyncGetRemoteServiceReferences, asyncGetRemoteServiceReferences, asyncGetRemoteServiceReferences, connect, createCallablesFromClasses, createRemoteFilter, createRestServiceRegistration, createRestServiceRegistration, disconnect, dispose, findCallableForName, getAllRemoteServiceReferences, getCallablesForMethods, getClazzesFromStrings, getClazzFromString, getConnectContextForAuthentication, getConnectedID, getID, getParameterSerializer, getParameterSerializer, getRemoteCallTargetID, getRemoteService, getRemoteServiceID, getRemoteServiceNamespace, getRemoteServiceReference, getRemoteServiceReferences, getRemoteServiceReferences, getRemoteServiceReferences, getResponseDeserializer, getResponseDeserializer, logException, prepareParameters, processResponse, registerCallables, registerCallables, registerRemoteCallables, registerRemoteCallables, registerRemoteService, removeRemoteServiceListener, serializeParameter, setAlwaysSendDefaultParameters, setConnectContextForAuthentication, setParameterSerializer, setResponseDeserializer, ungetRemoteService
 
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.ecf.remoteservice.client.IRemoteServiceClientContainerAdapter
registerCallables, registerCallables, setParameterSerializer, setResponseDeserializer
 
Methods inherited from interface org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter
addRemoteServiceListener, asyncGetRemoteServiceReferences, asyncGetRemoteServiceReferences, asyncGetRemoteServiceReferences, createRemoteFilter, getAllRemoteServiceReferences, getRemoteService, getRemoteServiceID, getRemoteServiceNamespace, getRemoteServiceReference, getRemoteServiceReferences, getRemoteServiceReferences, getRemoteServiceReferences, registerRemoteService, removeRemoteServiceListener, setConnectContextForAuthentication, ungetRemoteService
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

RestClientContainer

public RestClientContainer(RestID id)
Method Detail

createRemoteService

protected IRemoteService createRemoteService(RemoteServiceClientRegistration registration)
Description copied from class: AbstractClientContainer
Create an implementer of IRemoteService for the given registration.

Specified by:
createRemoteService in class AbstractClientContainer
Parameters:
registration - registration from which to create the associated IRemoteService. Will not be null.
Returns:
IRemoteService the remote service associated with this client container. Should not return null.

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.

prepareEndpointAddress

public java.lang.String prepareEndpointAddress(IRemoteCall call,
                                               IRemoteCallable callable)
Description copied from class: AbstractClientContainer
Prepare an endpoint address for the given call and callable.

Specified by:
prepareEndpointAddress in class AbstractClientContainer
Parameters:
call - to create an endpoint for. Will not be null.
callable - to create an endpoing for. Will not be null.
Returns:
String that represents the endpoing for the given call and callable. May only return null if the given call should not be completed (i.e. there is no endpoint associated with the given call).