Class AbstractContainerSelector
java.lang.Object
org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractContainerSelector
- Direct Known Subclasses:
AbstractConsumerContainerSelector
,AbstractHostContainerSelector
Abstract superclass for both host and consumer container selectors...i.e.
implementers of
IHostContainerSelector
or
IConsumerContainerSelector
.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
connectContainer
(IContainer container, ID connectTargetID, IConnectContext connectContext) protected IConnectContext
createConnectContext
(ServiceReference serviceReference, Map<String, Object> properties, IContainer container, Object context) protected IContainer
createContainer
(ServiceReference serviceReference, Map<String, Object> properties, ContainerTypeDescription containerTypeDescription) protected IContainer
createContainer
(ServiceReference serviceReference, Map<String, Object> properties, ContainerTypeDescription containerTypeDescription, String[] intents) protected ID
createTargetID
(IContainer container, String target) protected void
disconnectContainer
(IContainer container) protected IContainerFactory
protected Object
getContainerFactoryArguments
(ServiceReference serviceReference, Map<String, Object> properties, ContainerTypeDescription containerTypeDescription) protected Object
getContainerFactoryArguments
(ServiceReference serviceReference, Map<String, Object> properties, ContainerTypeDescription containerTypeDescription, String[] intents) protected IContainerManager
protected IContainer[]
protected ContainerTypeDescription
getContainerTypeDescription
(IContainer container) protected ContainerTypeDescription[]
protected IRemoteServiceContainer[]
getRemoteServiceContainers
(IContainer[] containers) protected String[]
getSupportedConfigTypes
(ContainerTypeDescription containerTypeDescription) protected String[]
getSupportedIntents
(ContainerTypeDescription containerTypeDescription) protected IRemoteServiceContainerAdapter
hasRemoteServiceContainerAdapter
(IContainer container) protected boolean
includeContainerWithConnectNamespace
(IContainer container, String connectNamespaceName) protected void
protected void
protected void
logException
(String string, Exception e) protected void
logWarning
(String methodName, String message) protected boolean
matchConnectNamespace
(IContainer container, ID endpointID, ID connectTargetID) protected boolean
matchContainerID
(IContainer container, ID endpointID) protected void
protected void
traceException
(String methodName, String message, Throwable t)
-
Field Details
-
EMPTY_REMOTE_SERVICE_CONTAINER_ARRAY
-
-
Constructor Details
-
AbstractContainerSelector
public AbstractContainerSelector()
-
-
Method Details
-
getContainerManager
-
getContainerFactory
-
getContainerTypeDescriptions
-
getContainers
-
hasRemoteServiceContainerAdapter
-
getContainerTypeDescription
-
getRemoteServiceContainers
-
includeContainerWithConnectNamespace
protected boolean includeContainerWithConnectNamespace(IContainer container, String connectNamespaceName) -
connectContainer
protected void connectContainer(IContainer container, ID connectTargetID, IConnectContext connectContext) throws ContainerConnectException - Throws:
ContainerConnectException
-
getSupportedConfigTypes
-
getSupportedIntents
-
createContainer
protected IContainer createContainer(ServiceReference serviceReference, Map<String, Object> properties, ContainerTypeDescription containerTypeDescription) throws SelectContainerException- Parameters:
serviceReference
- serviceReferenceproperties
- overriding propertiescontainerTypeDescription
- containerTypeDescription- Returns:
- IContainer created container. Should not be
null
- Throws:
SelectContainerException
- thrown if some create or configure failure- Since:
- 2.0
-
createContainer
protected IContainer createContainer(ServiceReference serviceReference, Map<String, Object> properties, ContainerTypeDescription containerTypeDescription, String[] intents) throws SelectContainerException- Parameters:
serviceReference
- serviceReferenceproperties
- overriding propertiescontainerTypeDescription
- containerTypeDescriptionintents
- intents- Returns:
- IContainer created container. May be null if instance cannot be created (e.g. because of intent requirements)
- Throws:
SelectContainerException
- thrown if some create or configure failure- Since:
- 4.6
-
getContainerFactoryArguments
protected Object getContainerFactoryArguments(ServiceReference serviceReference, Map<String, Object> properties, ContainerTypeDescription containerTypeDescription) - Parameters:
serviceReference
- serviceReferenceproperties
- overriding propertiescontainerTypeDescription
- containerTypeDescription- Returns:
- Object container factory arguments to use
- Since:
- 2.0
-
getContainerFactoryArguments
protected Object getContainerFactoryArguments(ServiceReference serviceReference, Map<String, Object> properties, ContainerTypeDescription containerTypeDescription, String[] intents) - Parameters:
serviceReference
- serviceReferenceproperties
- overriding propertiescontainerTypeDescription
- containerTypeDescriptionintents
- intents- Returns:
- Object container factory arguments to use
- Since:
- 4.6
-
createTargetID
-
disconnectContainer
-
createConnectContext
protected IConnectContext createConnectContext(ServiceReference serviceReference, Map<String, Object> properties, IContainer container, Object context) - Parameters:
serviceReference
- serviceReferenceproperties
- overriding propertiescontainer
- the container to create connect context forcontext
- a possible connect context]- Returns:
- IConnectContext a connect context or null
- Since:
- 2.0
-
logException
-
trace
-
traceException
-
logError
-
logError
-
logWarning
-
matchConnectNamespace
-
matchContainerID
-