use of io.cdap.cdap.gateway.router.NettyRouter in project cdap by caskdata.
the class MasterServiceMainTestBase method getRouterBaseURI.
/**
* Returns the base URI for the router.
*/
static URI getRouterBaseURI() {
NettyRouter router = getServiceMainInstance(RouterServiceMain.class).getInjector().getInstance(NettyRouter.class);
InetSocketAddress addr = router.getBoundAddress().orElseThrow(IllegalStateException::new);
return URI.create(String.format("https://%s:%d/", addr.getHostName(), addr.getPort()));
}
Aggregations