com.groupbyinc.flux.common.http.impl.bootstrap.HttpServer.class Maven / Gradle / Ivy
???? 2$ 9com/groupbyinc/flux/common/http/impl/bootstrap/HttpServer java/lang/Object HttpServer.java @com/groupbyinc/flux/common/http/impl/bootstrap/HttpServer$Status Status port I ifAddress Ljava/net/InetAddress; socketConfig 5Lcom/groupbyinc/flux/common/http/config/SocketConfig; serverSocketFactory Ljavax/net/ServerSocketFactory; httpService 6Lcom/groupbyinc/flux/common/http/protocol/HttpService; connectionFactory 7Lcom/groupbyinc/flux/common/http/HttpConnectionFactory; }Lcom/groupbyinc/flux/common/http/HttpConnectionFactory<+Lcom/groupbyinc/flux/common/http/impl/DefaultBHttpServerConnection;>; sslSetupHandler FLcom/groupbyinc/flux/common/http/impl/bootstrap/SSLServerSetupHandler; exceptionLogger 1Lcom/groupbyinc/flux/common/http/ExceptionLogger; listenerExecutorService )Ljava/util/concurrent/ThreadPoolExecutor;
workerThreads Ljava/lang/ThreadGroup; workerExecutorService CLcom/groupbyinc/flux/common/http/impl/bootstrap/WorkerPoolExecutor; status -Ljava/util/concurrent/atomic/AtomicReference; qLjava/util/concurrent/atomic/AtomicReference; serverSocket Ljava/net/ServerSocket; requestListener @Lcom/groupbyinc/flux/common/http/impl/bootstrap/RequestListener; R(ILjava/net/InetAddress;Lcom/groupbyinc/flux/common/http/config/SocketConfig;Ljavax/net/ServerSocketFactory;Lcom/groupbyinc/flux/common/http/protocol/HttpService;Lcom/groupbyinc/flux/common/http/HttpConnectionFactory;Lcom/groupbyinc/flux/common/http/impl/bootstrap/SSLServerSetupHandler;Lcom/groupbyinc/flux/common/http/ExceptionLogger;)V ()V ' )
*
, .
0 2 4 6 8 : 'java/util/concurrent/ThreadPoolExecutor < java/util/concurrent/TimeUnit > MILLISECONDS Ljava/util/concurrent/TimeUnit; @ A ? B %java/util/concurrent/SynchronousQueue D
E * @com/groupbyinc/flux/common/http/impl/bootstrap/ThreadFactoryImpl G java/lang/StringBuilder I
J * HTTP-listener- L append -(Ljava/lang/String;)Ljava/lang/StringBuilder; N O
J P (I)Ljava/lang/StringBuilder; N R
J S toString ()Ljava/lang/String; U V
J W (Ljava/lang/String;)V ' Y
H Z m(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;)V ' \
= ] _ java/lang/ThreadGroup a HTTP-workers c
b Z f Acom/groupbyinc/flux/common/http/impl/bootstrap/WorkerPoolExecutor h??? SECONDS k A ? l HTTP-worker n ,(Ljava/lang/String;Ljava/lang/ThreadGroup;)V ' p
H q
i ] t +java/util/concurrent/atomic/AtomicReference v READY BLcom/groupbyinc/flux/common/http/impl/bootstrap/HttpServer$Status; x y z (Ljava/lang/Object;)V ' |
w } ! this ;Lcom/groupbyinc/flux/common/http/impl/bootstrap/HttpServer; getInetAddress ()Ljava/net/InetAddress; # $ ? java/net/ServerSocket ? ? ?
? ? localSocket getLocalPort ()I ? ?
? ? start java/io/IOException ? ACTIVE ? y ?
compareAndSet '(Ljava/lang/Object;Ljava/lang/Object;)Z ? ?
w ? 3com/groupbyinc/flux/common/http/config/SocketConfig ? getBacklogSize ? ?
? ? javax/net/ServerSocketFactory ? createServerSocket 1(IILjava/net/InetAddress;)Ljava/net/ServerSocket; ? ?
? ? isSoReuseAddress ()Z ? ?
? ? setReuseAddress (Z)V ? ?
? ?
getRcvBufSize ? ?
? ? setReceiveBufferSize (I)V ? ?
? ? javax/net/ssl/SSLServerSocket ? Dcom/groupbyinc/flux/common/http/impl/bootstrap/SSLServerSetupHandler ?
initialize "(Ljavax/net/ssl/SSLServerSocket;)V ? ? ? ? >com/groupbyinc/flux/common/http/impl/bootstrap/RequestListener ?(Lcom/groupbyinc/flux/common/http/config/SocketConfig;Ljava/net/ServerSocket;Lcom/groupbyinc/flux/common/http/protocol/HttpService;Lcom/groupbyinc/flux/common/http/HttpConnectionFactory;Lcom/groupbyinc/flux/common/http/ExceptionLogger;Ljava/util/concurrent/ExecutorService;)V ' ?
? ? % & ? execute (Ljava/lang/Runnable;)V ? ?
= ? stop STOPPING ? y ? shutdown ? )
= ?
i ? terminate ? )
? ? /com/groupbyinc/flux/common/http/ExceptionLogger ? log (Ljava/lang/Exception;)V ? ? ? ? interrupt ? )
b ? ex Ljava/io/IOException; local awaitTermination #(JLjava/util/concurrent/TimeUnit;)V java/lang/InterruptedException ? #(JLjava/util/concurrent/TimeUnit;)Z ? ?
i ? timeout J timeUnit ? )
? ? ?
? java/lang/Thread ?
currentThread ()Ljava/lang/Thread; ? ?
? ?
? ?
getWorkers ()Ljava/util/Set; ? ?
i ?
java/util/Set ? iterator ()Ljava/util/Iterator; ? ? ? ? java/util/Iterator ? hasNext ? ? ? next ()Ljava/lang/Object; ? 5com/groupbyinc/flux/common/http/impl/bootstrap/Worker
getConnection 8()Lcom/groupbyinc/flux/common/http/HttpServerConnection;
4com/groupbyinc/flux/common/http/HttpServerConnection
? Ljava/lang/InterruptedException; conn 6Lcom/groupbyinc/flux/common/http/HttpServerConnection; worker 7Lcom/groupbyinc/flux/common/http/impl/bootstrap/Worker; i$ Ljava/util/Iterator; gracePeriod workers HLjava/util/Set; Ljava/util/Set; Signature Code LocalVariableTable LocalVariableTypeTable LineNumberTable?(ILjava/net/InetAddress;Lcom/groupbyinc/flux/common/http/config/SocketConfig;Ljavax/net/ServerSocketFactory;Lcom/groupbyinc/flux/common/http/protocol/HttpService;Lcom/groupbyinc/flux/common/http/HttpConnectionFactory<+Lcom/groupbyinc/flux/common/http/impl/DefaultBHttpServerConnection;>;Lcom/groupbyinc/flux/common/http/impl/bootstrap/SSLServerSetupHandler;Lcom/groupbyinc/flux/common/http/ExceptionLogger;)V
StackMapTable
Exceptions
SourceFile InnerClasses !
! " B # $ B % &