com.groupbyinc.flux.http.netty4.Netty4HttpChannel.class Maven / Gradle / Ivy
???? 4? 1com/groupbyinc/flux/http/netty4/Netty4HttpChannel ,com/groupbyinc/flux/rest/AbstractRestChannel Netty4HttpChannel.java java/util/Map$Entry
java/util/Map Entry %java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles
Lookup transport ;Lcom/groupbyinc/flux/http/netty4/Netty4HttpServerTransport; channel Lio/netty/channel/Channel; nettyRequest -Lio/netty/handler/codec/http/FullHttpRequest; pipelinedRequest ALcom/groupbyinc/flux/http/netty4/pipelining/HttpPipelinedRequest;
threadContext :Lcom/groupbyinc/flux/common/util/concurrent/ThreadContext; TOO_MANY_REQUESTS 0Lio/netty/handler/codec/http/HttpResponseStatus; MAP Ljava/util/Map; fLjava/util/Map; ?(Lcom/groupbyinc/flux/http/netty4/Netty4HttpServerTransport;Lcom/groupbyinc/flux/http/netty4/Netty4HttpRequest;Lcom/groupbyinc/flux/http/netty4/pipelining/HttpPipelinedRequest;ZLcom/groupbyinc/flux/common/util/concurrent/ThreadContext;)V *(Lcom/groupbyinc/flux/rest/RestRequest;Z)V !
" $ 1com/groupbyinc/flux/http/netty4/Netty4HttpRequest &
getChannel ()Lio/netty/channel/Channel; ( )
' * , request /()Lio/netty/handler/codec/http/FullHttpRequest; . /
' 0 2 4 6 this 3Lcom/groupbyinc/flux/http/netty4/Netty4HttpChannel; 3Lcom/groupbyinc/flux/http/netty4/Netty4HttpRequest; detailedErrorsEnabled Z newBytesOutput :()Lcom/groupbyinc/flux/common/io/stream/BytesStreamOutput; @com/groupbyinc/flux/common/io/stream/ReleasableBytesStreamOutput ? 9com/groupbyinc/flux/http/netty4/Netty4HttpServerTransport A bigArrays +Lcom/groupbyinc/flux/common/util/BigArrays; C D B E .(Lcom/groupbyinc/flux/common/util/BigArrays;)V G
@ H sendResponse *(Lcom/groupbyinc/flux/rest/RestResponse;)V %com/groupbyinc/flux/rest/RestResponse L content 3()Lcom/groupbyinc/flux/common/bytes/BytesReference; N O
M P 0com/groupbyinc/flux/transport/netty4/Netty4Utils R toByteBuf L(Lcom/groupbyinc/flux/common/bytes/BytesReference;)Lio/netty/buffer/ByteBuf; T U
S V &io/netty/handler/codec/http/HttpMethod X HEAD (Lio/netty/handler/codec/http/HttpMethod; Z [ Y \ +io/netty/handler/codec/http/FullHttpRequest ^ method *()Lio/netty/handler/codec/http/HttpMethod; ` a _ b equals (Ljava/lang/Object;)Z d e
Y f io/netty/buffer/Unpooled h EMPTY_BUFFER Lio/netty/buffer/ByteBuf; j k i l newResponse I(Lio/netty/buffer/ByteBuf;)Lio/netty/handler/codec/http/FullHttpResponse; n o
p io/netty/buffer/ByteBuf r ,io/netty/handler/codec/http/FullHttpResponse t status '()Lcom/groupbyinc/flux/rest/RestStatus; v w
M x getStatus W(Lcom/groupbyinc/flux/rest/RestStatus;)Lio/netty/handler/codec/http/HttpResponseStatus; z {
| setStatus `(Lio/netty/handler/codec/http/HttpResponseStatus;)Lio/netty/handler/codec/http/FullHttpResponse; ~ u ?
getCorsConfig 9()Lcom/groupbyinc/flux/http/netty4/cors/Netty4CorsConfig; ? ?
B ? 6com/groupbyinc/flux/http/netty4/cors/Netty4CorsHandler ? setCorsResponseHeaders ?(Lio/netty/handler/codec/http/HttpRequest;Lio/netty/handler/codec/http/HttpResponse;Lcom/groupbyinc/flux/http/netty4/cors/Netty4CorsConfig;)V ? ?
? ? headers +()Lio/netty/handler/codec/http/HttpHeaders; ? ? _ ? X-Opaque-Id ? 'io/netty/handler/codec/http/HttpHeaders ? get &(Ljava/lang/String;)Ljava/lang/String; ? ?
? ? setHeaderField Q(Lio/netty/handler/codec/http/HttpResponse;Ljava/lang/String;Ljava/lang/String;)V ? ?
? java/lang/String ?
getHeaders ()Ljava/util/Map; ? ?
M ? addCustomHeaders <(Lio/netty/handler/codec/http/HttpResponse;Ljava/util/Map;)V ? ?
? 8com/groupbyinc/flux/common/util/concurrent/ThreadContext ? getResponseHeaders ? ?
? ? +com/groupbyinc/flux/common/lease/Releasable ? bytesOutputOrNull ? >
? +io/netty/handler/codec/http/HttpHeaderNames ? CONTENT_TYPE Lio/netty/util/AsciiString; ? ? ? ? io/netty/util/AsciiString ? toString ()Ljava/lang/String; ? ?
? ? contentType ? ?
M ? R(Lio/netty/handler/codec/http/HttpResponse;Ljava/lang/String;Ljava/lang/String;Z)V ? ?
? CONTENT_LENGTH ? ? ? ?
readableBytes ()I ? ?
s ? valueOf (I)Ljava/lang/String; ? ?
? ?
addCookies -(Lio/netty/handler/codec/http/HttpResponse;)V ? ?
? io/netty/channel/Channel ?
newPromise #()Lio/netty/channel/ChannelPromise; ? ? ? ? "java/lang/invoke/LambdaMetafactory ? metafactory ?(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; ? ?
? ? ? $(Lio/netty/util/concurrent/Future;)V ? lambda$sendResponse$0 U(Lcom/groupbyinc/flux/common/bytes/BytesReference;Lio/netty/util/concurrent/Future;)V ? ?
? ? operationComplete c(Lcom/groupbyinc/flux/common/bytes/BytesReference;)Lio/netty/util/concurrent/GenericFutureListener; ? ? ? io/netty/channel/ChannelPromise ? addListener S(Lio/netty/util/concurrent/GenericFutureListener;)Lio/netty/channel/ChannelPromise; ? ? ? ? /com/groupbyinc/flux/common/bytes/BytesReference ? lambda$sendResponse$1 ? ?
? ? e(Lcom/groupbyinc/flux/http/netty4/Netty4HttpChannel;)Lio/netty/util/concurrent/GenericFutureListener; ? ? ? isCloseConnection ()Z ? ?
? &io/netty/channel/ChannelFutureListener ? CLOSE (Lio/netty/channel/ChannelFutureListener; ? ? ? ?com/groupbyinc/flux/http/netty4/pipelining/HttpPipelinedRequest createHttpResponse ?(Lio/netty/handler/codec/http/FullHttpResponse;Lio/netty/channel/ChannelPromise;)Lcom/groupbyinc/flux/http/netty4/pipelining/HttpPipelinedResponse;
java/lang/Object
writeAndFlush U(Ljava/lang/Object;Lio/netty/channel/ChannelPromise;)Lio/netty/channel/ChannelFuture;
? close ()V ? 6com/groupbyinc/flux/common/io/stream/BytesStreamOutput
release ?
java/lang/Throwable resp .Lio/netty/handler/codec/http/FullHttpResponse; msg Ljava/lang/Object; promise !Lio/netty/channel/ChannelPromise; response 'Lcom/groupbyinc/flux/rest/RestResponse; buffer opaque Ljava/lang/String; 1Lcom/groupbyinc/flux/common/bytes/BytesReference; releaseContent releaseBytesStreamOutput *Lio/netty/handler/codec/http/HttpResponse; headerField value (io/netty/handler/codec/http/HttpResponse+, ? contains (Ljava/lang/String;)Z./
?0 add O(Ljava/lang/String;Ljava/lang/Object;)Lio/netty/handler/codec/http/HttpHeaders;23
?4 override resetCookies7 < B8 COOKIE: ? ?; ,(Ljava/lang/CharSequence;)Ljava/lang/String; ?=
?> 6io/netty/handler/codec/http/cookie/ServerCookieDecoder@ STRICT 8Lio/netty/handler/codec/http/cookie/ServerCookieDecoder;BC AD decode #(Ljava/lang/String;)Ljava/util/Set;FG
AH
java/util/SetJ isEmptyL ?KM
SET_COOKIEO ? ?P 6io/netty/handler/codec/http/cookie/ServerCookieEncoderR 8Lio/netty/handler/codec/http/cookie/ServerCookieEncoder;BT SU encode ((Ljava/util/Collection;)Ljava/util/List;WX
SY set W(Ljava/lang/CharSequence;Ljava/lang/Iterable;)Lio/netty/handler/codec/http/HttpHeaders;[\
?] cookies ; Ljava/util/Set; cookieString entrySet ()Ljava/util/Set;cd e iterator ()Ljava/util/Iterator;ghKi java/util/Iteratork hasNextm ?ln next ()Ljava/lang/Object;pqlr getValuetq u java/util/Listwxi getKeyzq { headerValue headerEntry MLjava/util/Map$Entry;>; Ljava/util/Map$Entry;
customHeaders GLjava/util/Map;>; isHttp10 protocolVersion +()Lio/netty/handler/codec/http/HttpVersion;?? _? 'io/netty/handler/codec/http/HttpVersion? HTTP_1_0 )Lio/netty/handler/codec/http/HttpVersion;?? ??
? f? ?
? ,io/netty/handler/codec/http/HttpHeaderValues? ? ? ??
CONNECTION? ? ?? contentEqualsIgnoreCase (Ljava/lang/CharSequence;)Z??
??
KEEP_ALIVE? ? ?? http10 .io/netty/handler/codec/http/HttpResponseStatus? OK? ?? 3io/netty/handler/codec/http/DefaultFullHttpResponse? u(Lio/netty/handler/codec/http/HttpVersion;Lio/netty/handler/codec/http/HttpResponseStatus;Lio/netty/buffer/ByteBuf;)V ?
?? u ?
Keep-Alive? U(Ljava/lang/CharSequence;Ljava/lang/Object;)Lio/netty/handler/codec/http/HttpHeaders;2?
?? HTTP_1_1?? ?? ? INTERNAL_SERVER_ERROR? ?? getOrDefault 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;?? ? %Lcom/groupbyinc/flux/rest/RestStatus; java/lang/Exception? f !Lio/netty/util/concurrent/Future; Too Many Requests? (ILjava/lang/String;)V ?
?? ? java/util/EnumMap? #com/groupbyinc/flux/rest/RestStatus? (Ljava/lang/Class;)V ?
?? CONTINUE?? ??? ?? put 6(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;??
?? SWITCHING_PROTOCOLS?? ??? ???? ?? CREATED?? ??? ?? ACCEPTED?? ??? ?? NON_AUTHORITATIVE_INFORMATION?? ??? ??
NO_CONTENT?? ??? ??
RESET_CONTENT?? ??? ?? PARTIAL_CONTENT?? ??? ?? MULTI_STATUS?? ?? MULTIPLE_CHOICES? ? ? MOVED_PERMANENTLY? ? ? FOUND? ? ? SEE_OTHER? ? ? NOT_MODIFIED? ? ? USE_PROXY? ? ? TEMPORARY_REDIRECT? ? ?" BAD_REQUEST$? ?%$ ?' UNAUTHORIZED)? ?*) ?, PAYMENT_REQUIRED.? ?/. ?1 FORBIDDEN3? ?43 ?6 NOT_FOUND8? ?98 ?; METHOD_NOT_ALLOWED=? ?>= ?@ NOT_ACCEPTABLEB? ?CB ?E PROXY_AUTHENTICATIONG? ?H PROXY_AUTHENTICATION_REQUIREDJ ?K REQUEST_TIMEOUTM? ?NM ?P CONFLICTR? ?SR ?U GONEW? ?XW ?Z LENGTH_REQUIRED\? ?]\ ?_ PRECONDITION_FAILEDa? ?ba ?d REQUEST_ENTITY_TOO_LARGEf? ?gf ?i REQUEST_URI_TOO_LONGk? ?lk ?n UNSUPPORTED_MEDIA_TYPEp? ?qp ?s REQUESTED_RANGE_NOT_SATISFIEDu? ?v REQUESTED_RANGE_NOT_SATISFIABLEx ?y EXPECTATION_FAILED{? ?|{ ?~ UNPROCESSABLE_ENTITY?? ?? LOCKED?? ?? FAILED_DEPENDENCY?? ?? ? ???? ?? NOT_IMPLEMENTED?? ??? ?? BAD_GATEWAY?? ??? ?? SERVICE_UNAVAILABLE?? ??? ?? GATEWAY_TIMEOUT?? ??? ?? HTTP_VERSION_NOT_SUPPORTED?? ??? ?? java/util/Collections? unmodifiableMap (Ljava/util/Map;)Ljava/util/Map;??
?? map jLjava/util/EnumMap; Ljava/util/EnumMap; Signature Code LocalVariableTable LineNumberTable
StackMapTable LocalVariableTypeTable t(Lio/netty/handler/codec/http/HttpResponse;Ljava/util/Map;>;)V
Exceptions BootstrapMethods
SourceFile InnerClasses 0
? ? ? (*,? #*+? %*,? +? -*,? 1? 3*-? 5*? 7? ? > ( 8 9 ( ( . : ( ( ; <