Class AbstractRestClientContainer
- java.lang.Object
- 
- org.eclipse.ecf.core.AbstractContainer
- 
- org.eclipse.ecf.remoteservice.client.AbstractClientContainer
- 
- org.eclipse.ecf.remoteservice.rest.client.AbstractRestClientContainer
 
 
 
- 
- All Implemented Interfaces:
- org.eclipse.core.runtime.IAdaptable,- IContainer,- IIdentifiable,- IRemoteServiceClientContainerAdapter,- IRemoteServiceConsumer,- IRemoteServiceContainerAdapter,- IRemoteServiceHost
 - Direct Known Subclasses:
- RestClientContainer
 
 public abstract class AbstractRestClientContainer extends AbstractClientContainer 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected classAbstractRestClientContainer.RestRemoteServiceClientRegistration
 - 
Field SummaryFields Modifier and Type Field Description static StringSLASH- 
Fields inherited from class org.eclipse.ecf.remoteservice.client.AbstractClientContaineralwaysSendDefaultParameters, connectContext, connectedID, connectLock, containerID, parameterSerializer, parameterSerializerLock, registry, remoteResponseDeserializer, remoteResponseDeserializerLock, remoteServiceFactory, remoteServiceListeners
 
- 
 - 
Constructor SummaryConstructors Constructor Description AbstractRestClientContainer(RestID containerID)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract IRemoteServicecreateRemoteService(RemoteServiceClientRegistration registration)Create a remote service for a given remote service registration.protected RemoteServiceClientRegistrationcreateRestServiceRegistration(String[] clazzes, IRemoteCallable[][] callables, Dictionary properties)protected RemoteServiceClientRegistrationcreateRestServiceRegistration(IRemoteCallable[] callables, Dictionary properties)NamespacegetConnectNamespace()Get the Namespace for creating a targetID suitable for use as the first parameter in subsequent calls toIContainer.connect(ID, IConnectContext).IRemoteServiceReference[]getRemoteServiceReferences(ID target, String clazz, String filter)Returns an array ofIRemoteServiceReferenceobjects.IRemoteServiceReference[]getRemoteServiceReferences(ID target, ID[] idFilter, String clazz, String filter)Returns an array ofIRemoteServiceReferenceobjects.protected StringprepareBaseUri(IRemoteCall call, IRemoteCallable callable)StringprepareEndpointAddress(IRemoteCall call, IRemoteCallable callable)Prepare an endpoint address for the given call and callable.protected StringprepareResourcePath(IRemoteCall call, IRemoteCallable callable)booleansetRemoteServiceCallPolicy(IRemoteServiceCallPolicy policy)Set the remote service call policy to enable authorization on remote service method callsprotected StringsubstituteParameters(String path, Object[] parameters)protected IDtransformTarget(ID originalTarget, String filter)- 
Methods inherited from class org.eclipse.ecf.remoteservice.client.AbstractClientContaineraddRemoteServiceListener, asyncGetRemoteServiceReferences, asyncGetRemoteServiceReferences, asyncGetRemoteServiceReferences, connect, createRemoteFilter, createUriRequest, disconnect, dispose, getAllRemoteServiceReferences, getConnectContextForAuthentication, getConnectedID, getID, getParameterSerializer, getParameterSerializer, getRemoteCallTargetID, getRemoteService, getRemoteServiceID, getRemoteServiceNamespace, getRemoteServiceReference, getRemoteServiceReferences, getResponseDeserializer, getResponseDeserializer, logException, prepareCallParameters, prepareExtraParameters, prepareParameters, processResponse, registerCallables, registerCallables, registerCallables, registerRemoteService, removeRemoteServiceListener, serializeParameter, serializeParameter, setAlwaysSendDefaultParameters, setConnectContextForAuthentication, setParameterSerializer, setRemoteServiceFactory, setResponseDeserializer, ungetRemoteService
 - 
Methods inherited from class org.eclipse.ecf.core.AbstractContaineraddListener, fireContainerEvent, getAdapter, getPasswordFromConnectContext, removeListener
 
- 
 
- 
- 
- 
Field Detail- 
SLASHpublic static final String SLASH - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
AbstractRestClientContainerpublic AbstractRestClientContainer(RestID containerID) 
 
- 
 - 
Method Detail- 
setRemoteServiceCallPolicypublic boolean setRemoteServiceCallPolicy(IRemoteServiceCallPolicy policy) Description copied from interface:IRemoteServiceContainerAdapterSet the remote service call policy to enable authorization on remote service method calls- Parameters:
- policy- Implementation of- IRemoteServiceCallPolicycontaining authorization specific code
- Returns:
- trueif the underlying provider supports using the policy,- falseif it does not support using the policy.
 
 - 
