HttpClientConnection.
| Modifier and Type | Field and Description |
|---|---|
| private final HttpMessageWriter | |
| private final HttpMessageParser |
| Access | Constructor and Description |
|---|---|
| public | DefaultBHttpClientConnection(final int
buffer size. Must be a positive number. bufferSize, final int fragment size hint. fragmentSizeHint, final CharsetDecoder decoder to be used for decoding HTTP protocol elements.
If charDecoder, final CharsetEncoder null simple type cast will be used for byte to char conversion.encoder to be used for encoding HTTP protocol elements.
If charEncoder, final MessageConstraints null simple type cast will be used for char to byte conversion.Message constraints. If constraints, final ContentLengthStrategy null
MessageConstraints#DEFAULT will be used.incoming content length strategy. If incomingContentStrategy, final ContentLengthStrategy null
org. will be used.outgoing content length strategy. If outgoingContentStrategy, final HttpMessageWriterFactory<HttpRequest> null
org. will be used.request writer factory. If requestWriterFactory, final HttpMessageParserFactory<HttpResponse> null
DefaultHttpRequestWriterFactory#INSTANCE will be used.response parser factory. If responseParserFactory)null
DefaultHttpResponseParserFactory#INSTANCE will be used.Creates new instance of DefaultBHttpClientConnection. |
| public | DefaultBHttpClientConnection(final int bufferSize, final CharsetDecoder charDecoder, final CharsetEncoder charEncoder, final MessageConstraints constraints)
|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | bind(final Socket
the socket. socket)Overrides org. Socket.
|
| public void | flush()
Implements org. |
| public boolean | isResponseAvailable(final int
the maximum time in milliseconds to wait for data timeout)Implements org. |
| protected void | |
| protected void | |
| public void | receiveResponseEntity(final HttpResponse
the response to attach the entity to response)Implements org. |
| public HttpResponse | receiveResponseHeader()
Implements org. |
| public void | sendRequestEntity(final HttpEntityEnclosingRequest
the request whose entity to send. request)Implements org. |
| public void | sendRequestHeader(final HttpRequest
the request whose headers to send. request)Implements org. |
| requestWriter | back to summary |
|---|---|
| private final HttpMessageWriter<HttpRequest> requestWriter | |
| responseParser | back to summary |
|---|---|
| private final HttpMessageParser<HttpResponse> responseParser | |
| DefaultBHttpClientConnection | back to summary |
|---|---|
| public DefaultBHttpClientConnection(final int bufferSize, final int fragmentSizeHint, final CharsetDecoder charDecoder, final CharsetEncoder charEncoder, final MessageConstraints constraints, final ContentLengthStrategy incomingContentStrategy, final ContentLengthStrategy outgoingContentStrategy, final HttpMessageWriterFactory<HttpRequest> requestWriterFactory, final HttpMessageParserFactory<HttpResponse> responseParserFactory) Creates new instance of DefaultBHttpClientConnection.
| |
| DefaultBHttpClientConnection | back to summary |
|---|---|
| public DefaultBHttpClientConnection(final int bufferSize, final CharsetDecoder charDecoder, final CharsetEncoder charEncoder, final MessageConstraints constraints) | |
| DefaultBHttpClientConnection | back to summary |
|---|---|
| public DefaultBHttpClientConnection(final int bufferSize) | |
| bind | back to summary |
|---|---|
| public void bind(final Socket socket) throws IOException Overrides org. Doc from org. Binds this connection to the given
After this method's execution the connection status will be reported
as open and the
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Implements org. Doc from org. Writes out all pending buffered data over the open connection.
| |
| isResponseAvailable | back to summary |
|---|---|
| public boolean isResponseAvailable(final int timeout) throws IOException Implements org. Doc from org. Checks if response data is available from the connection. May wait for the specified time until some data becomes available. Note that some implementations may completely ignore the timeout parameter.
| |
| onRequestSubmitted | back to summary |
|---|---|
| protected void onRequestSubmitted(final HttpRequest request) | |
| onResponseReceived | back to summary |
|---|---|
| protected void onResponseReceived(final HttpResponse response) | |
| receiveResponseEntity | back to summary |
|---|---|
| public void receiveResponseEntity(final HttpResponse response) throws HttpException, IOException Implements org. Doc from org. Receives the next response entity available from this connection and attaches it to an existing HttpResponse object.
| |
| receiveResponseHeader | back to summary |
|---|---|
| public HttpResponse receiveResponseHeader() throws HttpException, IOException Implements org. Doc from org. Receives the request line and headers of the next response available from this connection. The caller should examine the HttpResponse object to find out if it should try to receive a response entity as well.
| |
| sendRequestEntity | back to summary |
|---|---|
| public void sendRequestEntity(final HttpEntityEnclosingRequest request) throws HttpException, IOException Implements org. Doc from org. Sends the request entity over the connection.
| |
| sendRequestHeader | back to summary |
|---|---|
| public void sendRequestHeader(final HttpRequest request) throws HttpException, IOException Implements org. Doc from org. Sends the request line and all headers over the connection.
| |