Class ServiceSelectorConverter

java.lang.Object
ddf.catalog.util.impl.ServiceSelectorConverter
All Implemented Interfaces:
org.osgi.service.blueprint.container.Converter

public class ServiceSelectorConverter extends Object implements org.osgi.service.blueprint.container.Converter
This converter is used to allow ServiceSelector objects to pass through for List implementations. This was originally intended to allow plugins to be automatically sorted in the list. Without this converter, blueprint will copy the list and lose the reference.
  • Constructor Details

    • ServiceSelectorConverter

      public ServiceSelectorConverter()
  • Method Details

    • canConvert

      public boolean canConvert(Object sourceObject, org.osgi.service.blueprint.container.ReifiedType targetType)
      Specified by:
      canConvert in interface org.osgi.service.blueprint.container.Converter
      Returns:
      true if sourceObject is an instance of ServiceSelector; false otherwise
    • convert

      public Object convert(Object sourceObject, org.osgi.service.blueprint.container.ReifiedType targetType) throws Exception
      Converts (casts) the sourceObject to a ServiceSelector.
      Specified by:
      convert in interface org.osgi.service.blueprint.container.Converter
      Returns:
      sourceObject cast to a ServiceSelector
      Throws:
      Exception