File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change 99import java .util .concurrent .Executors ;
1010
1111public class App {
12-
13- private static ExecutorService threadPool ;
14- private static ServerFactory serverFactory ;
15- private static SocketHandlerFactory socketHandlerFactory ;
16- private static PathExaminer pathExaminer ;
17- private static Path root ;
18-
1912 public static void main (String [] args ) throws IOException {
2013 int port = Integer .parseInt (args [1 ]);
2114 String fileDirectory = args [3 ];
2215
23- pathExaminer = new PathExaminer ();
24- root = pathExaminer .getPath (fileDirectory );
16+ PathExaminer pathExaminer = new PathExaminer ();
17+ Path root = pathExaminer .getPath (fileDirectory );
2518 Path logPath = pathExaminer .concatenate (root ,"logs" );
2619 AppConfig appConfig = new AppConfig (root , new Logger (logPath , new FileOperator ()));
2720
28- serverFactory = new ServerFactory (new ServerSocketFactory (), appConfig );
29- socketHandlerFactory = new SocketHandlerFactory ();
21+ ServerFactory serverFactory = new ServerFactory (new ServerSocketFactory (), appConfig );
22+ SocketHandlerFactory socketHandlerFactory = new SocketHandlerFactory ();
3023
31- threadPool = Executors .newFixedThreadPool (16 );
24+ ExecutorService threadPool = Executors .newFixedThreadPool (16 );
3225
3326 Server server = serverFactory .makeServer (port );
3427 while (true ) {
You can’t perform that action at this time.
0 commit comments