class SocketETLServer extends Thread {

    @Override
    public void run() {
        try {
            final InetAddress localHost = InetAddress.getLocalHost();
            server = new ServerSocket(port, -1, localHost);
            server.setReuseAddress(true);
            uri = TcpUriFactory.createUri(
                    (InetSocketAddress) server.getLocalSocketAddress());
            LOGGER.info("listening on '" + uri + "' for MMI events");
            while (!stopRequest) {
                final Socket socket = server.accept();
                final InetSocketAddress address =
                        (InetSocketAddress) socket.getRemoteSocketAddress();
                final URI remoteUri = TcpUriFactory.createUri(address);
                LOGGER.info("connection from " + remoteUri);
                final SocketETLClient client =
                        new SocketETLClient(adapter, socket);
                client.start();
            }
        } catch (IOException e) {
            LOGGER.error(e.getMessage(), e);
        } catch (URISyntaxException e) {
            LOGGER.error(e.getMessage(), e);
        }
    }

    public  SocketETLServer(final SocketETLProtocolAdapter protocolAdapter,
            final int portNumber);

}