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 of IHostContainerSelector.
Since:
4.6
  • Field Details

    • defaultConfigTypes

      protected String[] defaultConfigTypes
  • Constructor Details

    • AbstractHostContainerSelector

      public AbstractHostContainerSelector(String[] defaultConfigTypes)
  • Method Details

    • setExcludedDescriptions

      protected void setExcludedDescriptions(List<String> excludedDescriptions)
      Since:
      4.6
    • getExcludedDescriptions

      protected List<String> getExcludedDescriptions()
      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 reference
      overridingProperties - overriding properties
      serviceExportedInterfaces - service exported interfaces to select for
      serviceExportedConfigs - service exported configs to select for
      serviceIntents - 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 - serviceReference
      properties - properties
      container - 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 reference
      properties - properties
      container - container
      adapter - remote service container adapter
      description - container type description
      requiredConfigTypes - required config types
      requiredServiceIntents - 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 - serviceReference
      properties - properties
      container - container
      Returns:
      boolean true if match, false otherwise
      Since:
      2.0
    • matchHostSupportedConfigTypes

      protected boolean matchHostSupportedConfigTypes(String[] requiredConfigTypes, ContainerTypeDescription containerTypeDescription)
      Parameters:
      requiredConfigTypes - request config types
      containerTypeDescription - 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 reference
      properties - overriding properties
      serviceExportedInterfaces - service exported interfaces to select for
      requiredConfigs - service exported configs to select for
      requiredIntents - 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 - containerTypeDescription
      serviceReference - reference
      properties - properties
      serviceExportedInterfaces - exported interfaces
      requiredConfigs - configs
      requiredIntents - 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 - serviceReference
      properties - properties
      containerTypeDescription - 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 - serviceReference
      properties - properties
      containerTypeDescription - 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 reference
      properties - properties
      container - container
      target - target
      Throws:
      ContainerConnectException - if container cannot be connected
      IDCreateException - 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