DefaultBHttpClientConnection@Deprecated public abstract class AbstractHttpClientConnection extends Object implements HttpClientConnection
SessionInputBuffer and
SessionOutputBuffer implementations.
The following parameters can be used to customize the behavior of this class:
| Constructor and Description |
|---|
AbstractHttpClientConnection()
Deprecated.
Creates an instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
Deprecated.
Writes out all pending buffered data over the open connection.
|
HttpConnectionMetrics |
getMetrics()
Deprecated.
Returns a collection of connection metrics.
|
boolean |
isResponseAvailable(int timeout)
Deprecated.
Checks if response data is available from the connection.
|
boolean |
isStale()
Deprecated.
Checks whether this connection has gone down.
|
void |
receiveResponseEntity(HttpResponse response)
Deprecated.
Receives the next response entity available from this connection and
attaches it to an existing HttpResponse object.
|
HttpResponse |
receiveResponseHeader()
Deprecated.
Receives the request line and headers of the next response available from
this connection.
|
void |
sendRequestEntity(HttpEntityEnclosingRequest request)
Deprecated.
Sends the request entity over the connection.
|
void |
sendRequestHeader(HttpRequest request)
Deprecated.
Sends the request line and all headers over the connection.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getSocketTimeout, isOpen, setSocketTimeout, shutdownpublic AbstractHttpClientConnection()
This constructor will invoke createEntityDeserializer()
and createEntitySerializer() methods in order to initialize
HTTP entity serializer and deserializer implementations for this
connection.
public boolean isResponseAvailable(int timeout)
throws IOException
HttpClientConnectionisResponseAvailable in interface HttpClientConnectiontimeout - the maximum time in milliseconds to wait for datatimeout milliseconds.IOException - if an error happens on the connectionpublic void sendRequestHeader(HttpRequest request) throws HttpException, IOException
HttpClientConnectionsendRequestHeader in interface HttpClientConnectionrequest - the request whose headers to send.HttpException - in case of HTTP protocol violationIOException - in case of an I/O errorpublic void sendRequestEntity(HttpEntityEnclosingRequest request) throws HttpException, IOException
HttpClientConnectionsendRequestEntity in interface HttpClientConnectionrequest - the request whose entity to send.HttpException - in case of HTTP protocol violationIOException - in case of an I/O errorpublic void flush()
throws IOException
HttpClientConnectionflush in interface HttpClientConnectionIOException - in case of an I/O errorpublic HttpResponse receiveResponseHeader() throws HttpException, IOException
HttpClientConnectionreceiveResponseHeader in interface HttpClientConnectionHttpException - in case of HTTP protocol violationIOException - in case of an I/O errorpublic void receiveResponseEntity(HttpResponse response) throws HttpException, IOException
HttpClientConnectionreceiveResponseEntity in interface HttpClientConnectionresponse - the response to attach the entity toHttpException - in case of HTTP protocol violationIOException - in case of an I/O errorpublic boolean isStale()
HttpConnectionisStale in interface HttpConnectiontrue if attempts to use this connection are
likely to succeed, or false if they are likely
to fail and this connection should be closedpublic HttpConnectionMetrics getMetrics()
HttpConnectiongetMetrics in interface HttpConnectionCopyright © 2010 - 2020 Adobe. All Rights Reserved