Example usage for org.apache.http.impl.nio.reactor SSLMode CLIENT

List of usage examples for org.apache.http.impl.nio.reactor SSLMode CLIENT

Introduction

In this page you can find the example usage for org.apache.http.impl.nio.reactor SSLMode CLIENT.

Prototype

SSLMode CLIENT

To view the source code for org.apache.http.impl.nio.reactor SSLMode CLIENT.

Click Source Link

Usage

From source file:org.apache.axis2.transport.nhttp.SSLClientIOEventDispatch.java

public void connected(final IOSession session) {

    SSLIOSession sslSession = new SSLIOSession(session, this.sslcontext, this.sslHandler);

    LoggingNHttpClientConnection conn = new LoggingNHttpClientConnection(new LoggingIOSession(sslSession),
            new DefaultHttpResponseFactory(), new HeapByteBufferAllocator(), 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 {//from w  w w.  j a  va 2  s  .com
        sslSession.bind(SSLMode.CLIENT, this.params);
    } catch (SSLException ex) {
        this.handler.exception(conn, ex);
        sslSession.shutdown();
    }
}