Information response (1xx) processing
This commit is contained in:
parent
669020ccac
commit
b717fde289
|
@ -180,6 +180,10 @@ class AsyncCachingExec extends CachingExecBase implements AsyncExecChainHandler
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleInformationResponse(final HttpResponse response) throws HttpException, IOException {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void completed() {
|
public void completed() {
|
||||||
command.run();
|
command.run();
|
||||||
|
@ -316,6 +320,16 @@ class AsyncCachingExec extends CachingExecBase implements AsyncExecChainHandler
|
||||||
return callback.handleResponse(backendResponse, entityDetails);
|
return callback.handleResponse(backendResponse, entityDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleInformationResponse(final HttpResponse response) throws HttpException, IOException {
|
||||||
|
final AsyncExecCallback callback = callbackRef.getAndSet(null);
|
||||||
|
if (callback != null) {
|
||||||
|
callback.handleInformationResponse(response);
|
||||||
|
} else {
|
||||||
|
asyncExecCallback.handleInformationResponse(response);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void completed() {
|
public void completed() {
|
||||||
final AsyncExecCallback callback = callbackRef.getAndSet(null);
|
final AsyncExecCallback callback = callbackRef.getAndSet(null);
|
||||||
|
@ -501,6 +515,11 @@ class AsyncCachingExec extends CachingExecBase implements AsyncExecChainHandler
|
||||||
return asyncExecCallback.handleResponse(backendResponse, entityDetails);
|
return asyncExecCallback.handleResponse(backendResponse, entityDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleInformationResponse(final HttpResponse response) throws HttpException, IOException {
|
||||||
|
asyncExecCallback.handleInformationResponse(response);
|
||||||
|
}
|
||||||
|
|
||||||
void triggerNewCacheEntryResponse(final HttpResponse backendResponse, final Date responseDate, final ByteArrayBuffer buffer) {
|
void triggerNewCacheEntryResponse(final HttpResponse backendResponse, final Date responseDate, final ByteArrayBuffer buffer) {
|
||||||
final CancellableDependency operation = scope.cancellableDependency;
|
final CancellableDependency operation = scope.cancellableDependency;
|
||||||
operation.setDependency(responseCache.createCacheEntry(
|
operation.setDependency(responseCache.createCacheEntry(
|
||||||
|
@ -789,6 +808,16 @@ class AsyncCachingExec extends CachingExecBase implements AsyncExecChainHandler
|
||||||
return callback2.handleResponse(backendResponse2, entityDetails);
|
return callback2.handleResponse(backendResponse2, entityDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleInformationResponse(final HttpResponse response) throws HttpException, IOException {
|
||||||
|
final AsyncExecCallback callback2 = callbackRef.getAndSet(null);
|
||||||
|
if (callback2 != null) {
|
||||||
|
callback2.handleInformationResponse(response);
|
||||||
|
} else {
|
||||||
|
asyncExecCallback.handleInformationResponse(response);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void completed() {
|
public void completed() {
|
||||||
final AsyncExecCallback callback2 = callbackRef.getAndSet(null);
|
final AsyncExecCallback callback2 = callbackRef.getAndSet(null);
|
||||||
|
@ -821,6 +850,16 @@ class AsyncCachingExec extends CachingExecBase implements AsyncExecChainHandler
|
||||||
return callback1.handleResponse(backendResponse1, entityDetails);
|
return callback1.handleResponse(backendResponse1, entityDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleInformationResponse(final HttpResponse response) throws HttpException, IOException {
|
||||||
|
final AsyncExecCallback callback1 = callbackRef.getAndSet(null);
|
||||||
|
if (callback1 != null) {
|
||||||
|
callback1.handleInformationResponse(response);
|
||||||
|
} else {
|
||||||
|
asyncExecCallback.handleInformationResponse(response);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void completed() {
|
public void completed() {
|
||||||
final AsyncExecCallback callback1 = callbackRef.getAndSet(null);
|
final AsyncExecCallback callback1 = callbackRef.getAndSet(null);
|
||||||
|
@ -1028,6 +1067,16 @@ class AsyncCachingExec extends CachingExecBase implements AsyncExecChainHandler
|
||||||
return callback.handleResponse(backendResponse, entityDetails);
|
return callback.handleResponse(backendResponse, entityDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleInformationResponse(final HttpResponse response) throws HttpException, IOException {
|
||||||
|
final AsyncExecCallback callback = callbackRef.getAndSet(null);
|
||||||
|
if (callback != null) {
|
||||||
|
callback.handleInformationResponse(response);
|
||||||
|
} else {
|
||||||
|
asyncExecCallback.handleInformationResponse(response);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void completed() {
|
public void completed() {
|
||||||
final AsyncExecCallback callback = callbackRef.getAndSet(null);
|
final AsyncExecCallback callback = callbackRef.getAndSet(null);
|
||||||
|
|
|
@ -130,6 +130,12 @@ class DefaultAsyncCacheRevalidator extends CacheRevalidatorBase {
|
||||||
return asyncExecCallback.handleResponse(response, entityDetails);
|
return asyncExecCallback.handleResponse(response, entityDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleInformationResponse(
|
||||||
|
final HttpResponse response) throws HttpException, IOException {
|
||||||
|
asyncExecCallback.handleInformationResponse(response);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void completed() {
|
public void completed() {
|
||||||
final HttpResponse httpResponse = responseRef.getAndSet(null);
|
final HttpResponse httpResponse = responseRef.getAndSet(null);
|
||||||
|
|
|
@ -54,6 +54,13 @@ public interface AsyncExecCallback {
|
||||||
HttpResponse response,
|
HttpResponse response,
|
||||||
EntityDetails entityDetails) throws HttpException, IOException;
|
EntityDetails entityDetails) throws HttpException, IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Triggered to signal receipt of an intermediate response message.
|
||||||
|
*
|
||||||
|
* @param response the intermediate response message.
|
||||||
|
*/
|
||||||
|
void handleInformationResponse(HttpResponse response) throws HttpException, IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Triggered to signal completion of the message exchange.
|
* Triggered to signal completion of the message exchange.
|
||||||
* <p>
|
* <p>
|
||||||
|
|
|
@ -255,6 +255,12 @@ public final class AsyncConnectExec implements AsyncExecChainHandler {
|
||||||
return asyncExecCallback.handleResponse(response, entityDetails);
|
return asyncExecCallback.handleResponse(response, entityDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleInformationResponse(
|
||||||
|
final HttpResponse response) throws HttpException, IOException {
|
||||||
|
asyncExecCallback.handleInformationResponse(response);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void completed() {
|
public void completed() {
|
||||||
if (log.isDebugEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
|
@ -359,6 +365,10 @@ public final class AsyncConnectExec implements AsyncExecChainHandler {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleInformationResponse(final HttpResponse response) throws HttpException, IOException {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void completed() {
|
public void completed() {
|
||||||
if (!execRuntime.isEndpointConnected()) {
|
if (!execRuntime.isEndpointConnected()) {
|
||||||
|
|
|
@ -193,6 +193,12 @@ public final class AsyncProtocolExec implements AsyncExecChainHandler {
|
||||||
return asyncExecCallback.handleResponse(response, entityDetails);
|
return asyncExecCallback.handleResponse(response, entityDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleInformationResponse(
|
||||||
|
final HttpResponse response) throws HttpException, IOException {
|
||||||
|
asyncExecCallback.handleInformationResponse(response);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void completed() {
|
public void completed() {
|
||||||
if (!execRuntime.isEndpointConnected()) {
|
if (!execRuntime.isEndpointConnected()) {
|
||||||
|
|
|
@ -192,6 +192,12 @@ public final class AsyncRedirectExec implements AsyncExecChainHandler {
|
||||||
return asyncExecCallback.handleResponse(response, entityDetails);
|
return asyncExecCallback.handleResponse(response, entityDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleInformationResponse(
|
||||||
|
final HttpResponse response) throws HttpException, IOException {
|
||||||
|
asyncExecCallback.handleInformationResponse(response);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void completed() {
|
public void completed() {
|
||||||
if (state.redirectURI == null) {
|
if (state.redirectURI == null) {
|
||||||
|
|
|
@ -92,6 +92,11 @@ public final class AsyncRetryExec implements AsyncExecChainHandler {
|
||||||
return asyncExecCallback.handleResponse(response, entityDetails);
|
return asyncExecCallback.handleResponse(response, entityDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleInformationResponse(final HttpResponse response) throws HttpException, IOException {
|
||||||
|
asyncExecCallback.handleInformationResponse(response);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void completed() {
|
public void completed() {
|
||||||
asyncExecCallback.completed();
|
asyncExecCallback.completed();
|
||||||
|
|
|
@ -181,6 +181,7 @@ class HttpAsyncMainClientExec implements AsyncExecChainHandler {
|
||||||
public void consumeInformation(
|
public void consumeInformation(
|
||||||
final HttpResponse response,
|
final HttpResponse response,
|
||||||
final HttpContext context) throws HttpException, IOException {
|
final HttpContext context) throws HttpException, IOException {
|
||||||
|
asyncExecCallback.handleInformationResponse(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -263,6 +263,12 @@ abstract class InternalAbstractHttpAsyncClient extends AbstractHttpAsyncClientBa
|
||||||
return responseConsumer;
|
return responseConsumer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleInformationResponse(
|
||||||
|
final HttpResponse response) throws HttpException, IOException {
|
||||||
|
responseConsumer.informationResponse(response, context);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void completed() {
|
public void completed() {
|
||||||
if (log.isDebugEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
|
|
Loading…
Reference in New Issue