com.axibase.tsd.driver.jdbc.protocol.ProtocolFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of atsd-jdbc Show documentation
Show all versions of atsd-jdbc Show documentation
JDBC driver for SQL API using
package com.axibase.tsd.driver.jdbc.protocol;
import com.axibase.tsd.driver.jdbc.content.ContentDescription;
import com.axibase.tsd.driver.jdbc.intf.IContentProtocol;
import com.axibase.tsd.driver.jdbc.logging.LoggingFacade;
public class ProtocolFactory {
private static final LoggingFacade logger = LoggingFacade.getLogger(ProtocolFactory.class);
public static T create(Class type, ContentDescription cd) {
try {
return type.getDeclaredConstructor(ContentDescription.class).newInstance(cd);
} catch (final IllegalArgumentException | ReflectiveOperationException | SecurityException e) {
if (logger.isErrorEnabled())
logger.error("Cannot get an instance from the factory: " + e.getMessage());
}
return null;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy