Package org.apache.http.nio.conn.ssl

Examples of org.apache.http.nio.conn.ssl.SSLLayeringStrategy


                    if (tlsClientParameters == null) {
                        tlsClientParameters = new TLSClientParameters();
                    }

                    final SSLContext sslcontext = getSSLContext(tlsClientParameters);
                    reg.register(new AsyncScheme("https", 443, new SSLLayeringStrategy(sslcontext) {
                        @Override
                        protected void initializeEngine(SSLEngine engine) {
                            initializeSSLEngine(sslcontext, engine);
                        }
                        @Override
View Full Code Here


    @Override
    public void initClient() throws Exception {
        super.initClient();
        this.connMgr.getSchemeRegistry().register(new AsyncScheme("https", 443,
                new SSLLayeringStrategy(SSLTestContexts.createClientSSLContext())));
    }
View Full Code Here

    @Override
    public void initClient() throws Exception {
        super.initClient();
        this.connMgr.getSchemeRegistry().register(new AsyncScheme("https", 443,
                new SSLLayeringStrategy(SSLTestContexts.createClientSSLContext())));
    }
View Full Code Here

          HttpConnectionParams.setTcpNoDelay(httpParams, true);
          HttpConnectionParams.setSocketBufferSize(httpParams, 4096);
          HttpProtocolParams.setVersion(httpParams, HttpVersion.HTTP_1_1);
     
          asyncHttpClient.getConnectionManager()
          .getSchemeRegistry().register(new AsyncScheme("https", 443, new SSLLayeringStrategy(sslContext)));
      asyncHttpClient.setRedirectStrategy(new QQDefaultRedirectStrategy());
      asyncHttpClient.start();
      cookieJar = new QQHttpCookieJar();
    } catch (IOReactorException e) {
      throw new QQException(QQErrorCode.INIT_ERROR, e);
View Full Code Here

        SSLContext clientSSLContext = SSLContext.getInstance("TLS");
        clientSSLContext.init(null, tm, null);

        SchemeRegistry schemeRegistry = new SchemeRegistry();
        schemeRegistry.register(new Scheme("http", 80, null));
        schemeRegistry.register(new Scheme("https", 443, new SSLLayeringStrategy(clientSSLContext)));
        return new PoolingClientConnectionManager(ioreactor, schemeRegistry);
    }
View Full Code Here

            final AsyncSchemeRegistry reg = new AsyncSchemeRegistry();
            reg.register(new AsyncScheme("http", 80, null));
            if ("https".equals(url.getScheme())) {
                try {
                    final SSLContext sslcontext = getSSLContext();
                    reg.register(new AsyncScheme("https", 443, new SSLLayeringStrategy(sslcontext) {
                        @Override
                        protected void initializeEngine(SSLEngine engine) {
                            initializeSSLEngine(sslcontext, engine);
                        }
                        @Override
View Full Code Here

                    if (tlsClientParameters == null) {
                        tlsClientParameters = new TLSClientParameters();
                    }

                    final SSLContext sslcontext = getSSLContext(tlsClientParameters);
                    reg.register(new AsyncScheme("https", 443, new SSLLayeringStrategy(sslcontext) {
                        @Override
                        protected void initializeEngine(SSLEngine engine) {
                            initializeSSLEngine(sslcontext, engine);
                        }
                        @Override
View Full Code Here

            final AsyncSchemeRegistry reg = new AsyncSchemeRegistry();
            reg.register(new AsyncScheme("http", 80, null));
            if ("https".equals(url.getScheme())) {
                try {
                    final SSLContext sslcontext = getSSLContext();
                    reg.register(new AsyncScheme("https", 443, new SSLLayeringStrategy(sslcontext) {
                        @Override
                        protected void initializeEngine(SSLEngine engine) {
                            initializeSSLEngine(sslcontext, engine);
                        }
                        @Override
View Full Code Here

        this.target = new HttpHost("localhost", port, "https");

        ConnectingIOReactor ioReactor = new DefaultConnectingIOReactor(2, new BasicHttpParams());
        SchemeRegistry schemeRegistry = new SchemeRegistry();
        schemeRegistry.register(new Scheme("http", 80, null));
        schemeRegistry.register(new Scheme("https", 443, new SSLLayeringStrategy(this.clientSSLContext)));
        this.sessionManager = new PoolingClientConnectionManager(ioReactor, schemeRegistry);
        this.httpclient = new DefaultHttpAsyncClient(ioReactor, this.sessionManager);
    }
View Full Code Here

    @Override
    public void initClient() throws Exception {
        super.initClient();
        this.connMgr.getSchemeRegistry().register(new AsyncScheme("https", 443,
                new SSLLayeringStrategy(SSLTestContexts.createClientSSLContext())));
    }
View Full Code Here

TOP

Related Classes of org.apache.http.nio.conn.ssl.SSLLayeringStrategy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.