Top Description Fields Constructors Methods
org.apache.hc.core5.http.impl.io

public final Class NoResponseOutOfOrderStrategy

extends Object
implements ResponseOutOfOrderStrategy
Class Inheritance
All Implemented Interfaces
org.apache.hc.core5.http.io.ResponseOutOfOrderStrategy
Annotations
@Contract
threading:IMMUTABLE
Imports
org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.http.ClassicHttpRequest, org.apache.hc.core5.http.io.HttpClientConnection, .ResponseOutOfOrderStrategy, java.io.InputStream

An implementation of ResponseOutOfOrderStrategy which does not check for early responses. Early response detection requires 1ms blocking reads and incurs a hefty performance cost for large uploads.
Since
5.1
See Also
MonitoringResponseOutOfOrderStrategy

Field Summary

Modifier and TypeField and Description
public static final NoResponseOutOfOrderStrategy

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
isEarlyResponseDetected(final ClassicHttpRequest
The current request.
request
,
final HttpClientConnection
The connection used to send the current request.
connection
,
final InputStream
The response stream, this may be used to check for an early response.
inputStream
,
final long
Number of bytes that have already been sent.
totalBytesSent
,
final long
The size of a socket write operation that will follow this check.
nextWriteSize
)

Implements org.apache.hc.core5.http.io.ResponseOutOfOrderStrategy.isEarlyResponseDetected.

Called before each write to the to a socket java.io.OutputStream with the number of bytes that have already been sent, and the size of the write that will occur if this check does not encounter an out of order response.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final NoResponseOutOfOrderStrategy INSTANCE

Constructor Detail

NoResponseOutOfOrderStrategyback to summary
public NoResponseOutOfOrderStrategy()

Method Detail

isEarlyResponseDetectedback to summary
public boolean isEarlyResponseDetected(final ClassicHttpRequest request, final HttpClientConnection connection, final InputStream inputStream, final long totalBytesSent, final long nextWriteSize)

Implements org.apache.hc.core5.http.io.ResponseOutOfOrderStrategy.isEarlyResponseDetected.

Doc from org.apache.hc.core5.http.io.ResponseOutOfOrderStrategy.isEarlyResponseDetected.

Called before each write to the to a socket java.io.OutputStream with the number of bytes that have already been sent, and the size of the write that will occur if this check does not encounter an out of order response.

Parameters
request:ClassicHttpRequest

The current request.

connection:HttpClientConnection

The connection used to send the current request.

inputStream:InputStream

The response stream, this may be used to check for an early response.

totalBytesSent:long

Number of bytes that have already been sent.

nextWriteSize:long

The size of a socket write operation that will follow this check.

Returns:boolean

True if an early response was detected, otherwise false.

Annotations
@Override