public class MockHttpClientConnectionManager extends Object implements org.apache.http.conn.HttpClientConnectionManager
HttpClientConnectionManager
specifically for use in mocked connections using the MockHttpConnection
class.
This implementation is NOT thread safe.Constructor and Description |
---|
MockHttpClientConnectionManager(MockHttpConnection c)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
closeExpiredConnections() |
void |
closeIdleConnections(long idletime,
TimeUnit tunit) |
void |
connect(org.apache.http.HttpClientConnection conn,
org.apache.http.conn.routing.HttpRoute route,
int connectTimeout,
org.apache.http.protocol.HttpContext context) |
void |
releaseConnection(org.apache.http.HttpClientConnection conn,
Object newState,
long validDuration,
TimeUnit timeUnit) |
org.apache.http.conn.ConnectionRequest |
requestConnection(org.apache.http.conn.routing.HttpRoute route,
Object state) |
void |
routeComplete(org.apache.http.HttpClientConnection conn,
org.apache.http.conn.routing.HttpRoute route,
org.apache.http.protocol.HttpContext context) |
void |
shutdown() |
void |
upgrade(org.apache.http.HttpClientConnection conn,
org.apache.http.conn.routing.HttpRoute route,
org.apache.http.protocol.HttpContext context) |
public MockHttpClientConnectionManager(MockHttpConnection c)
c
- The mocked connection.public org.apache.http.conn.ConnectionRequest requestConnection(org.apache.http.conn.routing.HttpRoute route, Object state)
requestConnection
in interface org.apache.http.conn.HttpClientConnectionManager
public void releaseConnection(org.apache.http.HttpClientConnection conn, Object newState, long validDuration, TimeUnit timeUnit)
releaseConnection
in interface org.apache.http.conn.HttpClientConnectionManager
public void connect(org.apache.http.HttpClientConnection conn, org.apache.http.conn.routing.HttpRoute route, int connectTimeout, org.apache.http.protocol.HttpContext context) throws IOException
connect
in interface org.apache.http.conn.HttpClientConnectionManager
IOException
public void upgrade(org.apache.http.HttpClientConnection conn, org.apache.http.conn.routing.HttpRoute route, org.apache.http.protocol.HttpContext context) throws IOException
upgrade
in interface org.apache.http.conn.HttpClientConnectionManager
IOException
public void routeComplete(org.apache.http.HttpClientConnection conn, org.apache.http.conn.routing.HttpRoute route, org.apache.http.protocol.HttpContext context) throws IOException
routeComplete
in interface org.apache.http.conn.HttpClientConnectionManager
IOException
public void closeIdleConnections(long idletime, TimeUnit tunit)
closeIdleConnections
in interface org.apache.http.conn.HttpClientConnectionManager
public void closeExpiredConnections()
closeExpiredConnections
in interface org.apache.http.conn.HttpClientConnectionManager
public void shutdown()
shutdown
in interface org.apache.http.conn.HttpClientConnectionManager
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.