nl.dedicon.pipeline.braille.calabash.impl.BrlUrisStep_Provider_SPI Maven / Gradle / Ivy
/***************************************************************/
/* This class was generated by ds-to-spi-annotations-processor */
/***************************************************************/
package nl.dedicon.pipeline.braille.calabash.impl;
public class BrlUrisStep_Provider_SPI
extends nl.dedicon.pipeline.braille.calabash.impl.BrlUrisStep.Provider
implements org.daisy.common.spi.ServiceWithProperties
{
private static final org.slf4j.Logger spi_log = org.slf4j.LoggerFactory.getLogger(BrlUrisStep_Provider_SPI.class);
private final java.util.Map spi_props;
public BrlUrisStep_Provider_SPI() {
super();
spi_log.trace("Creating BrlUrisStep.Provider");
spi_props = new java.util.HashMap();
spi_props.put("component.name", "dedicon:brl-uris");
spi_props.put("type", "{http://www.dedicon.nl}brl-uris");
{
spi_log.trace("Binding org.daisy.pipeline.braille.pef.FileFormatProvider services...");
// cardinality: 0..n
int minRef = 0;
int maxRef = -1;
int refCount = 0;
try {
java.util.Iterator services
= org.daisy.common.spi.ServiceLoader.load(org.daisy.pipeline.braille.pef.FileFormatProvider.class).iterator();
while (services.hasNext()) {
try {
org.daisy.pipeline.braille.pef.FileFormatProvider service = services.next();
bindFileFormatProvider(service);
refCount++;
if (maxRef > 0 && refCount == maxRef)
break;
} catch (Throwable e) {
spi_log.error("Error while binding org.daisy.pipeline.braille.pef.FileFormatProvider service", e);
}
}
} catch (Throwable e) {
spi_log.error("Error while binding org.daisy.pipeline.braille.pef.FileFormatProvider services", e);
}
if (refCount < minRef) {
spi_log.warn("No org.daisy.pipeline.braille.pef.FileFormatProvider found");
throw new RuntimeException("No org.daisy.pipeline.braille.pef.FileFormatProvider found");
} else {
spi_log.trace("Bound " + refCount + " org.daisy.pipeline.braille.pef.FileFormatProvider services.");
}
}
}
public java.util.Map spi_getProperties() {
return spi_props;
}
}