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: 129
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
?8Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;?	()Ljava/lang/Object;lambda$dispatchRequest$3:(Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/lang/Object;	

getE(Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/util/function/Supplier;6com/groupbyinc/flux/common/apache/logging/log4j/Loggererror*(Ljava/lang/Object;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??
??$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_traceparamAsBoolean(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;-.
/0?(Lcom/groupbyinc/flux/rest/MethodHandlers;)Ljava/util/Optional;2gflatMap5?
?6?S
8handleBadRequest:?
;
httpHeaderkeyit?Ljava/util/Iterator;Ljava/util/Iterator;allHandlersjava/util/HashMapCparams()Ljava/util/Map;EF
G(Ljava/util/Map;)V.I
DJgetPath:(Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/lang/String;LM
Nlambda$getAllHandlers$8F(Lcom/groupbyinc/flux/rest/RestRequest;Ljava/util/Map;)Ljava/util/Map;PQ
RSFT(Lcom/groupbyinc/flux/rest/RestRequest;Ljava/util/Map;)Ljava/util/function/Supplier;VWretrieveAllE(Ljava/lang/String;Ljava/util/function/Supplier;)Ljava/util/Iterator;YZ
[originalParams5Ljava/util/Map;Ljava/util/Map;METHOD_NOT_ALLOWED`3	1aIncorrect HTTP method for uri [curie?
f] and method [h], allowed: jAllowl,ncollectionToDelimitedString:(Ljava/lang/Iterable;Ljava/lang/String;)Ljava/lang/String;pq
?r	addHeadert
?ubytesRestResponse,Lcom/groupbyinc/flux/rest/BytesRestResponse;OKy3	1zNo handler found for uri [|]~:(Lcom/groupbyinc/flux/rest/RestStatus;Ljava/lang/String;)V.?
??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/common/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?close?s
??
:	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?I??
getHandlerC(Lcom/groupbyinc/flux/rest/RestRequest$Method;)Ljava/util/Optional;??
??QIZ?h??
?Lcom/groupbyinc/flux/common/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;??
??	mHandlersnewMHandler
access$000x0desiredAssertionStatus??
??	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:'(: !:#$:%&:*+?:'): "?*
QCRST"U(W-X3Y9Z??(VXZ\^`??kl??(?n?-?p??rY?u?*+,?pY-?x?|??>(gh(}~(?(??(??(???gi'j?????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~~~ ~QR?6
??? ?*?5?H?K?M?R?Y?g?}??,?
????:$?
$?#?S?G	?+?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+	?
?,????? gh?569??????*???:??'???:+??:?-? ???6*+,?"?,,?5$?????*+?(::??1??,+?4?7:*+,*?d?96??????	*+,?????a8?A?gh??? <i?-]HBA? ???a8?@]HB@?V=!>)?.@6B9D<FEGMHPGUIVM]NkO?P?Q?R?T?W?X?Z??*???
4?
??%&?t ?DY+?H?KM*?=*+?O+,?X?\??  gh ]_?]^?
_`????!x,?b??Y??d??+?g??i??+????k??-??????:m-o?s?v,???):*?=?A,??Y?DF?L?O???NQ$?>7wxS$Pxghxxx?(?x???*
qr2q7sFtNxQuSvawwy?	?Q$%?????i+???¦8-???/??Y?{F?L?O:m-o?s?v,???,+???¦"-???,??Y?{F?L?O????4%wxighiii?(?i?????%?4?<?R?h???(?:???;,??Y?5??Y??}??+?g??i??+?????????????? ;gh;;???5?:?????4??Y??M*+?(N-:????,,????W???,??4!?A4gh4,?(&BA? !?@,??&B@?????2???X? ?LM?9+???gh??????	?+??????*?????N:??Y??:-??X??Y?{?????:,??-?P?-???D:???8-???1::?:-??-???:???-????3N,??Y?DF?L?O???,??Y??F?L?O???MQT:Dg:Dp{?:grp
??$?H!#??<?x????P?gh???>?
??!?(?<?D?g?p??????????????Z?T??::F:H:???:::??B$
???2*??Ű?%&??
???B*+?ɹ??Ӱ??(????
PQ?T*?H??*?H+??*?H??]_?b	cd
-.?=	+*???۰?		???O?L?B*?b+??????gh????
l??4
*???Ӱ?
????
ab?P*+?????Ӱ??????@
	
?9??Y?*?g?????
???4
*???Ӱ?
????
???V,*?Y+S????*??}~??????
KL?,*?????U???/*?????&?A?s?4?????n??A?@f
HJOPH???HJ??H
HJe?HJo?HJ?PHJ13HTUHJ??*	
@		




© 2015 - 2025 Weber Informatics LLC | Privacy Policy