Class AbstractHostContainerSelector
- java.lang.Object
-
- org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractContainerSelector
-
- org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractHostContainerSelector
-
- Direct Known Subclasses:
HostContainerSelector
public abstract class AbstractHostContainerSelector extends AbstractContainerSelector
Abstract superclass for host container selectors...i.e. implementers ofIHostContainerSelector
.- Since:
- 4.6
-
-
Field Summary
Fields Modifier and Type Field Description protected String[]
defaultConfigTypes
-
Fields inherited from class org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractContainerSelector
EMPTY_REMOTE_SERVICE_CONTAINER_ARRAY
-
-
Constructor Summary
Constructors Constructor Description AbstractHostContainerSelector(String[] defaultConfigTypes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
connectHostContainer(ServiceReference serviceReference, Map<String,Object> properties, IContainer container, Object target)
protected Collection
createAndConfigureHostContainers(ServiceReference serviceReference, Map<String,Object> properties, String[] serviceExportedInterfaces, String[] requiredConfigs, String[] serviceIntents)
protected IRemoteServiceContainer
createMatchingContainer(ContainerTypeDescription containerTypeDescription, ServiceReference serviceReference, Map<String,Object> properties, String[] serviceExportedInterfaces, String[] requiredConfigs, String[] serviceIntents)
protected IRemoteServiceContainer
createRSContainer(ServiceReference serviceReference, Map<String,Object> properties, ContainerTypeDescription containerTypeDescription)
protected IRemoteServiceContainer
createRSContainer(ServiceReference serviceReference, Map<String,Object> properties, ContainerTypeDescription containerTypeDescription, String[] intents)
protected ContainerTypeDescription[]
getContainerTypeDescriptionsForDefaultConfigTypes(ContainerTypeDescription[] descriptions)
protected String[]
getDefaultConfigTypes()
protected List<String>
getExcludedDescriptions()
protected boolean
getRequireServerDescription()
protected boolean
matchDefaultConfigTypes(String[] defaultConfigTypes, String[] supportedConfigTypes)
protected boolean
matchExistingHostContainer(ServiceReference serviceReference, Map<String,Object> properties, IContainer container, IRemoteServiceContainerAdapter adapter, ContainerTypeDescription description, String[] requiredConfigTypes, String[] requiredServiceIntents)
protected boolean
matchHostContainerID(ServiceReference serviceReference, Map<String,Object> properties, IContainer container)
protected boolean
matchHostContainerToConnectTarget(ServiceReference serviceReference, Map<String,Object> properties, IContainer container)
protected boolean
matchHostSupportedConfigTypes(String[] requiredConfigTypes, ContainerTypeDescription containerTypeDescription)
protected boolean
matchHostSupportedIntents(String[] serviceRequiredIntents, ContainerTypeDescription containerTypeDescription)
protected boolean
matchHostSupportedIntents(String[] serviceRequiredIntents, ContainerTypeDescription containerTypeDescription, IContainer container)
protected boolean
matchNotExcluded(ContainerTypeDescription description)
protected boolean
matchRequireServer(ContainerTypeDescription description)
protected Collection
selectExistingHostContainers(ServiceReference serviceReference, Map<String,Object> overridingProperties, String[] serviceExportedInterfaces, String[] serviceExportedConfigs, String[] serviceIntents)
protected void
setExcludedDescriptions(List<String> excludedDescriptions)
protected void
setRequireServer(boolean requireServerDescriptionForExport)
-
Methods inherited from class org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractContainerSelector
connectContainer, createConnectContext, createContainer, createContainer, createTargetID, disconnectContainer, getContainerFactory, getContainerFactoryArguments, getContainerFactoryArguments, getContainerManager, getContainers, getContainerTypeDescription, getContainerTypeDescriptions, getRemoteServiceContainers, getSupportedConfigTypes, getSupportedIntents, hasRemoteServiceContainerAdapter, includeContainerWithConnectNamespace, logError, logError, logException, logWarning, matchConnectNamespace, matchContainerID, trace, traceException
-
-
-
-
Field Detail
-
defaultConfigTypes
protected String[] defaultConfigTypes
-
-
Constructor Detail
-
AbstractHostContainerSelector
public AbstractHostContainerSelector(String[] defaultConfigTypes)
-
-
Method Detail
-
setExcludedDescriptions
protected void setExcludedDescriptions(List<String> excludedDescriptions)
- Since:
- 4.6
-
setRequireServer
protected void setRequireServer(boolean requireServerDescriptionForExport)
- Since:
- 4.6
-
getRequireServerDescription
protected boolean getRequireServerDescription()
- Since:
- 4.6
-
selectExistingHostContainers
protected Collection selectExistingHostContainers(ServiceReference serviceReference, Map<String,Object> overridingProperties, String[] serviceExportedInterfaces, String[] serviceExportedConfigs, String[] serviceIntents)
- Parameters:
serviceReference
- service referenceoverridingProperties
- overriding propertiesserviceExportedInterfaces
- service exported interfaces to select forserviceExportedConfigs
- service exported configs to select forserviceIntents
- service exported intents to select for- Returns:
- Collection of existing host containers
- Since:
- 2.0
-
matchHostContainerToConnectTarget
protected boolean matchHostContainerToConnectTarget(ServiceReference serviceReference, Map<String,Object> properties, IContainer container)
- Parameters:
serviceReference
- serviceReferenceproperties
- propertiescontainer
- container to match- Returns:
- boolean true if match false otherwise
- Since:
- 2.0
-
matchExistingHostContainer
protected boolean matchExistingHostContainer(ServiceReference serviceReference, Map<String,Object> properties, IContainer container, IRemoteServiceContainerAdapter adapter, ContainerTypeDescription description, String[] requiredConfigTypes, String[] requiredServiceIntents)
- Parameters:
serviceReference
- service referenceproperties
- propertiescontainer
- containeradapter
- remote service container adapterdescription
- container type descriptionrequiredConfigTypes
- required config typesrequiredServiceIntents
- required service intents- Returns:
- boolean true if match, false otherwise
- Since:
- 2.0
-
matchHostContainerID
protected boolean matchHostContainerID(ServiceReference serviceReference, Map<String,Object> properties, IContainer container)
- Parameters:
serviceReference
- serviceReferenceproperties
- propertiescontainer
- container- Returns:
- boolean true if match, false otherwise
- Since:
- 2.0
-
matchHostSupportedConfigTypes
protected boolean matchHostSupportedConfigTypes(String[] requiredConfigTypes, ContainerTypeDescription containerTypeDescription)
- Parameters:
requiredConfigTypes
- request config typescontainerTypeDescription
- container type description- Returns:
- boolean true if match, false otherwise
-
createAndConfigureHostContainers
protected Collection createAndConfigureHostContainers(ServiceReference serviceReference, Map<String,Object> properties, String[] serviceExportedInterfaces, String[] requiredConfigs, String[] serviceIntents) throws SelectContainerException
- Parameters:
serviceReference
- service referenceproperties
- overriding propertiesserviceExportedInterfaces
- service exported interfaces to select forrequiredConfigs
- service exported configs to select forrequiredIntents
- intents to select for- Returns:
- Collection of host containers
- Throws:
SelectContainerException
- if container cannot be created or configured- Since:
- 2.0
-
getContainerTypeDescriptionsForDefaultConfigTypes
protected ContainerTypeDescription[] getContainerTypeDescriptionsForDefaultConfigTypes(ContainerTypeDescription[] descriptions)
-
matchDefaultConfigTypes
protected boolean matchDefaultConfigTypes(String[] defaultConfigTypes, String[] supportedConfigTypes)
-
getDefaultConfigTypes
protected String[] getDefaultConfigTypes()
-
matchRequireServer
protected boolean matchRequireServer(ContainerTypeDescription description)
- Since:
- 4.6
-
matchNotExcluded
protected boolean matchNotExcluded(ContainerTypeDescription description)
- Since:
- 4.6
-
createMatchingContainer
protected IRemoteServiceContainer createMatchingContainer(ContainerTypeDescription containerTypeDescription, ServiceReference serviceReference, Map<String,Object> properties, String[] serviceExportedInterfaces, String[] requiredConfigs, String[] serviceIntents) throws SelectContainerException
- Parameters:
containerTypeDescription
- containerTypeDescriptionserviceReference
- referenceproperties
- propertiesserviceExportedInterfaces
- exported interfacesrequiredConfigs
- configsrequiredIntents
- intents- Returns:
- IRemoteServiceContainer matching container created
- Throws:
SelectContainerException
- container cannot be created or selected- Since:
- 2.0
-
createRSContainer
protected IRemoteServiceContainer createRSContainer(ServiceReference serviceReference, Map<String,Object> properties, ContainerTypeDescription containerTypeDescription) throws SelectContainerException
- Parameters:
serviceReference
- serviceReferenceproperties
- propertiescontainerTypeDescription
- container type description- Returns:
- IRemoteServiceContainer created remote service container
- Throws:
SelectContainerException
- if could not be created- Since:
- 2.0
-
createRSContainer
protected IRemoteServiceContainer createRSContainer(ServiceReference serviceReference, Map<String,Object> properties, ContainerTypeDescription containerTypeDescription, String[] intents) throws SelectContainerException
- Parameters:
serviceReference
- serviceReferenceproperties
- propertiescontainerTypeDescription
- container type description- Returns:
- IRemoteServiceContainer created remote service container
- Throws:
SelectContainerException
- if could not be created- Since:
- 4.6
-
connectHostContainer
protected void connectHostContainer(ServiceReference serviceReference, Map<String,Object> properties, IContainer container, Object target) throws ContainerConnectException, IDCreateException
- Parameters:
serviceReference
- service referenceproperties
- propertiescontainer
- containertarget
- target- Throws:
ContainerConnectException
- if container cannot be connectedIDCreateException
- thrown if ID cannot be created- Since:
- 2.0
-
matchHostSupportedIntents
protected boolean matchHostSupportedIntents(String[] serviceRequiredIntents, ContainerTypeDescription containerTypeDescription)
-
matchHostSupportedIntents
protected boolean matchHostSupportedIntents(String[] serviceRequiredIntents, ContainerTypeDescription containerTypeDescription, IContainer container)
- Since:
- 4.6
-
-