use of org.qi4j.library.rest.client.spi.RequestWriter in project qi4j-sdk by Qi4j.
the class RequestWriterDelegator method initialize.
@Override
public void initialize() throws InitializationException {
Logger logger = LoggerFactory.getLogger(getClass());
ResourceBundle defaultRequestWriters = ResourceBundle.getBundle("org.qi4j.library.rest.client.rest-client");
String requestWriterClasses = defaultRequestWriters.getString("requestwriters");
logger.info("Using request writers:" + requestWriterClasses);
for (String className : requestWriterClasses.split(",")) {
try {
Class writerClass = module.classLoader().loadClass(className.trim());
RequestWriter requestWriter = (RequestWriter) module.newObject(writerClass);
registerRequestWriter(requestWriter);
} catch (ClassNotFoundException e) {
logger.warn("Could not register request writer " + className, e);
}
}
}
Aggregations