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

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

Introduction

In this page you can find the example usage for org.apache.http.nio.protocol HttpAsyncRequestProducer 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);
    }//w w  w  .  ja v  a  2 s.c om
    final HttpAsyncResponseConsumer<T> responseConsumer = this.responseConsumerRef.get();
    if (responseConsumer != null) {
        responseConsumer.failed(ex);
    }
    for (final HttpAsyncResponseConsumer<T> cancellable : this.responseConsumerQueue) {
        cancellable.cancel();
    }
}