getConnectNamespacepublic Namespace getConnectNamespace() Description copied from interface:IContainerGet the Namespace for creating a targetID suitable for use as the first parameter in subsequent calls toIContainer.connect(ID, IConnectContext). If this method returnsnull, then it means thatnullis expected as a valid parameter in subsequent calls toIContainer.connect(ID, IConnectContext). If this method returns a non-nullNamespace, then thetargetIDparameter inIContainer.connect(ID, IConnectContext)must be non-nullinstance created of the returned Namespace.- Returns:
- Namespace the namespace associated with subsequent calls to
         IContainer.connect(ID, IConnectContext). Ifnull, then thetargetIDinstances passed toIContainer.connect(ID, IConnectContext)may benull. If notnull, thentargetIDinstances passed toIContainer.connect(ID, IConnectContext)must be instances of the returned Namespace.
 
 - 
createRemoteServiceprotected abstract IRemoteService createRemoteService(RemoteServiceClientRegistration registration) Description copied from class:AbstractClientContainerCreate a remote service for a given remote service registration. This method will be called as part of the RemoteServiceAdmin.importService.- Overrides:
- createRemoteServicein class- AbstractClientContainer
- Parameters:
- registration- the remote service client registration associated with the service being imported. Will not be- null.
 
 - 
getRemoteServiceReferencespublic IRemoteServiceReference[] getRemoteServiceReferences(ID target, ID[] idFilter, String clazz, String filter) throws InvalidSyntaxException, ContainerConnectException Description copied from interface:IRemoteServiceContainerAdapterReturns an array ofIRemoteServiceReferenceobjects. The returned array ofIRemoteServiceReferenceobjects 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. targetis a remote container to connect to. Ifnull, no connection attempt is made.idFilteris 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. IfidFilterisnull, all containers are considered to match the filter.filteris used to select the registered service whose properties objects contain keys and values which satisfy the filter. SeeFilterfor a description of the filter string syntax. Iffilterisnull, all registered services are considered to match the filter. Iffiltercannot be parsed, anInvalidSyntaxExceptionwill be thrown with a human readable message where the filter became unparsable.- Specified by:
- getRemoteServiceReferencesin interface- IRemoteServiceConsumer
- Specified by:
- getRemoteServiceReferencesin interface- IRemoteServiceContainerAdapter
- Overrides:
- getRemoteServiceReferencesin class- AbstractClientContainer
- Parameters:
- target- a target container to connect to if enclosing container is not already connected. May be- null.
- 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 
            nullif no services are found that match the search.
- Throws:
- InvalidSyntaxException- If filter contains an invalid filter string that cannot be parsed.
- ContainerConnectException- if container cannot connect
 
 - 
getRemoteServiceReferencespublic IRemoteServiceReference[] getRemoteServiceReferences(ID target, String clazz, String filter) throws InvalidSyntaxException, ContainerConnectException Description copied from interface:IRemoteServiceContainerAdapterReturns an array of IRemoteServiceReferenceobjects. The returned array ofIRemoteServiceReferenceobjects 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. filteris used to select the registered service whose properties objects contain keys and values which satisfy the filter. SeeFilterfor a description of the filter string syntax.If filterisnull, all registered services are considered to match the filter. Iffiltercannot be parsed, anInvalidSyntaxExceptionwill be thrown with a human readable message where the filter became unparsable.- Specified by:
- getRemoteServiceReferencesin interface- IRemoteServiceConsumer
- Specified by:
- getRemoteServiceReferencesin interface- IRemoteServiceContainerAdapter
- Overrides:
- getRemoteServiceReferencesin class- AbstractClientContainer
- 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 
            nullif no services are found that match the search.
- Throws:
- InvalidSyntaxException- If filter contains an invalid filter string that cannot be parsed.
- ContainerConnectException- if container cannot connect
 
 - 
transformTargetprotected ID transformTarget(ID originalTarget, String filter) throws InvalidSyntaxException - Throws:
- InvalidSyntaxException
 
 - 
prepareBaseUriprotected String prepareBaseUri(IRemoteCall call, IRemoteCallable callable) 
 - 
prepareResourcePathprotected String prepareResourcePath(IRemoteCall call, IRemoteCallable callable) 
 - 
prepareEndpointAddresspublic String prepareEndpointAddress(IRemoteCall call, IRemoteCallable callable) Description copied from class:AbstractClientContainerPrepare an endpoint address for the given call and callable.- Specified by:
- prepareEndpointAddressin 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 nullif the given call should not be completed (i.e. there is no endpoint associated with the given call).
 
 - 
createRestServiceRegistrationprotected RemoteServiceClientRegistration createRestServiceRegistration(String[] clazzes, IRemoteCallable[][] callables, Dictionary properties) - Overrides:
- createRestServiceRegistrationin class- AbstractClientContainer
 
 - 
createRestServiceRegistrationprotected RemoteServiceClientRegistration createRestServiceRegistration(IRemoteCallable[] callables, Dictionary properties) - Overrides:
- createRestServiceRegistrationin class- AbstractClientContainer
 
 
- 
 
-