How to register a custom ImageRead

To register a custom ImageReader with service ranking of 1 (default is 0) you need to create a bundle providing an ImageReader service as follows:

@Component
@Service(ImageReader.class)
@Property(name=Constants.SERVICE_RANKING, intValue=1)
public class BetterImageReader implements ImageReader {
    // ...
}

When the component metaType is declared true and the service.ranking property is declared non-private, the service.ranking can by dynamically configured at runtime in the Felix Web Console.

@Component(metatype=true)
@Service(ImageReader.class)
@Property(name=Constants.SERVICE_RANKING, intValue=1, propertyPrivate=false)
public class BetterImageReader implements ImageReader {
    // ...
}