io.bootique.linkmove.connector.JdbcConnectorFactoryFactory Maven / Gradle / Ivy
package io.bootique.linkmove.connector;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.google.inject.Injector;
import com.nhl.link.move.runtime.connect.IConnectorFactory;
import com.nhl.link.move.runtime.jdbc.JdbcConnector;
import io.bootique.jdbc.DataSourceFactory;
@JsonTypeName("jdbc")
public class JdbcConnectorFactoryFactory implements IConnectorFactoryFactory {
@Override
public Class getConnectorType() {
return JdbcConnector.class;
}
@Override
public IConnectorFactory getConnectorFactory(Injector injector) {
return new JdbcConnectorFactory(injector.getInstance(DataSourceFactory.class));
}
}