this(handler, sslcontext, null, params);
}
public void connected(final IOSession session) {
SSLIOSession sslSession = new SSLIOSession(
session,
this.sslcontext,
this.sslHandler);
DefaultNHttpClientConnection conn = new DefaultNHttpClientConnection(
new LoggingIOSession(sslSession),
new DefaultHttpResponseFactory(),
this.params);
session.setAttribute(NHTTP_CONN, conn);
session.setAttribute(SSL_SESSION, sslSession);
Object attachment = session.getAttribute(IOSession.ATTACHMENT_KEY);
this.handler.connected(conn, attachment);
try {
sslSession.initialize(SSLMode.CLIENT, this.params);
} catch (SSLException ex) {
this.handler.exception(conn, ex);
sslSession.shutdown();
}
}