throw new IllegalStateException("Connection already open");
}
HttpHost target = route.getTargetHost();
HttpHost proxy = route.getProxyHost();
IOSession iosession = this.entry.getIOSession();
if (proxy == null) {
Scheme scheme = this.manager.getSchemeRegistry().getScheme(target);
LayeringStrategy layeringStrategy = scheme.getLayeringStrategy();
if (layeringStrategy != null) {
SSLIOSession ssliosession = (SSLIOSession) layeringStrategy.layer(iosession);
ssliosession.bind(SSLMode.CLIENT, params);
iosession = ssliosession;
}
}
OperatedClientConnection conn = new DefaultClientConnection(
iosession, createHttpResponseFactory(), createByteBufferAllocator(), params);
iosession.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
this.conn = conn;
if (proxy == null) {
tracker.connectTarget(conn.getSSLIOSession() != null);
} else {