clientBootstrap.setPipelineFactory(new HttpClientPipelineFactory(tmpFile));
ChannelFuture channelFuture = clientBootstrap.connect(new InetSocketAddress(host, port));
// TODO timeout?
Channel channel = channelFuture.awaitUninterruptibly().getChannel();
if (!channelFuture.isSuccess()) {
clientBootstrap.releaseExternalResources();
throw new DeploymentFailedException("Cannot connect to http uri [" + uri.toString() + "]",
channelFuture.getCause());
}
HttpRequest request = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, uri.toASCIIString());