Class ServiceReferenceListConverter

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

public class ServiceReferenceListConverter extends Object implements org.osgi.service.blueprint.container.Converter
This converter is used to allow ServiceReferenceListConverter 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

    • ServiceReferenceListConverter

      public ServiceReferenceListConverter()
  • 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 SortedServiceList; false otherwise
    • convert

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