@Override
    public void run() {
        Runtime.getRuntime().addShutdownHook(new onShutdown(this));
        try {
            bridge = new Bridge(true, false);
            server = new CommandServer(InetAddress.getLocalHost().getHostAddress(), 53789, this);
        } catch (UnknownHostException e) {
            System.err.print("UnknownHostException when creating listening server: " + e.getMessage());
            System.exit(-1);
        } catch (Exception e) {
            System.err.print("Unknown Exception creating listening server: " + e.getMessage());
            System.exit(-1);
        }
        server.start();
        while (!this.masterStop) {
            this.bridge.execute(poll());
        }
        this.server.halt();
        this.bridge.shutdown();
    }