com.groupbyinc.flux.common.http.impl.nio.client.PipeliningClientExchangeHandlerImpl.class Maven / Gradle / Ivy
???? 2? Scom/groupbyinc/flux/common/http/impl/nio/client/PipeliningClientExchangeHandlerImpl eLcom/groupbyinc/flux/common/http/impl/nio/client/AbstractClientExchangeHandler; Mcom/groupbyinc/flux/common/http/impl/nio/client/AbstractClientExchangeHandler (PipeliningClientExchangeHandlerImpl.java 8Lcom/groupbyinc/flux/common/http/nio/protocol/Pipelined; target *Lcom/groupbyinc/flux/common/http/HttpHost; requestProducerQueue Ljava/util/Queue; ZLjava/util/Queue; responseConsumerQueue `Ljava/util/Queue;>; requestQueue @Ljava/util/Queue; resultQueue Ljava/util/Queue; localContext CLcom/groupbyinc/flux/common/http/client/protocol/HttpClientContext; resultFuture 8Lcom/groupbyinc/flux/common/http/concurrent/BasicFuture; OLcom/groupbyinc/flux/common/http/concurrent/BasicFuture;>;
httpProcessor 8Lcom/groupbyinc/flux/common/http/protocol/HttpProcessor; requestProducerRef -Ljava/util/concurrent/atomic/AtomicReference; vLjava/util/concurrent/atomic/AtomicReference; responseConsumerRef |Ljava/util/concurrent/atomic/AtomicReference;>; ?(Lcom/groupbyinc/flux/common/apache/commons/logging/Log;Lcom/groupbyinc/flux/common/http/HttpHost;Ljava/util/List;Ljava/util/List;Lcom/groupbyinc/flux/common/http/client/protocol/HttpClientContext;Lcom/groupbyinc/flux/common/http/concurrent/BasicFuture;Lcom/groupbyinc/flux/common/http/nio/conn/NHttpClientConnectionManager;Lcom/groupbyinc/flux/common/http/protocol/HttpProcessor;Lcom/groupbyinc/flux/common/http/ConnectionReuseStrategy;Lcom/groupbyinc/flux/common/http/conn/ConnectionKeepAliveStrategy;)Vw(Lcom/groupbyinc/flux/common/apache/commons/logging/Log;Lcom/groupbyinc/flux/common/http/client/protocol/HttpClientContext;Lcom/groupbyinc/flux/common/http/concurrent/BasicFuture;Lcom/groupbyinc/flux/common/http/nio/conn/NHttpClientConnectionManager;Lcom/groupbyinc/flux/common/http/ConnectionReuseStrategy;Lcom/groupbyinc/flux/common/http/conn/ConnectionKeepAliveStrategy;)V !
" HTTP target $ )com/groupbyinc/flux/common/http/util/Args & notNull 8(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object; ( )
' * Request producer list , notEmpty @(Ljava/util/Collection;Ljava/lang/String;)Ljava/util/Collection; . /
' 0 Response consumer list 2 java/util/List 4 size ()I 6 7 5 8 5com/groupbyinc/flux/common/apache/commons/logging/Log : (com/groupbyinc/flux/common/http/HttpHost < Acom/groupbyinc/flux/common/http/client/protocol/HttpClientContext > 6com/groupbyinc/flux/common/http/concurrent/BasicFuture @ Ecom/groupbyinc/flux/common/http/nio/conn/NHttpClientConnectionManager B 6com/groupbyinc/flux/common/http/protocol/HttpProcessor D 7com/groupbyinc/flux/common/http/ConnectionReuseStrategy F @com/groupbyinc/flux/common/http/conn/ConnectionKeepAliveStrategy H ENumber of request producers does not match that of response consumers J check (ZLjava/lang/String;)V L M
' N P *java/util/concurrent/ConcurrentLinkedQueue R (Ljava/util/Collection;)V T
S U
W
Y ()V [
S \ ^ ` b d f +java/util/concurrent/atomic/AtomicReference h (Ljava/lang/Object;)V j
i k m o this ZLcom/groupbyinc/flux/common/http/impl/nio/client/PipeliningClientExchangeHandlerImpl; ULcom/groupbyinc/flux/common/http/impl/nio/client/PipeliningClientExchangeHandlerImpl; log 7Lcom/groupbyinc/flux/common/apache/commons/logging/Log; requestProducers ZLjava/util/List<+Lcom/groupbyinc/flux/common/http/nio/protocol/HttpAsyncRequestProducer;>; Ljava/util/List; responseConsumers `Ljava/util/List<+Lcom/groupbyinc/flux/common/http/nio/protocol/HttpAsyncResponseConsumer;>; connmgr GLcom/groupbyinc/flux/common/http/nio/conn/NHttpClientConnectionManager; connReuseStrategy 9Lcom/groupbyinc/flux/common/http/ConnectionReuseStrategy; keepaliveStrategy BLcom/groupbyinc/flux/common/http/conn/ConnectionKeepAliveStrategy;
closeProducer J(Lcom/groupbyinc/flux/common/http/nio/protocol/HttpAsyncRequestProducer;)V java/io/IOException ? Ecom/groupbyinc/flux/common/http/nio/protocol/HttpAsyncRequestProducer ? close ? [ ? ? t u ? "I/O error closing request producer ? debug *(Ljava/lang/Object;Ljava/lang/Throwable;)V ? ? ; ? ex Ljava/io/IOException; requestProducer GLcom/groupbyinc/flux/common/http/nio/protocol/HttpAsyncRequestProducer;
closeConsumer K(Lcom/groupbyinc/flux/common/http/nio/protocol/HttpAsyncResponseConsumer;)V Fcom/groupbyinc/flux/common/http/nio/protocol/HttpAsyncResponseConsumer ? ? ? #I/O error closing response consumer ? responseConsumer KLcom/groupbyinc/flux/common/http/nio/protocol/HttpAsyncResponseConsumer<*>; HLcom/groupbyinc/flux/common/http/nio/protocol/HttpAsyncResponseConsumer; releaseResources getAndSet &(Ljava/lang/Object;)Ljava/lang/Object; ? ?
i ? ? ?
? ? ?
? java/util/Queue ? isEmpty ()Z ? ? ? ? remove ()Ljava/lang/Object; ? ? ? ? clear ? [ ? ? executionFailed (Ljava/lang/Exception;)V get ? ?
i ? failed ? ? ? ? ? ? iterator ()Ljava/util/Iterator; ? ? ? ? java/util/Iterator ? hasNext ? ? ? ? next ? ? ? ? cancel ? ? ? ? cancellable MLcom/groupbyinc/flux/common/http/nio/protocol/HttpAsyncResponseConsumer; i$ Ljava/util/Iterator; Ljava/lang/Exception; executionCancelled
A ? cancelled Z start -com/groupbyinc/flux/common/http/HttpException ? isDebugEnabled ? ? ; ? java/lang/StringBuilder ?
? \ [exchange: ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? getId ()J ? ?
? (J)Ljava/lang/StringBuilder; ? ?
? ? ] start execution ? toString ()Ljava/lang/String; ? ?
? ? ? j ; ? 6com/groupbyinc/flux/common/http/conn/routing/HttpRoute ? -(Lcom/groupbyinc/flux/common/http/HttpHost;)V ?
? ? setRoute ;(Lcom/groupbyinc/flux/common/http/conn/routing/HttpRoute;)V ? ?
? http.target_host ? setAttribute '(Ljava/lang/String;Ljava/lang/Object;)V
?
http.route requestConnection [
route 8Lcom/groupbyinc/flux/common/http/conn/routing/HttpRoute; generateRequest /()Lcom/groupbyinc/flux/common/http/HttpRequest; verifytRoute
[
isRouteEstablished ?
onRouteToTarget [
onRouteComplete [
getConnection =()Lcom/groupbyinc/flux/common/http/nio/NHttpClientConnection;
http.connection 9com/groupbyinc/flux/common/http/nio/NHttpClientConnection 7Inconsistent state: currentRequest producer is not null! ,com/groupbyinc/flux/common/http/util/Asserts#
$ N poll&