
com.groupbyinc.flux.http.HttpServer.class Maven / Gradle / Ivy
???? 3 #com/groupbyinc/flux/http/HttpServer hLcom/groupbyinc/flux/common/component/AbstractLifecycleComponent; ?com/groupbyinc/flux/common/component/AbstractLifecycleComponent HttpServer.java 4com/groupbyinc/flux/http/HttpServer$PluginSiteFilter PluginSiteFilter .com/groupbyinc/flux/http/HttpServer$Dispatcher
Dispatcher +com/groupbyinc/flux/rest/RestRequest$Method
$com/groupbyinc/flux/rest/RestRequest Method environment %Lcom/groupbyinc/flux/env/Environment; transport .Lcom/groupbyinc/flux/http/HttpServerTransport; restController )Lcom/groupbyinc/flux/rest/RestController; nodeService .Lcom/groupbyinc/flux/node/service/NodeService; disableSites Z pluginSiteFilter 6Lcom/groupbyinc/flux/http/HttpServer$PluginSiteFilter; DEFAULT_MIME_TYPES Ljava/util/Map; 5Ljava/util/Map; ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/env/Environment;Lcom/groupbyinc/flux/http/HttpServerTransport;Lcom/groupbyinc/flux/rest/RestController;Lcom/groupbyinc/flux/node/service/NodeService;)V *Lcom/groupbyinc/flux/common/inject/Inject; 1(Lcom/groupbyinc/flux/common/settings/Settings;)V ! $
% ((Lcom/groupbyinc/flux/http/HttpServer;)V ! '
( * , . 0 2 ,com/groupbyinc/flux/node/service/NodeService 4
setHttpServer 6 '
5 7 settings .Lcom/groupbyinc/flux/common/settings/Settings; 9 : ; http.disable_sites = java/lang/Boolean ? valueOf (Z)Ljava/lang/Boolean; A B
@ C ,com/groupbyinc/flux/common/settings/Settings E getAsBoolean :(Ljava/lang/String;Ljava/lang/Boolean;)Ljava/lang/Boolean; G H
F I booleanValue ()Z K L
@ M O
( ,com/groupbyinc/flux/http/HttpServerTransport R httpServerAdapter /(Lcom/groupbyinc/flux/http/HttpServerAdapter;)V T U S V this %Lcom/groupbyinc/flux/http/HttpServer; doStart ()V start ()Ljava/lang/Object; \ ] S ^ logger -Lcom/groupbyinc/flux/common/logging/ESLogger; ` a b +com/groupbyinc/flux/common/logging/ESLogger d
isInfoEnabled f L e g {} i java/lang/Object k boundAddress >()Lcom/groupbyinc/flux/common/transport/BoundTransportAddress; m n S o info ((Ljava/lang/String;[Ljava/lang/Object;)V q r e s http_address u :com/groupbyinc/flux/common/transport/BoundTransportAddress w publishAddress 9()Lcom/groupbyinc/flux/common/transport/TransportAddress; y z
x { 5com/groupbyinc/flux/common/transport/TransportAddress } toString ()Ljava/lang/String; ? ~ ? putAttribute '(Ljava/lang/String;Ljava/lang/String;)V ? ?
5 ? doStop removeAttribute (Ljava/lang/String;)V ? ?
5 ? stop ? ] S ? doClose close ? [ S ? %()Lcom/groupbyinc/flux/http/HttpInfo; q ? S ? stats &()Lcom/groupbyinc/flux/http/HttpStats; ? ? S ? internalDispatchRequest O(Lcom/groupbyinc/flux/http/HttpRequest;Lcom/groupbyinc/flux/http/HttpChannel;)V $com/groupbyinc/flux/http/HttpRequest ? rawPath ? ?
? ? /_plugin/ ? java/lang/String ?
startsWith (Ljava/lang/String;)Z ? ?
? ? 'com/groupbyinc/flux/rest/RestController ? filterChain Q(Lcom/groupbyinc/flux/rest/RestFilter;)Lcom/groupbyinc/flux/rest/RestFilterChain; ? ?
? ? (com/groupbyinc/flux/rest/RestFilterChain ? continueProcessing O(Lcom/groupbyinc/flux/rest/RestRequest;Lcom/groupbyinc/flux/rest/RestChannel;)V ? ? ? ? /favicon.ico ? equals (Ljava/lang/Object;)Z ? ?
? ?
handleFavicon ? ?
? dispatchRequest ? ?
? ? *Lcom/groupbyinc/flux/rest/RestFilterChain; request &Lcom/groupbyinc/flux/http/HttpRequest; channel &Lcom/groupbyinc/flux/http/HttpChannel; Ljava/lang/String; java/lang/Throwable ? java/io/IOException ? method /()Lcom/groupbyinc/flux/rest/RestRequest$Method; ? ?
? ? GET -Lcom/groupbyinc/flux/rest/RestRequest$Method; ? ? ? getClass ()Ljava/lang/Class; ? ?
l ? /config/favicon.ico ? java/lang/Class ? getResourceAsStream )(Ljava/lang/String;)Ljava/io/InputStream; ? ?
? ? 7com/groupbyinc/flux/common/google/common/io/ByteStreams ? toByteArray (Ljava/io/InputStream;)[B ? ?
? ? *com/groupbyinc/flux/rest/BytesRestResponse ? #com/groupbyinc/flux/rest/RestStatus ? OK %Lcom/groupbyinc/flux/rest/RestStatus; ? ? ? ? image/x-icon ? <(Lcom/groupbyinc/flux/rest/RestStatus;Ljava/lang/String;[B)V ! ?
? ? $com/groupbyinc/flux/http/HttpChannel ? sendResponse *(Lcom/groupbyinc/flux/rest/RestResponse;)V ? ?
? ? java/io/InputStream ?
? ?
addSuppressed (Ljava/lang/Throwable;)V ? ?
? ? INTERNAL_SERVER_ERROR ? ? ? ((Lcom/groupbyinc/flux/rest/RestStatus;)V !
? FORBIDDEN ? ? content [B restResponse ,Lcom/groupbyinc/flux/rest/BytesRestResponse; stream Ljava/io/InputStream; e Ljava/io/IOException; handlePluginSite OPTIONS ? length ()I
? substring (I)Ljava/lang/String;
? indexOf (I)I
? java/lang/StringBuilder ! [
!" append -(Ljava/lang/String;)Ljava/lang/StringBuilder;$%
!& /(
! ? MOVED_PERMANENTLY+ ? ?, text/html. 1