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

com.groupbyinc.flux.rest.RestController.class Maven / Gradle / Ivy

There is a newer version: 198
Show newest version
????4#'com/groupbyinc/flux/rest/RestController6com/groupbyinc/flux/common/component/AbstractComponent7com/groupbyinc/flux/http/HttpServerTransport$DispatcherRestController.javaCcom/groupbyinc/flux/rest/RestController$ResourceHandlingHttpChannelResourceHandlingHttpChannel+com/groupbyinc/flux/rest/RestRequest$Method$com/groupbyinc/flux/rest/RestRequest
Method,com/groupbyinc/flux/http/HttpServerTransport
Dispatcher0com/groupbyinc/flux/common/path/PathTrie$Decoder(com/groupbyinc/flux/common/path/PathTrieDecoder%java/lang/invoke/MethodHandles$Lookupjava/lang/invoke/MethodHandlesLookuphandlers*Lcom/groupbyinc/flux/common/path/PathTrie;ULcom/groupbyinc/flux/common/path/PathTrie;handlerWrapper"Ljava/util/function/UnaryOperator;JLjava/util/function/UnaryOperator;client,Lcom/groupbyinc/flux/client/node/NodeClient;circuitBreakerService;Lcom/groupbyinc/flux/indices/breaker/CircuitBreakerService;
headersToCopyLjava/util/Set;#Ljava/util/Set;usageService(Lcom/groupbyinc/flux/usage/UsageService;$assertionsDisabledZ?(Lcom/groupbyinc/flux/common/settings/Settings;Ljava/util/Set;Ljava/util/function/UnaryOperator;Lcom/groupbyinc/flux/client/node/NodeClient;Lcom/groupbyinc/flux/indices/breaker/CircuitBreakerService;Lcom/groupbyinc/flux/usage/UsageService;)V1(Lcom/groupbyinc/flux/common/settings/Settings;)V.0
1"com/groupbyinc/flux/rest/RestUtils3REST_DECODER2Lcom/groupbyinc/flux/common/path/PathTrie$Decoder;56	475(Lcom/groupbyinc/flux/common/path/PathTrie$Decoder;)V.9
:	<'(	>*+	@"java/lang/invoke/LambdaMetafactoryBmetafactory?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;DE
CFG&(Ljava/lang/Object;)Ljava/lang/Object;Ilambda$new$0N(Lcom/groupbyinc/flux/rest/RestHandler;)Lcom/groupbyinc/flux/rest/RestHandler;KL
MNLapply$()Ljava/util/function/UnaryOperator;QRS,com/groupbyinc/flux/common/settings/SettingsU
java/util/SetW java/util/function/UnaryOperatorY*com/groupbyinc/flux/client/node/NodeClient[9com/groupbyinc/flux/indices/breaker/CircuitBreakerService]&com/groupbyinc/flux/usage/UsageService_ !	a#$	c%&	ethis)Lcom/groupbyinc/flux/rest/RestController;settings.Lcom/groupbyinc/flux/common/settings/Settings;registerAsDeprecatedHandler?(Lcom/groupbyinc/flux/rest/RestRequest$Method;Ljava/lang/String;Lcom/groupbyinc/flux/rest/RestHandler;Ljava/lang/String;Lcom/groupbyinc/flux/common/logging/DeprecationLogger;)V,-	m/com/groupbyinc/flux/rest/DeprecationRestHandlerojava/lang/AssertionErrorq()V.s
rtq(Lcom/groupbyinc/flux/rest/RestHandler;Ljava/lang/String;Lcom/groupbyinc/flux/common/logging/DeprecationLogger;)V.v
pwregisterHandlerh(Lcom/groupbyinc/flux/rest/RestRequest$Method;Ljava/lang/String;Lcom/groupbyinc/flux/rest/RestHandler;)Vyz
{method-Lcom/groupbyinc/flux/rest/RestRequest$Method;pathLjava/lang/String;handler&Lcom/groupbyinc/flux/rest/RestHandler;deprecationMessagelogger6Lcom/groupbyinc/flux/common/logging/DeprecationLogger;registerWithDeprecatedHandler?(Lcom/groupbyinc/flux/rest/RestRequest$Method;Ljava/lang/String;Lcom/groupbyinc/flux/rest/RestHandler;Lcom/groupbyinc/flux/rest/RestRequest$Method;Ljava/lang/String;Lcom/groupbyinc/flux/common/logging/DeprecationLogger;)Vjava/lang/StringBuilder?
?t[?append-(Ljava/lang/String;)Ljava/lang/StringBuilder;??
??name()Ljava/lang/String;??
? ?] is deprecated! Use [?
] instead.?toString??
??kl
?deprecatedMethoddeprecatedPath(com/groupbyinc/flux/rest/BaseRestHandler?addRestHandler-(Lcom/groupbyinc/flux/rest/BaseRestHandler;)V??
`?'com/groupbyinc/flux/rest/MethodHandlers?i(Ljava/lang/String;Lcom/groupbyinc/flux/rest/RestHandler;[Lcom/groupbyinc/flux/rest/RestRequest$Method;)V.?
??8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;?lambda$registerHandler$1?(Lcom/groupbyinc/flux/rest/RestHandler;Lcom/groupbyinc/flux/rest/RestRequest$Method;Lcom/groupbyinc/flux/rest/MethodHandlers;Lcom/groupbyinc/flux/rest/MethodHandlers;)Lcom/groupbyinc/flux/rest/MethodHandlers;??
??}(Lcom/groupbyinc/flux/rest/MethodHandlers;Lcom/groupbyinc/flux/rest/MethodHandlers;)Lcom/groupbyinc/flux/rest/MethodHandlers;?t(Lcom/groupbyinc/flux/rest/RestHandler;Lcom/groupbyinc/flux/rest/RestRequest$Method;)Ljava/util/function/BiFunction;Q??insertOrUpdateF(Ljava/lang/String;Ljava/lang/Object;Ljava/util/function/BiFunction;)V??
?canTripCircuitBreaker(Ljava/util/Optional;)Zlambda$canTripCircuitBreaker$2;(Lcom/groupbyinc/flux/rest/RestHandler;)Ljava/lang/Boolean;??
???()Ljava/util/function/Function;Q??java/util/Optional?map3(Ljava/util/function/Function;)Ljava/util/Optional;??
??java/lang/Boolean?valueOf(Z)Ljava/lang/Boolean;??
??orElse?I
??booleanValue()Z??
??;Ljava/util/Optional;dispatchRequest?(Lcom/groupbyinc/flux/rest/RestRequest;Lcom/groupbyinc/flux/rest/RestChannel;Lcom/groupbyinc/flux/common/util/concurrent/ThreadContext;)Vjava/lang/Exception?rawPath??
?/favicon.ico?java/lang/String?equals(Ljava/lang/Object;)Z??
??
handleFaviconO(Lcom/groupbyinc/flux/rest/RestRequest;Lcom/groupbyinc/flux/rest/RestChannel;)V??
?tryAllHandlers??
?*com/groupbyinc/flux/rest/BytesRestResponse?>(Lcom/groupbyinc/flux/rest/RestChannel;Ljava/lang/Exception;)V.?
??$com/groupbyinc/flux/rest/RestChannel?sendResponse*(Lcom/groupbyinc/flux/rest/RestResponse;)V????8com/groupbyinc/flux/common/util/concurrent/ThreadContext?
addSuppressed(Ljava/lang/Throwable;)V
?!Lorg/apache/logging/log4j/Logger;?	,()Lorg/apache/logging/log4j/message/Message;lambda$dispatchRequest$3R(Lcom/groupbyinc/flux/rest/RestRequest;)Lorg/apache/logging/log4j/message/Message;	

getW(Lcom/groupbyinc/flux/rest/RestRequest;)Lorg/apache/logging/log4j/util/MessageSupplier;org/apache/logging/log4j/LoggererrorG(Lorg/apache/logging/log4j/util/MessageSupplier;Ljava/lang/Throwable;)VinnerLjava/lang/Exception;erequest&Lcom/groupbyinc/flux/rest/RestRequest;channel&Lcom/groupbyinc/flux/rest/RestChannel;
threadContext:Lcom/groupbyinc/flux/common/util/concurrent/ThreadContext;dispatchBadRequest?(Lcom/groupbyinc/flux/rest/RestRequest;Lcom/groupbyinc/flux/rest/RestChannel;Lcom/groupbyinc/flux/common/util/concurrent/ThreadContext;Ljava/lang/Throwable;)Vjava/io/IOException#*com/groupbyinc/flux/ElasticsearchException%
unknown cause'java/lang/Object)((Ljava/lang/String;[Ljava/lang/Object;)V.+
&,.
&.#com/groupbyinc/flux/rest/RestStatus0BAD_REQUEST%Lcom/groupbyinc/flux/rest/RestStatus;23	14c(Lcom/groupbyinc/flux/rest/RestChannel;Lcom/groupbyinc/flux/rest/RestStatus;Ljava/lang/Exception;)V.6
?7java/lang/Throwable9
$#failed to send bad request response<warn*(Ljava/lang/String;Ljava/lang/Throwable;)V>?@INTERNAL_SERVER_ERRORB3	1Ctext/plain; charset=UTF-8E+com/groupbyinc/flux/common/bytes/BytesArrayGEMPTY-Lcom/groupbyinc/flux/common/bytes/BytesArray;IJ	HKk(Lcom/groupbyinc/flux/rest/RestStatus;Ljava/lang/String;Lcom/groupbyinc/flux/common/bytes/BytesReference;)V.M
?NLjava/io/IOException;causeLjava/lang/Throwable;?(Lcom/groupbyinc/flux/rest/RestRequest;Lcom/groupbyinc/flux/rest/RestChannel;Lcom/groupbyinc/flux/client/node/NodeClient;Ljava/util/Optional;)Z
hasContentT?
Ucontent3()Lcom/groupbyinc/flux/common/bytes/BytesReference;WX
Y/com/groupbyinc/flux/common/bytes/BytesReference[length()I]^
\_lambda$dispatchRequest$4a(Lcom/groupbyinc/flux/rest/RestRequest;Lcom/groupbyinc/flux/rest/RestHandler;)Ljava/lang/Boolean;ab
cdE(Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/util/function/Function;QfgsendContentTypeErrorMessagei?
jlambda$dispatchRequest$5l?
mn?getXContentType4()Lcom/groupbyinc/flux/common/xcontent/XContentType;qr
s0com/groupbyinc/flux/common/xcontent/XContentTypeuJSON2Lcom/groupbyinc/flux/common/xcontent/XContentType;wx	vySMILE{x	v|NOT_ACCEPTABLE~3	1Content-Type [?-(Ljava/lang/Object;)Ljava/lang/StringBuilder;??
??<] does not support stream parsing. Use JSON or SMILE instead?createSimpleErrorResponse?(Lcom/groupbyinc/flux/rest/RestChannel;Lcom/groupbyinc/flux/rest/RestStatus;Ljava/lang/String;)Lcom/groupbyinc/flux/rest/BytesRestResponse;??
??	isPresent??
????
?inFlightRequestsBreakerp(Lcom/groupbyinc/flux/indices/breaker/CircuitBreakerService;)Lcom/groupbyinc/flux/common/breaker/CircuitBreaker;??
??1com/groupbyinc/flux/common/breaker/CircuitBreaker?addEstimateBytesAndMaybeBreak(JLjava/lang/String;)D????addWithoutBreaking(J)J????e(Lcom/groupbyinc/flux/rest/RestChannel;Lcom/groupbyinc/flux/indices/breaker/CircuitBreakerService;I)V.?
	?lambda$dispatchRequest$6?L
??H(Lcom/groupbyinc/flux/rest/RestController;)Ljava/util/function/Function;Q??()Ljava/lang/Object;?
??$com/groupbyinc/flux/rest/RestHandler?
handleRequest{(Lcom/groupbyinc/flux/rest/RestRequest;Lcom/groupbyinc/flux/rest/RestChannel;Lcom/groupbyinc/flux/client/node/NodeClient;)V????getValidHandlerMethodSet7(Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/util/Set;??
?size?^X?/()Lcom/groupbyinc/flux/rest/RestRequest$Method;}?
?contains??X?OPTIONS?~	?handleUnsupportedHttpMethod^(Lcom/groupbyinc/flux/rest/RestRequest;Lcom/groupbyinc/flux/rest/RestChannel;Ljava/util/Set;)V??
?handleOptionsRequest??
?requestHandledwrappedHandlervalidMethodSet>Ljava/util/Set;mHandler
contentLengthIresponseChannelhasContentTypeO(Lcom/groupbyinc/flux/rest/RestRequest;Lcom/groupbyinc/flux/rest/RestHandler;)ZsupportsContentStream????Content-Type?header&(Ljava/lang/String;)Ljava/lang/String;??
?java/util/Locale?ROOTLjava/util/Locale;??	??toLowerCase&(Ljava/util/Locale;)Ljava/lang/String;??
??application/x-ndjson?setXContentType5(Lcom/groupbyinc/flux/common/xcontent/XContentType;)V??
?lowercaseMediaTyperestRequestrestHandlergetAllHeaderValues$(Ljava/lang/String;)Ljava/util/List;??
?Content-Type header is missing?java/util/List?Content-Type header [?"com/groupbyinc/flux/common/Strings? collectionToCommaDelimitedString((Ljava/lang/Iterable;)Ljava/lang/String;??
??] is not supportederrorMessagecontentTypeHeader$Ljava/util/List;Ljava/util/List;checkErrorTraceParameterO(Lcom/groupbyinc/flux/rest/RestRequest;Lcom/groupbyinc/flux/rest/RestChannel;)Zerror_trace	paramAsBoolean(Ljava/lang/String;Z)Z

detailedErrorsEnabled??iterator()Ljava/util/Iterator;Xjava/util/IteratorhasNext?next?	putHeader'(Ljava/lang/String;Ljava/lang/String;)V
? 
"'error traces in responses are disabled.$getAllHandlers<(Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/util/Iterator;&'
(
ofNullable((Ljava/lang/Object;)Ljava/util/Optional;*+
?,lambda$tryAllHandlers$7e(Lcom/groupbyinc/flux/rest/RestRequest;Lcom/groupbyinc/flux/rest/MethodHandlers;)Ljava/util/Optional;./
01?(Lcom/groupbyinc/flux/rest/MethodHandlers;)Ljava/util/Optional;3gflatMap6?
?7?S
9handleBadRequest;?
<
httpHeaderkeyit?Ljava/util/Iterator;Ljava/util/Iterator;allHandlersjava/util/HashMapDparams()Ljava/util/Map;FG
H(Ljava/util/Map;)V.J
EKgetPath:(Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/lang/String;MN
O?lambda$getAllHandlers$8F(Lcom/groupbyinc/flux/rest/RestRequest;Ljava/util/Map;)Ljava/util/Map;RS
TUGT(Lcom/groupbyinc/flux/rest/RestRequest;Ljava/util/Map;)Ljava/util/function/Supplier;XYretrieveAllE(Ljava/lang/String;Ljava/util/function/Supplier;)Ljava/util/Iterator;[\
]originalParams5Ljava/util/Map;Ljava/util/Map;METHOD_NOT_ALLOWEDb3	1cIncorrect HTTP method for uri [eurig?
h] and method [j], allowed: lAllown,pcollectionToDelimitedString:(Ljava/lang/Iterable;Ljava/lang/String;)Ljava/lang/String;rs
?t	addHeaderv
?wbytesRestResponse,Lcom/groupbyinc/flux/rest/BytesRestResponse;OK{3	1|newErrorBuilder7()Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;~??3com/groupbyinc/flux/common/xcontent/XContentBuilder?startObject?
??no handler found for uri [?]?field[(Ljava/lang/String;Ljava/lang/String;)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;??
??	endObject?
??](Lcom/groupbyinc/flux/rest/RestStatus;Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;)V.?
??$closeResource1(Ljava/lang/Throwable;Ljava/lang/AutoCloseable;)V??
?builder5Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;java/util/HashSet?
?t!lambda$getValidHandlerMethodSet$9M(Ljava/util/Set;Lcom/groupbyinc/flux/rest/MethodHandlers;)Ljava/lang/Boolean;??
??>(Lcom/groupbyinc/flux/rest/MethodHandlers;)Ljava/lang/Boolean;?.(Ljava/util/Set;)Ljava/util/function/Function;Q?	?validMethodsGET?~	?getClass()Ljava/lang/Class;??
*?/config/favicon.ico?java/lang/Class?getResourceAsStream)(Ljava/lang/String;)Ljava/io/InputStream;??
??java/io/ByteArrayOutputStream?
?t,com/groupbyinc/flux/core/internal/io/Streams?copy.(Ljava/io/InputStream;Ljava/io/OutputStream;)J??
??image/x-icon?toByteArray()[B??
??<(Lcom/groupbyinc/flux/rest/RestStatus;Ljava/lang/String;[B)V.?
??java/io/InputStream?	FORBIDDEN?3	1?outLjava/io/ByteArrayOutputStream;restResponsestreamLjava/io/InputStream;in_flight_requests?
getBreakerG(Ljava/lang/String;)Lcom/groupbyinc/flux/common/breaker/CircuitBreaker;??
^?getValidMethods()Ljava/util/Set;??
??addAll(Ljava/util/Collection;)Z??X?mh)Lcom/groupbyinc/flux/rest/MethodHandlers;
java/util/Map?clear?s??putAll?J??
getHandlerC(Lcom/groupbyinc/flux/rest/RestRequest$Method;)Ljava/util/Optional;??
??QIZ?h??
?5org/apache/logging/log4j/message/ParameterizedMessage?,failed to send failure response for uri [{}]?'(Ljava/lang/String;Ljava/lang/Object;)V.?
??????
addMethods(Lcom/groupbyinc/flux/rest/RestHandler;[Lcom/groupbyinc/flux/rest/RestRequest$Method;)Lcom/groupbyinc/flux/rest/MethodHandlers;?
?	mHandlersnewMHandlerjava/lang/AutoCloseablecloses
:x0x1Ljava/lang/AutoCloseable;
access$000desiredAssertionStatus?
?	SignatureCodeLocalVariableTableLocalVariableTypeTableLineNumberTable
StackMapTable-(Lcom/groupbyinc/flux/common/settings/Settings;Ljava/util/Set;Ljava/util/function/UnaryOperator;Lcom/groupbyinc/flux/client/node/NodeClient;Lcom/groupbyinc/flux/indices/breaker/CircuitBreakerService;Lcom/groupbyinc/flux/usage/UsageService;)V?(Ljava/util/Optional;)Z
Exceptions?(Lcom/groupbyinc/flux/rest/RestRequest;Lcom/groupbyinc/flux/rest/RestChannel;Lcom/groupbyinc/flux/client/node/NodeClient;Ljava/util/Optional;)Zg(Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/util/Iterator;?(Lcom/groupbyinc/flux/rest/RestRequest;Lcom/groupbyinc/flux/rest/RestChannel;Ljava/util/Set;)Vf(Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/util/Set;BootstrapMethods
SourceFileInnerClasses! !"#$%&'()*+,-!./:*+?2*?Y?8?;?=*,??*?A-?	?TN*-?b*?d*?f?H:gh:ij:'(: !:#$:%&:*+:'): "*
PBQRS"T(V-W3X9Y?(VXZ\^`kl?(?n?-?p??rY?u?*+,?pY-?x?|?>(gh(}~(?(??(??(??fh'i???R??Y?????????????????+???????,???????:*+,-?|*-???RRghR}~R?R??R?~R??R??=????=?D?Q?yz?
3-???*?A-????*?=,??Y,-?Y+S??-+?????*3gh3}~3?3?????2???]+?????Ӷ??϶ڬgh???????M+????
*+,??*+,-??2:,??Y,?????:?*?+????/2?>4-MghMMM 2???????/?2?4?;?L?#I???????!"b~??&Y(?*?-:? ???
??:??&Y?/:,??Y,?5?8???5:?
?;*?=?A,??Y?DF?L?O???HK$\	'5M0P~gh~~~ ~QR6
??? ?*?5?H?K?M?R?Y?g?}?,?
????:$?
$?#?SG	?+?V?
+?Z?`?6,:?*+?h???Ӷ??϶ڙ*+,?k6?K?a?p???Ӷ??϶ڙG+?t?z?=+?t?}?3,,????Y?????+?t???????????6??????*???*?f??????X?*?f?????X?	Y,*?f??:*???Ͷ???:+-??6?}:??Y????6?c*+??:???)+?????+???å*+,??6?,+?????+???æ*+,??6?6????@?-??-???-(?-_?-??-2Y?(?gh???#$???z??w???-2Y??????$???7?=?C?c?v????????????????????????%?(?+?2???K?T?\bqz???
9@?0??b&s??6X%??\???
????*?t?9+???.*ٶ??$*ٶݲ??M,??*?z????? (???????"(29;=;i??I+ٶ?N-??:?(??Y?????+ٶ????????:,,???????>?IghI?IA9?A!#$&%'9*H+???$?$g+
??,???? gh458????*???:??'???:+??:?-?!???6*+,?#?,,?5%?????*+?)::??4????-+?5?8:*+,*?d?:6??????	*+,?=?f
)
>?!?????a;@B?gh??? <l?-]KCB ???a;@A]KCAV<!=)>.?6A9C<EEFMGPFUHVL]MkN?O?P?Q?S?V?W?Y?*???
7?
?&'t ?EY+?I?LM*?=*+?P+,?Z?^?  gh _a_`
^_??!x,?d??Y??f??+?i??k??+????m??-??????:o-q?u?x,???):*?=?A,??Y?DF?L?O???NQ$>7yzS$Pxghxxx?(x??*
pq2p7rFsNwQtSuavwx	?Q$%???i+???æ8-???/??Y?}F?L?O:o-q?u?x,???,+???æ"-???,??Y?}F?L?O???4%yzighiii?(i????%?4?<?R?h??(;?9},??N:-??W-???Y?????+?i??k??+???????????W-??W,??Y?5-????-?$-???::?:-?	-????
Wd:
Wmdom*u??}gh}}&	?
??A?F?W?d?m?|?6?d??::H:?:??$???7??Y??M*+?)N-:??????-,????W???,?4$@B7gh7/?()CB $@A/??)CA????5??X?#MN9+??gh?????+?????*?????N:??Y??:-??X??Y?}??Ƿ?:,??-?$-???::?:-?	-????3N,??Y?DF?L?O???,??Y??F?L?O???DQ:DZQ\Z
il$H!#??<?zT??mP?gh??>?
??!?(?<?D?Q?Z?i?l?m???????=?Q??::H:?:??B$
??2*ֶڰ%&?
??B*+?޹??Ӱ?(???
RST*?I??*?I+??*?I?_aa	bc
./=	+*????		??N?LB*?b+?????gh???
l?4
*???Ӱ
???
abP*+?????Ӱ???@
	
9??Y?*?i????
??4
*???Ӱ
???
??V,*?Y+S??*??}~???
KL,*???T
??g*?+?	?M*,?
?	+?	?

:R
?M:?/*???&@s4????n?@@ f
HJOPH???HJ??H
HJe?HJo?HJ?PHJ24HQVWHJ??!"*	
@		




© 2015 - 2024 Weber Informatics LLC | Privacy Policy