use of org.apache.calcite.avatica.server.AvaticaHandler in project calcite-avatica by apache.
the class AvaticaServersForTest method startServer.
/**
* Starts Avatica server and cache.
*/
public void startServer(HandlerFactory factory, Service service, Serialization serialization, MetricsSystemConfiguration metricsConfig, AvaticaServerConfiguration serverConfig) {
AvaticaHandler handler = factory.getHandler(service, serialization, metricsConfig, serverConfig);
final HttpServer server = new HttpServer.Builder().withHandler(handler).withPort(0).build();
server.start();
serversBySerialization.put(serialization, server);
}
Aggregations