Package org.apache.http.nio.conn

Examples of org.apache.http.nio.conn.ManagedNHttpClientConnection


        Asserts.notNull(this.bbuf, "Byte buffer");

        //FIXME: IOControl needs to expose event mask in order to avoid this extreme ugliness
        final IOSession iosession;
        if (ioctrl instanceof ManagedNHttpClientConnection) {
            final ManagedNHttpClientConnection conn = (ManagedNHttpClientConnection) ioctrl;
            iosession = conn != null ? conn.getIOSession() : null;
        } else {
            iosession = null;
        }
        while (!this.isDone()) {
            final int bytesRead = decoder.read(this.bbuf);
View Full Code Here


        Asserts.notNull(this.bbuf, "Byte buffer");

        //FIXME: IOControl needs to expose event mask in order to avoid this extreme ugliness
        final IOSession iosession;
        if (ioctrl instanceof ManagedNHttpClientConnection) {
            final ManagedNHttpClientConnection conn = (ManagedNHttpClientConnection) ioctrl;
            iosession = conn != null ? conn.getIOSession() : null;
        } else {
            iosession = null;
        }
        while (!this.isDone()) {
            final int bytesRead = decoder.read(this.bbuf);
View Full Code Here

        }
        return local.getConnection();
    }

    ManagedNHttpClientConnection getValidConnection() {
        final ManagedNHttpClientConnection conn = getConnection();
        if (conn == null) {
            throw new ConnectionShutdownException();
        }
        return conn;
    }
View Full Code Here

    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("CPoolProxy{");
        final ManagedNHttpClientConnection conn = getConnection();
        if (conn != null) {
            sb.append(conn);
        } else {
            sb.append("detached");
        }
View Full Code Here

                    " protocol is not supported");
        }
        if (sf.isLayeringRequired()) {
            synchronized (managedConn) {
                final CPoolEntry entry = CPoolProxy.getPoolEntry(managedConn);
                final ManagedNHttpClientConnection conn = entry.getConnection();
                final IOSession currentSession = sf.upgrade(host, conn.getIOSession());
                conn.bind(currentSession);
            }
        }
    }
View Full Code Here

            throw new UnsupportedSchemeException(host.getSchemeName() +
                    " protocol does not support connection upgrade");
        }
        synchronized (managedConn) {
            final CPoolEntry entry = CPoolProxy.getPoolEntry(managedConn);
            final ManagedNHttpClientConnection conn = entry.getConnection();
            final IOSession currentSession = sf.upgrade(host, conn.getIOSession());
            conn.bind(currentSession);
        }
    }
View Full Code Here

                config = this.configData.getDefaultConnectionConfig();
            }
            if (config == null) {
                config = ConnectionConfig.DEFAULT;
            }
            final ManagedNHttpClientConnection conn = this.connFactory.create(iosession, config);
            iosession.setAttribute(IOEventDispatch.CONNECTION_KEY, conn);
            return conn;
        }
View Full Code Here

            chardecoder.onUnmappableCharacter(unmappableInputAction);
            charencoder = charset.newEncoder();
            charencoder.onMalformedInput(malformedInputAction);
            charencoder.onUnmappableCharacter(unmappableInputAction);
        }
        final ManagedNHttpClientConnection conn = new ManagedNHttpClientConnectionImpl(
                id,
                this.log,
                this.headerlog,
                this.wirelog,
                iosession,
View Full Code Here

        if (sf == null) {
            throw new IOException("Unsupported scheme: " + host.getSchemeName());
        }
        synchronized (managedConn) {
            final CPoolEntry entry = CPoolProxy.getPoolEntry(managedConn);
            final ManagedNHttpClientConnection conn = entry.getConnection();
            final IOSession currentSession = sf.create(host, conn.getIOSession());
            conn.bind(currentSession);
        }
    }
View Full Code Here

        if (sf == null) {
            throw new IOException("Unsupported scheme: " + host.getSchemeName());
        }
        synchronized (managedConn) {
            final CPoolEntry entry = CPoolProxy.getPoolEntry(managedConn);
            final ManagedNHttpClientConnection conn = entry.getConnection();
            Asserts.check(sf.isLayering(), "Layering is not supported for this scheme");
            final IOSession currentSession = sf.create(host, conn.getIOSession());
            conn.bind(currentSession);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.http.nio.conn.ManagedNHttpClientConnection

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.