Example usage for org.apache.http.nio.protocol HttpAsyncResponseConsumer failed

List of usage examples for org.apache.http.nio.protocol HttpAsyncResponseConsumer failed

Introduction

In this page you can find the example usage for org.apache.http.nio.protocol HttpAsyncResponseConsumer failed.

Prototype

void failed(Exception ex);

Source Link

Document

Invoked to signal that the response processing terminated abnormally.

Usage

From source file:org.apache.http.impl.nio.client.PipeliningClientExchangeHandlerImpl.java

@Override
void executionFailed(final Exception ex) {
    final HttpAsyncRequestProducer requestProducer = this.requestProducerRef.get();
    if (requestProducer != null) {
        requestProducer.failed(ex);// ww w  . jav a 2  s.c  o m
    }
    final HttpAsyncResponseConsumer<T> responseConsumer = this.responseConsumerRef.get();
    if (responseConsumer != null) {
        responseConsumer.failed(ex);
    }
    for (final HttpAsyncResponseConsumer<T> cancellable : this.responseConsumerQueue) {
        cancellable.cancel();
    }
}