test_class.declarator: serverConfigFactory
test_class.modifier: private static
test_class.original_string: private static ServerConfigFactory serverConfigFactory;
test_class.type: ServerConfigFactory
test_class.var_name: serverConfigFactory
test_class.declarator: serverSocketFactory
test_class.modifier: private static
test_class.original_string: private static ServerSocketFactory serverSocketFactory;
test_class.type: ServerSocketFactory
test_class.var_name: serverSocketFactory
test_class.declarator: serverConfig
test_class.modifier: private static
test_class.original_string: private static ServerConfig serverConfig;
test_class.type: ServerConfig
test_class.var_name: serverConfig
test_class.declarator: serverGui
test_class.modifier: private static
test_class.original_string: private static ServerGui serverGui;
test_class.type: ServerGui
test_class.var_name: serverGui
test_class.file: http/src/test/java/ro/polak/http/controller/impl/ControllerImplTest.java
test_class.identifier: ControllerImplTest
test_case.body: @Test(expected = IllegalStateException.class)
      public void shouldThrowExceptionOnIllegalStart() {
          ControllerImpl controllerImpl = new ControllerImpl(serverConfigFactory, serverSocketFactory,
                  serverGui);
  
          controllerImpl.start();
          controllerImpl.start();
      }
test_case.class_method_signature: ControllerImplTest.shouldThrowExceptionOnIllegalStart()
test_case.full_signature: @Test(expected = IllegalStateException.class) public void shouldThrowExceptionOnIllegalStart()
test_case.identifier: shouldThrowExceptionOnIllegalStart
test_case.invocations: start start
test_case.modifiers: @Test(expected = IllegalStateException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldThrowExceptionOnIllegalStart()
focal_class.declarator: LOGGER = Logger.getLogger(ControllerImpl.class.getName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = Logger.getLogger(ControllerImpl.class.getName());
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: gui
focal_class.modifier: private final
focal_class.original_string: private final ServerGui gui;
focal_class.type: ServerGui
focal_class.var_name: gui
focal_class.declarator: serverConfigFactory
focal_class.modifier: private final
focal_class.original_string: private final ServerConfigFactory serverConfigFactory;
focal_class.type: ServerConfigFactory
focal_class.var_name: serverConfigFactory
focal_class.declarator: serverSocketFactory
focal_class.modifier: private final
focal_class.original_string: private final ServerSocketFactory serverSocketFactory;
focal_class.type: ServerSocketFactory
focal_class.var_name: serverSocketFactory
focal_class.declarator: webServer
focal_class.modifier: private
focal_class.original_string: private WebServer webServer;
focal_class.type: WebServer
focal_class.var_name: webServer
focal_class.file: http/src/main/java/ro/polak/http/controller/impl/ControllerImpl.java
focal_class.identifier: ControllerImpl
focal_class.interfaces: implements Controller
focal_class.class_method_signature: ControllerImpl.ControllerImpl(final ServerConfigFactory serverConfigFactory,
                            final ServerSocketFactory serverSocketFactory,
                            final ServerGui gui)
focal_class.full_signature: public  ControllerImpl(final ServerConfigFactory serverConfigFactory,
                            final ServerSocketFactory serverSocketFactory,
                            final ServerGui gui)
focal_class.identifier: ControllerImpl
focal_class.modifiers: public
focal_class.parameters: (final ServerConfigFactory serverConfigFactory,
                            final ServerSocketFactory serverSocketFactory,
                            final ServerGui gui)
focal_class.signature:  ControllerImpl(final ServerConfigFactory serverConfigFactory,
                            final ServerSocketFactory serverSocketFactory,
                            final ServerGui gui)
focal_class.class_method_signature: ControllerImpl.getWebServer()
focal_class.full_signature: @Override public WebServer getWebServer()
focal_class.identifier: getWebServer
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: WebServer
focal_class.signature: WebServer getWebServer()
focal_class.class_method_signature: ControllerImpl.start()
focal_class.full_signature: @Override public void start()
focal_class.identifier: start
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void start()
focal_class.class_method_signature: ControllerImpl.stop()
focal_class.full_signature: @Override public void stop()
focal_class.identifier: stop
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void stop()
focal_method.body: @Override
      public void start() throws IllegalStateException {
          if (webServer != null) {
              throw new IllegalStateException("Webserver already started!");
          }
          ServerSocket serverSocket;
          try {
              serverSocket = serverSocketFactory.createServerSocket();
          } catch (IOException e) {
              LOGGER.log(Level.SEVERE, "Unable to create server socket ", e);
              return;
          }
  
          webServer = new WebServer(serverSocket, serverConfigFactory.getServerConfig());
          if (webServer.startServer()) {
              gui.start();
          } else {
              webServer = null;
          }
      }
focal_method.class_method_signature: ControllerImpl.start()
focal_method.full_signature: @Override public void start()
focal_method.identifier: start
focal_method.invocations: createServerSocket log getServerConfig startServer start
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void start()