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();
}
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();
}
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();
}
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;
}
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();
}
Aggregations