All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.groupbyinc.flux.client.RestClient.class Maven / Gradle / Ivy

There is a newer version: 198
Show newest version
????3?%com/groupbyinc/flux/client/RestClientjava/lang/Objectjava/io/CloseableRestClient.java/com/groupbyinc/flux/client/RestClient$HostTuple	HostTuple5com/groupbyinc/flux/client/RestClient$FailureListenerFailureListener:com/groupbyinc/flux/client/RestClient$SyncResponseListenerSyncResponseListenerEcom/groupbyinc/flux/client/RestClient$FailureTrackingResponseListenerFailureTrackingResponseListener'com/groupbyinc/flux/client/RestClient$2'com/groupbyinc/flux/client/RestClient$1java/util/Map$Entry
java/util/MapEntrylogger7Lcom/groupbyinc/flux/common/apache/commons/logging/Log;clientJLcom/groupbyinc/flux/common/http/impl/nio/client/CloseableHttpAsyncClient;defaultHeaders)[Lcom/groupbyinc/flux/common/http/Header;maxRetryTimeoutMillisJ
pathPrefixLjava/lang/String;
lastHostIndex+Ljava/util/concurrent/atomic/AtomicInteger;	hostTuple1Lcom/groupbyinc/flux/client/RestClient$HostTuple;nLcom/groupbyinc/flux/client/RestClient$HostTuple;>;	blacklist$Ljava/util/concurrent/ConcurrentMap;zLjava/util/concurrent/ConcurrentMap;failureListener7Lcom/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13
4)java/util/concurrent/atomic/AtomicInteger6(I)V18
79'(	;&java/util/concurrent/ConcurrentHashMap=
>4,-	@ 	B#$	D!"	F/0	H%&	JsetHosts.([Lcom/groupbyinc/flux/common/http/HttpHost;)VLM
Nthis'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/RestClientBuilderV1M
WX"java/lang/IllegalArgumentExceptionZ hosts must not be null nor empty\(Ljava/lang/String;)V1^
[_java/util/HashSeta
b4:com/groupbyinc/flux/common/http/impl/client/BasicAuthCached
e4S
java/util/Seth0com/groupbyinc/flux/common/http/client/AuthCachejhost cannot be nullljava/util/ObjectsnrequireNonNull8(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;pq
oradd(Ljava/lang/Object;)Ztuiv5com/groupbyinc/flux/common/http/impl/auth/BasicSchemex
y4put^(Lcom/groupbyinc/flux/common/http/HttpHost;Lcom/groupbyinc/flux/common/http/auth/AuthScheme;)V{|k}java/util/CollectionsunmodifiableSet (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;	authCache2Lcom/groupbyinc/flux/common/http/client/AuthCache;performRequestt(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;??
?methodendpointheaders?(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?params5Ljava/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;??
? httpAsyncResponseConsumerFactorylistener;e!Ljava/lang/NumberFormatException;
ignoreCodeignoresArray
requestParamsignoreStringuriLjava/net/URI;request@Lcom/groupbyinc/flux/common/http/client/methods/HttpRequestBase;failureTrackingResponseListenerGLcom/groupbyinc/flux/client/RestClient$FailureTrackingResponseListener;	startTimeLjava/lang/Exception;Ljava/lang/Object;R@		Ajava/util/IteratorCnext()Ljava/lang/Object;EFDG(com/groupbyinc/flux/common/http/HttpHostICcom/groupbyinc/flux/common/http/nio/client/methods/HttpAsyncMethodsKcreate?(Lcom/groupbyinc/flux/common/http/HttpHost;Lcom/groupbyinc/flux/common/http/HttpRequest;)Lcom/groupbyinc/flux/common/http/nio/protocol/HttpAsyncRequestProducer;MN
LOcreateHttpAsyncResponseConsumerJ()Lcom/groupbyinc/flux/common/http/nio/protocol/HttpAsyncResponseConsumer;QR?SAcom/groupbyinc/flux/common/http/client/protocol/HttpClientContextUE()Lcom/groupbyinc/flux/common/http/client/protocol/HttpClientContext;MW
VX??		ZsetAuthCache5(Lcom/groupbyinc/flux/common/http/client/AuthCache;)V\]
V^Y(Lcom/groupbyinc/flux/client/RestClient;Lcom/groupbyinc/flux/common/http/client/methods/HttpRequestBase;Lcom/groupbyinc/flux/common/http/HttpHost;Ljava/util/Set;Lcom/groupbyinc/flux/client/RestClient$FailureTrackingResponseListener;Lcom/groupbyinc/flux/client/RestClient$HostTuple;JLcom/groupbyinc/flux/client/HttpAsyncResponseConsumerFactory;)V1`
aHcom/groupbyinc/flux/common/http/impl/nio/client/CloseableHttpAsyncClientcexecute(Lcom/groupbyinc/flux/common/http/nio/protocol/HttpAsyncRequestProducer;Lcom/groupbyinc/flux/common/http/nio/protocol/HttpAsyncResponseConsumer;Lcom/groupbyinc/flux/common/http/protocol/HttpContext;Lcom/groupbyinc/flux/common/http/concurrent/FutureCallback;)Ljava/util/concurrent/Future;ef
dgsLcom/groupbyinc/flux/client/RestClient$HostTuple;>;requestProducerGLcom/groupbyinc/flux/common/http/nio/protocol/HttpAsyncRequestProducer;asyncResponseConsumerxLcom/groupbyinc/flux/common/http/nio/protocol/HttpAsyncResponseConsumer;HLcom/groupbyinc/flux/common/http/nio/protocol/HttpAsyncResponseConsumer;contextCLcom/groupbyinc/flux/common/http/client/protocol/HttpClientContext; request headers must not be nullq
b9+com/groupbyinc/flux/common/http/HttpRequesttrequest header must not be nullv	addHeader+(Lcom/groupbyinc/flux/common/http/Header;)Vxyuz&com/groupbyinc/flux/common/http/Header|getName~
}contains?ui?
requestHeader(Lcom/groupbyinc/flux/common/http/Header;
defaultHeaderhttpRequest-Lcom/groupbyinc/flux/common/http/HttpRequest;requestHeadersrequestNames#Ljava/util/Set;java/util/Collection?(Ljava/util/Collection;)V1?
b?entrySet????iterator()Ljava/util/Iterator;??i?hasNext()Z??D?getValue?F?(com/groupbyinc/flux/client/DeadHostState?getDeadUntilNanos?"
??getKey?F??ui?isEmpty??i?java/util/ArrayList?
??java/util/List?size()I????*(Lcom/groupbyinc/flux/client/RestClient;)V1?
?sort)(Ljava/util/List;Ljava/util/Comparator;)V??
??(I)Ljava/lang/Object;????	?resurrecting host [?-(Ljava/lang/Object;)Ljava/lang/StringBuilder;?
??]?5com/groupbyinc/flux/common/apache/commons/logging/Log?trace(Ljava/lang/Object;)V????getAndIncrement??
7?rotate(Ljava/util/List;I)V??
??????entrykLjava/util/Map$Entry;Ljava/util/Map$Entry;deadHostsortedHosts}Ljava/util/List;>;Ljava/util/List;rotatedHosts;
filteredHosts	nextHostsBLjava/util/Collection;Ljava/util/Collection;
onResponse-(Lcom/groupbyinc/flux/common/http/HttpHost;)V??isDebugEnabled????removed host [?] from blacklist?debug????removedHost*Lcom/groupbyinc/flux/client/DeadHostState;INITIAL_DEAD_STATE??	??putIfAbsent8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;????added host [?] to blacklist?-(Lcom/groupbyinc/flux/client/DeadHostState;)V1?
??replace9(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z?updated host [] already in blacklist,?
	previousDeadHostStateclose3
d
isSuccessfulResponse(I)Z
statusCodeI
isRetryStatusaddSuppressedExceptionA(Ljava/lang/Exception;Ljava/lang/Exception;)Ljava/lang/Exception;
addSuppressed(Ljava/lang/Throwable;)V
?suppressedExceptioncurrentExceptionjava/util/LocaleROOTLjava/util/Locale;	 toUpperCase&(Ljava/util/Locale;)Ljava/lang/String;"#
?$hashCode&?
?'DELETE)GET+OPTIONS-PATCH/POST1PUT3TRACE5/com/groupbyinc/flux/client/HttpDeleteWithEntity7(Ljava/net/URI;)V19
8:addRequestBody?(Lcom/groupbyinc/flux/common/http/client/methods/HttpRequestBase;Lcom/groupbyinc/flux/common/http/HttpEntity;)Lcom/groupbyinc/flux/common/http/client/methods/HttpRequestBase;<=
>,com/groupbyinc/flux/client/HttpGetWithEntity@
A:7com/groupbyinc/flux/common/http/client/methods/HttpHeadC
D::com/groupbyinc/flux/common/http/client/methods/HttpOptionsF
G:8com/groupbyinc/flux/common/http/client/methods/HttpPatchI
J:7com/groupbyinc/flux/common/http/client/methods/HttpPostL
M:6com/groupbyinc/flux/common/http/client/methods/HttpPutO
P:8com/groupbyinc/flux/common/http/client/methods/HttpTraceR
S:'java/lang/UnsupportedOperationExceptionUhttp method not supported: W
V_httpPost9Lcom/groupbyinc/flux/common/http/client/methods/HttpPost;Mcom/groupbyinc/flux/common/http/client/methods/HttpEntityEnclosingRequestBase\	setEntity/(Lcom/groupbyinc/flux/common/http/HttpEntity;)V^_
]`>com/groupbyinc/flux/common/http/client/methods/HttpRequestBaseb	getMethodd

ce with body is not supportedgjava/net/URISyntaxExceptionipath must not be nullk/m
startsWith(Ljava/lang/String;)Zop
?q7com/groupbyinc/flux/common/http/client/utils/URIBuilders
t_?addParameter_(Ljava/lang/String;Ljava/lang/String;)Lcom/groupbyinc/flux/common/http/client/utils/URIBuilder;wx
tybuild()Ljava/net/URI;{|
t}
getMessage

j?fullPathparam;Ljava/util/Map$Entry;
uriBuilder9Lcom/groupbyinc/flux/common/http/client/utils/URIBuilder;Ljava/net/URISyntaxException;path
access$0009()Lcom/groupbyinc/flux/common/apache/commons/logging/Log;
access$100
?x0
access$200T(Lcom/groupbyinc/flux/client/RestClient;Lcom/groupbyinc/flux/common/http/HttpHost;)V??
?x1
access$300
?
access$400
	
access$500*(Lcom/groupbyinc/flux/client/RestClient;)J
access$600/(Lcom/groupbyinc/flux/client/RestClient;JLcom/groupbyinc/flux/client/RestClient$HostTuple;Lcom/groupbyinc/flux/common/http/client/methods/HttpRequestBase;Ljava/util/Set;Lcom/groupbyinc/flux/client/HttpAsyncResponseConsumerFactory;Lcom/groupbyinc/flux/client/RestClient$FailureTrackingResponseListener;)Vx2x3x4x5x6
access$700
?;[Lcom/groupbyinc/flux/common/http/Header;)Lcom/groupbyinc/flux/client/Response;?(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;(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;?(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Lcom/groupbyinc/flux/client/ResponseListener;[Lcom/groupbyinc/flux/common/http/Header;)V?(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Lcom/groupbyinc/flux/common/http/HttpEntity;Lcom/groupbyinc/flux/client/ResponseListener;[Lcom/groupbyinc/flux/common/http/Header;)V(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_(JLcom/groupbyinc/flux/client/RestClient$HostTuple;>;Lcom/groupbyinc/flux/common/http/client/methods/HttpRequestBase;Ljava/util/Set;Lcom/groupbyinc/flux/client/HttpAsyncResponseConsumerFactory;Lcom/groupbyinc/flux/client/RestClient$FailureTrackingResponseListener;)Vu()Lcom/groupbyinc/flux/client/RestClient$HostTuple;>;i(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;)Ljava/net/URI;
SourceFileInnerClasses!	 !"#$%&'(B)*?+,-?./0 12??>*?5*?7Y?:?<*?>Y???A*+?C* ?E*?G*?I*?K*?O??H>PQ> >#$>!">RS>%&>/0?*
hbdi j%k+l1m7n=o?TU?3	?WY*?Y??	RS?v?LM?1|+?+??
?[Y]?`??bY?cM?eY?fN+:?66?02:m?sW,?wW-?yY?z?~????*?	Y,??-????*?A????4< ??|PQ|RSa??#Y???a???2~	??#?<?D?M?\?b?r?{??		?gikg?3????T*+,??-????*PQ?&?&?"????????r*+,-??????4PQ?&?&???"?????????????}*+,-??????>PQ?&?&?????"??????????????"?Y*?E??:*+,-??????R"PQ"?&"?&"??"??"??"?"
???"????
??????????d*+,??-?Ʊ?4PQ?&?&???"?
?
?????
*+,-?Ʊ?>
PQ
?&
?&
??
??
?"?
???
?????????*+,-??????HPQ?&?&???????"????

??????]-ϸsW??Y-??:ֹ???:		?"?+??????:
????:
??	??:?bY?c:
?+??
???wW:?6
6
?G2:
???wW?*:?[Y??Y??	?????????*?K,?:+?:*??Y?:
?$7**?(

?+?:?/????????80?
@0?
?%23?74&Lw5??6??7&	U?0?
?489?*:;?<=
?>$	2?PQ?&?&?????????"?4801
@01
?6?U?01
???n&')+$,-.;0C3L4U5^7l9?;?>?<?=?9?A?B?C?D?E?FJHIK??	?;??(i???????????i?????&????????i?B???????
???)?$T-?B?D?H?J:?P:	?T:
?Y:-?[?_*?C	
?Y*-?b?hW??pTPQT>$T)*T:;T0?T??T?=C??:jk	#1ln
(,op? T)iT01#1lm
?"QSTU#V(W1XS????T?,r?sW?bY,??sN,:?66?/2:w?sW+?{-???wW????*?G:?66?(2:-?????+?{???ױ?>+??l???PQ?????"y???y???2???+?4?<?J?P?l?|??????)?u?i??2?
?%?%&?9*??L??M?bY+?B????N*?A????:???6?H?:?$??????e	??-????W???-???m??Y*?A????:???N?Y*??????????J:????Y?¶??Ƕ?????M?$??Y-??:??*?$???)???U????????PQ)*	???>>$???U????????)+	???R??	??>?T?b?e?n????????????????????????		??iD9??o? ??????@*?A+????M?????),?%????Y??+????????? @PQ@??2????????????,????*?A+??????M,?(????Y???+????????A*?A+,??Y,???(????Y??+??????????*?I+?
?? d??PQ????*
???7?:?P?r?u?x????
?9??:??3?6*?C???PQ?
????
?B
,????
???@
?\ ?????? ?????
?P*?+*?+?????	?	
?'?*?!?%N6-?(???R~x6Y6??!??i%????((???%?w?y?I-*??w6?q-,??g6?a-޶?X6?R-.??H6?B-0??86?2-2??(6?"-4??6?-6??6??0=JWdq???8Y+?;,????AY+?B,????DY+?E,????GY+?H,????JY+?K,????MY+?N:,??W??PY+?Q,????SY+?T,????VY??Y?X?*???Y??*S
Z[??&?89????2
"/<ISZ]jw??X?
1
<=??7+?4*?]?*?]+?a?"?VY??Y?*?f?h???Y?*??7?;7???#$%'5*????+l?sW*??+n?r???Y?*?+??N?!??Y?*?n?+??N?+N?tY-?u:,?v??:???,?H?:???????ܶzW????~?N?[Y-??-????j?\	)?&E?&w??JP?&TF???
2??%&??&????w??????6
.123,5H8J;T<w=?>???@?A?),???tD?2???j?????????Y??/??????Y???:*+?????Q???Y??/??????Y???:*+?????Q???Y?????/*?E???Q?Y???u*-?+??H?Q?$?*?;?????=?Y??:*+?????????Y?3?!	??????[??:	


		




© 2015 - 2024 Weber Informatics LLC | Privacy Policy