class ControllerImpl implements Controller {

    @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;
        }
    }

    public  ControllerImpl(final ServerConfigFactory serverConfigFactory,
                          final ServerSocketFactory serverSocketFactory,
                          final ServerGui gui);

}