Package org.apache.http.nio.conn

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


    }

    public synchronized void submitRequest(
            final HttpRequest request) throws IOException, HttpException {
        assertValid();
        OperatedClientConnection conn = getWrappedConnection();
        conn.submitRequest(request);
    }
View Full Code Here


                ssliosession.bind(SSLMode.CLIENT, params);
                iosession = ssliosession;
            }
        }

        OperatedClientConnection conn = new DefaultClientConnection(
                iosession, createHttpResponseFactory(), createByteBufferAllocator(), params);
        iosession.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);

        this.conn = conn;
        if (proxy == null) {
            tracker.connectTarget(conn.getSSLIOSession() != null);
        } else {
            tracker.connectProxy(proxy, false);
        }
    }
View Full Code Here

            throw new IllegalStateException("HTTP connection is null");
        }
    }

    public void connected(final IOSession session) {
        OperatedClientConnection conn = getConnection(session);
        assertValid(conn);
        Object attachment = session.getAttribute(IOSession.ATTACHMENT_KEY);
        this.handler.connected(conn, attachment);
    }
View Full Code Here

        Object attachment = session.getAttribute(IOSession.ATTACHMENT_KEY);
        this.handler.connected(conn, attachment);
    }

    public void disconnected(final IOSession session) {
        OperatedClientConnection conn = getConnection(session);
        if (conn != null) {
            this.handler.closed(conn);
        }
    }
View Full Code Here

            this.handler.closed(conn);
        }
    }

    public void inputReady(final IOSession session) {
        OperatedClientConnection conn = getConnection(session);
        assertValid(conn);
        SSLIOSession ssliosession = conn.getSSLIOSession();
        if (ssliosession == null) {
            conn.consumeInput(this.handler);
        } else {
            try {
                if (ssliosession.isAppInputReady()) {
                    conn.consumeInput(this.handler);
                }
                ssliosession.inboundTransport();
            } catch (IOException ex) {
                this.handler.exception(conn, ex);
                ssliosession.shutdown();
View Full Code Here

            }
        }
    }

    public void outputReady(final IOSession session) {
        OperatedClientConnection conn = getConnection(session);
        assertValid(conn);
        SSLIOSession ssliosession = conn.getSSLIOSession();
        if (ssliosession == null) {
            conn.produceOutput(this.handler);
        } else {
            try {
                if (ssliosession.isAppOutputReady()) {
                    conn.produceOutput(this.handler);
                }
                ssliosession.outboundTransport();
            } catch (IOException ex) {
                this.handler.exception(conn, ex);
                ssliosession.shutdown();
View Full Code Here

            }
        }
    }

    public void timeout(IOSession session) {
        OperatedClientConnection conn = getConnection(session);
        if (conn != null) {
            SSLIOSession ssliosession = conn.getSSLIOSession();
            if (ssliosession == null) {
                this.handler.timeout(conn);
            } else {
                this.handler.timeout(conn);
                synchronized (ssliosession) {
View Full Code Here

            throw new ConnectionShutdownException();
        }
    }

    private OperatedClientConnection getWrappedConnection() {
        OperatedClientConnection conn = this.conn;
        if (conn == null) {
            throw new ConnectionShutdownException();
        }
        return conn;
    }
View Full Code Here

        return this.entry.getEffectiveRoute();
    }

    public synchronized HttpConnectionMetrics getMetrics() {
        assertValid();
        OperatedClientConnection conn = getWrappedConnection();
        return conn.getMetrics();
    }
View Full Code Here

        return conn.getMetrics();
    }

    public synchronized int getSocketTimeout() {
        assertValid();
        OperatedClientConnection conn = getWrappedConnection();
        return conn.getSocketTimeout();
    }
View Full Code Here

TOP

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

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.