@Contract(threading=IMMUTABLE) public final class NoResponseOutOfOrderStrategy extends Object implements ResponseOutOfOrderStrategy
ResponseOutOfOrderStrategy
which does not check for early responses.
Early response detection requires 1ms blocking reads and incurs a hefty performance cost for
large uploads.MonitoringResponseOutOfOrderStrategy
Modifier and Type | Field and Description |
---|---|
static NoResponseOutOfOrderStrategy |
INSTANCE |
Constructor and Description |
---|
NoResponseOutOfOrderStrategy() |
Modifier and Type | Method and Description |
---|---|
boolean |
isEarlyResponseDetected(ClassicHttpRequest request,
HttpClientConnection connection,
InputStream inputStream,
long totalBytesSent,
long nextWriteSize)
Called before each write to the to a socket
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. |
public static final NoResponseOutOfOrderStrategy INSTANCE
public boolean isEarlyResponseDetected(ClassicHttpRequest request, HttpClientConnection connection, InputStream inputStream, long totalBytesSent, long nextWriteSize)
ResponseOutOfOrderStrategy
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.isEarlyResponseDetected
in interface ResponseOutOfOrderStrategy
request
- The current request.connection
- The connection used to send the current request.inputStream
- The response stream, this may be used to check for an early response.totalBytesSent
- Number of bytes that have already been sent.nextWriteSize
- The size of a socket write operation that will follow this check.Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.