*/
private NettyHttpService createNettyHttpService(String host,
Iterable<HandlerDelegatorContext> delegatorContexts,
String pathPrefix) {
// Create HttpHandlers which delegate to the HttpServiceHandlers
HttpHandlerFactory factory = new HttpHandlerFactory(pathPrefix);
List<HttpHandler> nettyHttpHandlers = Lists.newArrayList();
// get the runtime args from the twill context
for (HandlerDelegatorContext context : delegatorContexts) {
nettyHttpHandlers.add(factory.createHttpHandler(context.getHandlerType(), context));
}
return NettyHttpService.builder().setHost(host)
.setPort(0)
.addHttpHandlers(nettyHttpHandlers)