Package org.apache.http.impl.nio.reactor

Examples of org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor


                targetConfiguration.getWorkerPool());

        try {
            String prefix = (sslContext == null ? "http" : "https") + "-Sender I/O dispatcher";

            ioReactor = new DefaultConnectingIOReactor(
                    targetConfiguration.getIOThreadCount(),
                    new NativeThreadFactory(
                            new ThreadGroup(prefix + " Thread Group"), prefix),
                    targetConfiguration.getHttpParameters());
View Full Code Here


        preserveServerHeader = NHttpConfiguration.getInstance().isPreserveServerHeader();

        HttpParams params = getClientParameters();
        try {
            String prefix = (sslContext == null ? "http" : "https") + "-Sender I/O dispatcher";
            ioReactor = new DefaultConnectingIOReactor(
                NHttpConfiguration.getInstance().getClientIOWorkers(),
                new NativeThreadFactory(new ThreadGroup(prefix + " thread group"), prefix), params);
            ioReactor.setExceptionHandler(new IOReactorExceptionHandler() {
                public boolean handle(IOException ioException) {
                    log.warn("System may be unstable: IOReactor encountered a checked exception : " +
View Full Code Here

     */
    private void executeClientEngine() {

        HttpParams params = getClientParameters();
        try {
            ioReactor = new DefaultConnectingIOReactor(
                NHttpConfiguration.getInstance().getClientIOWorkers(), params);
        } catch (IOException e) {
            log.error("Error starting the IOReactor", e);
        }

View Full Code Here

            .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024)
            .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
            .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true)
            .setParameter(HttpProtocolParams.USER_AGENT, "TEST-SSL-CLIENT/1.1");

        this.ioReactor = new DefaultConnectingIOReactor(2, this.params);
    }
View Full Code Here

            .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024)
            .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
            .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true)
            .setParameter(HttpProtocolParams.USER_AGENT, "TEST-CLIENT/1.1");

        this.ioReactor = new DefaultConnectingIOReactor(2, this.params);
    }
View Full Code Here

    protected AbstractHttpAsyncClient(HttpParams params) throws IOReactorException {
        super();
        if (params == null) {
            params = createHttpParams();
        }
        DefaultConnectingIOReactor defaultioreactor = new DefaultConnectingIOReactor(2, params);
        defaultioreactor.setExceptionHandler(new InternalIOReactorExceptionHandler(this.log));
        this.connmgr = new PoolingClientConnectionManager(defaultioreactor);
        this.queue = new ConcurrentLinkedQueue<HttpAsyncExchangeHandler<?>>();
        this.params = params;
    }
View Full Code Here

    public TestHttpSSLClient(final HttpParams params) throws Exception {
        super();
        this.params = params;
        this.sslcontext = createSSLContext();
        this.ioReactor = new DefaultConnectingIOReactor(2, this.params);
    }
View Full Code Here

   
    private volatile IOReactorThread thread;

    public TestHttpClient(final HttpParams params) throws IOException {
        super();
        this.ioReactor = new DefaultConnectingIOReactor(2, params);
        this.params = params;
    }
View Full Code Here

   
    private volatile IOReactorThread thread;

    public TestHttpClient(final HttpParams params) throws IOException {
        super();
        this.ioReactor = new DefaultConnectingIOReactor(2, params);
        this.params = params;
    }
View Full Code Here

   
    public TestHttpSSLClient(final HttpParams params) throws Exception {
        super();
        this.params = params;
        this.ioReactor = new DefaultConnectingIOReactor(2, this.params);
       
        ClassLoader cl = getClass().getClassLoader();
        URL url = cl.getResource("test.keystore");
        KeyStore keystore  = KeyStore.getInstance("jks");
        keystore.load(url.openStream(), "nopassword".toCharArray());
View Full Code Here

TOP

Related Classes of org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor

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.