com.groupbyinc.flux.client.RestClient.class Maven / Gradle / Ivy
???? 3? %com/groupbyinc/flux/client/RestClient java/lang/Object java/io/Closeable RestClient.java /com/groupbyinc/flux/client/RestClient$HostTuple HostTuple 5com/groupbyinc/flux/client/RestClient$FailureListener FailureListener :com/groupbyinc/flux/client/RestClient$SyncResponseListener SyncResponseListener Ecom/groupbyinc/flux/client/RestClient$FailureTrackingResponseListener FailureTrackingResponseListener 'com/groupbyinc/flux/client/RestClient$2 'com/groupbyinc/flux/client/RestClient$1 java/util/Map$Entry
java/util/Map Entry logger 7Lcom/groupbyinc/flux/common/apache/commons/logging/Log; client JLcom/groupbyinc/flux/common/http/impl/nio/client/CloseableHttpAsyncClient; defaultHeaders )[Lcom/groupbyinc/flux/common/http/Header; maxRetryTimeoutMillis J
pathPrefix Ljava/lang/String;
lastHostIndex +Ljava/util/concurrent/atomic/AtomicInteger; hostTuple 1Lcom/groupbyinc/flux/client/RestClient$HostTuple; nLcom/groupbyinc/flux/client/RestClient$HostTuple;>; blacklist $Ljava/util/concurrent/ConcurrentMap; zLjava/util/concurrent/ConcurrentMap; failureListener 7Lcom/groupbyinc/flux/client/RestClient$FailureListener; ?(Lcom/groupbyinc/flux/common/http/impl/nio/client/CloseableHttpAsyncClient;J[Lcom/groupbyinc/flux/common/http/Header;[Lcom/groupbyinc/flux/common/http/HttpHost;Ljava/lang/String;Lcom/groupbyinc/flux/client/RestClient$FailureListener;)V ()V 1 3
4 )java/util/concurrent/atomic/AtomicInteger 6 (I)V 1 8
7 9 ' ( ; &java/util/concurrent/ConcurrentHashMap =
> 4 , - @ B # $ D ! " F / 0 H % & J setHosts .([Lcom/groupbyinc/flux/common/http/HttpHost;)V L M
N this 'Lcom/groupbyinc/flux/client/RestClient; hosts +[Lcom/groupbyinc/flux/common/http/HttpHost; builder [([Lcom/groupbyinc/flux/common/http/HttpHost;)Lcom/groupbyinc/flux/client/RestClientBuilder; ,com/groupbyinc/flux/client/RestClientBuilder V 1 M
W X "java/lang/IllegalArgumentException Z hosts must not be null nor empty \ (Ljava/lang/String;)V 1 ^
[ _ java/util/HashSet a
b 4 :com/groupbyinc/flux/common/http/impl/client/BasicAuthCache d
e 4 S
java/util/Set h 0com/groupbyinc/flux/common/http/client/AuthCache j host cannot be null l java/util/Objects n requireNonNull 8(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object; p q
o r add (Ljava/lang/Object;)Z t u i v 5com/groupbyinc/flux/common/http/impl/auth/BasicScheme x
y 4 put ^(Lcom/groupbyinc/flux/common/http/HttpHost;Lcom/groupbyinc/flux/common/http/auth/AuthScheme;)V { | k } java/util/Collections unmodifiableSet (Ljava/util/Set;)Ljava/util/Set; ? ?
? ? G(Ljava/lang/Object;Lcom/groupbyinc/flux/common/http/client/AuthCache;)V 1 ?
? ) * ? "java/util/concurrent/ConcurrentMap ? clear ? 3 ? ? host *Lcom/groupbyinc/flux/common/http/HttpHost; httpHosts ;Ljava/util/Set; Ljava/util/Set; authCache 2Lcom/groupbyinc/flux/common/http/client/AuthCache; performRequest t(Ljava/lang/String;Ljava/lang/String;[Lcom/groupbyinc/flux/common/http/Header;)Lcom/groupbyinc/flux/client/Response; java/io/IOException ? emptyMap ()Ljava/util/Map; ? ?
? ? ?(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Lcom/groupbyinc/flux/common/http/HttpEntity;[Lcom/groupbyinc/flux/common/http/Header;)Lcom/groupbyinc/flux/client/Response; ? ?
? method endpoint headers ?(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;[Lcom/groupbyinc/flux/common/http/Header;)Lcom/groupbyinc/flux/client/Response; *com/groupbyinc/flux/common/http/HttpEntity ? params 5Ljava/util/Map; Ljava/util/Map; ;com/groupbyinc/flux/client/HttpAsyncResponseConsumerFactory ? DEFAULT =Lcom/groupbyinc/flux/client/HttpAsyncResponseConsumerFactory; ? ? ? ? ?(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Lcom/groupbyinc/flux/common/http/HttpEntity;Lcom/groupbyinc/flux/client/HttpAsyncResponseConsumerFactory;[Lcom/groupbyinc/flux/common/http/Header;)Lcom/groupbyinc/flux/client/Response; ? ?
? entity ,Lcom/groupbyinc/flux/common/http/HttpEntity; (J)V 1 ?
? performRequestAsync ?(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Lcom/groupbyinc/flux/common/http/HttpEntity;Lcom/groupbyinc/flux/client/HttpAsyncResponseConsumerFactory;Lcom/groupbyinc/flux/client/ResponseListener;[Lcom/groupbyinc/flux/common/http/Header;)V ? ?
? get '()Lcom/groupbyinc/flux/client/Response; ? ?
? httpAsyncResponseConsumerFactory listener