Search in sources :

Example 31 with OperatedClientConnection

use of org.apache.http.conn.OperatedClientConnection in project XobotOS by xamarin.

the class AbstractClientConnAdapter method getMetrics.

// non-javadoc, see interface HttpConnection
public HttpConnectionMetrics getMetrics() {
    OperatedClientConnection conn = getWrappedConnection();
    assertValid(conn);
    return conn.getMetrics();
}
Also used : OperatedClientConnection(org.apache.http.conn.OperatedClientConnection)

Example 32 with OperatedClientConnection

use of org.apache.http.conn.OperatedClientConnection in project robovm by robovm.

the class AbstractClientConnAdapter method receiveResponseHeader.

// non-javadoc, see interface HttpClientConnection
public HttpResponse receiveResponseHeader() throws HttpException, IOException {
    assertNotAborted();
    OperatedClientConnection conn = getWrappedConnection();
    assertValid(conn);
    unmarkReusable();
    return conn.receiveResponseHeader();
}
Also used : OperatedClientConnection(org.apache.http.conn.OperatedClientConnection)

Example 33 with OperatedClientConnection

use of org.apache.http.conn.OperatedClientConnection in project robovm by robovm.

the class AbstractClientConnAdapter method getLocalPort.

// non-javadoc, see interface HttpInetConnection
public int getLocalPort() {
    OperatedClientConnection conn = getWrappedConnection();
    assertValid(conn);
    return conn.getLocalPort();
}
Also used : OperatedClientConnection(org.apache.http.conn.OperatedClientConnection)

Example 34 with OperatedClientConnection

use of org.apache.http.conn.OperatedClientConnection in project robovm by robovm.

the class RouteSpecificPool method allocEntry.

/**
     * Obtains a free entry from this pool, if one is available.
     *
     * @return an available pool entry, or <code>null</code> if there is none
     */
public BasicPoolEntry allocEntry(final Object state) {
    if (!freeEntries.isEmpty()) {
        ListIterator<BasicPoolEntry> it = freeEntries.listIterator(freeEntries.size());
        while (it.hasPrevious()) {
            BasicPoolEntry entry = it.previous();
            if (LangUtils.equals(state, entry.getState())) {
                it.remove();
                return entry;
            }
        }
    }
    if (!freeEntries.isEmpty()) {
        BasicPoolEntry entry = freeEntries.remove();
        entry.setState(null);
        OperatedClientConnection conn = entry.getConnection();
        try {
            conn.close();
        } catch (IOException ex) {
            log.debug("I/O error closing connection", ex);
        }
        return entry;
    }
    return null;
}
Also used : OperatedClientConnection(org.apache.http.conn.OperatedClientConnection) IOException(java.io.IOException)

Example 35 with OperatedClientConnection

use of org.apache.http.conn.OperatedClientConnection in project robovm by robovm.

the class AbstractClientConnAdapter method getRemoteAddress.

// non-javadoc, see interface HttpInetConnection
public InetAddress getRemoteAddress() {
    OperatedClientConnection conn = getWrappedConnection();
    assertValid(conn);
    return conn.getRemoteAddress();
}
Also used : OperatedClientConnection(org.apache.http.conn.OperatedClientConnection)

Aggregations

OperatedClientConnection (org.apache.http.conn.OperatedClientConnection)61 InterruptedIOException (java.io.InterruptedIOException)5 IOException (java.io.IOException)4 Socket (java.net.Socket)4 SSLSession (javax.net.ssl.SSLSession)4 SSLSocket (javax.net.ssl.SSLSocket)4 RouteTracker (org.apache.http.conn.routing.RouteTracker)4 ConnectionShutdownException (org.apache.http.impl.conn.ConnectionShutdownException)4 HttpHost (org.apache.http.HttpHost)3