@Deprecated public class MockHttpClientConnection extends Object implements org.apache.http.HttpClientConnection
HttpClientConnection specifically for use in mocked connections using the MockHttpConnection class.
This implementation is NOT thread safe.| Constructor and Description |
|---|
MockHttpClientConnection(MockHttpConnection c)
Deprecated.
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Deprecated.
|
void |
flush()
Deprecated.
|
org.apache.http.HttpConnectionMetrics |
getMetrics()
Deprecated.
|
int |
getSocketTimeout()
Deprecated.
|
boolean |
isOpen()
Deprecated.
|
boolean |
isResponseAvailable(int timeout)
Deprecated.
|
boolean |
isStale()
Deprecated.
|
void |
receiveResponseEntity(org.apache.http.HttpResponse response)
Deprecated.
|
org.apache.http.HttpResponse |
receiveResponseHeader()
Deprecated.
|
void |
sendRequestEntity(org.apache.http.HttpEntityEnclosingRequest request)
Deprecated.
|
void |
sendRequestHeader(org.apache.http.HttpRequest request)
Deprecated.
|
void |
setSocketTimeout(int timeout)
Deprecated.
|
void |
shutdown()
Deprecated.
|
public MockHttpClientConnection(MockHttpConnection c)
c - The API for performing the connections.public void close() throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface org.apache.http.HttpConnectionIOExceptionpublic boolean isOpen()
isOpen in interface org.apache.http.HttpConnectionpublic boolean isStale()
isStale in interface org.apache.http.HttpConnectionpublic void setSocketTimeout(int timeout)
setSocketTimeout in interface org.apache.http.HttpConnectionpublic int getSocketTimeout()
getSocketTimeout in interface org.apache.http.HttpConnectionpublic void shutdown() throws IOException
shutdown in interface org.apache.http.HttpConnectionIOExceptionpublic org.apache.http.HttpConnectionMetrics getMetrics()
getMetrics in interface org.apache.http.HttpConnectionpublic boolean isResponseAvailable(int timeout) throws IOException
isResponseAvailable in interface org.apache.http.HttpClientConnectionIOExceptionpublic void sendRequestHeader(org.apache.http.HttpRequest request) throws org.apache.http.HttpException, IOException
sendRequestHeader in interface org.apache.http.HttpClientConnectionorg.apache.http.HttpExceptionIOExceptionpublic void sendRequestEntity(org.apache.http.HttpEntityEnclosingRequest request) throws org.apache.http.HttpException, IOException
sendRequestEntity in interface org.apache.http.HttpClientConnectionorg.apache.http.HttpExceptionIOExceptionpublic org.apache.http.HttpResponse receiveResponseHeader() throws org.apache.http.HttpException, IOException
receiveResponseHeader in interface org.apache.http.HttpClientConnectionorg.apache.http.HttpExceptionIOExceptionpublic void receiveResponseEntity(org.apache.http.HttpResponse response) throws org.apache.http.HttpException, IOException
receiveResponseEntity in interface org.apache.http.HttpClientConnectionorg.apache.http.HttpExceptionIOExceptionpublic void flush() throws IOException
flush in interface org.apache.http.HttpClientConnectionIOExceptionCopyright © 2016–2019 The Apache Software Foundation. All rights reserved.