private void await() {
        if (serverSocket == null) {
            return;
        }

        // Loop waiting for a connection and a valid command
        while (true) {
            // Wait for the next connection
            Socket socket = null;
            InputStream stream = null;
            try {
                socket = serverSocket.accept();
                socket.setSoTimeout(2000); // two seconds
                stream = socket.getInputStream();

                InetAddress radd = socket.getInetAddress();
                LOG.log(Level.INFO, "Have an closing request at " + radd);
            } catch (AccessControlException ace) {
                LOG.log(Level.WARNING, "security exception", ace);
                continue;
            } catch (IOException e) {
                LOG.log(Level.SEVERE, "accept socket failure", e);
                throw new RuntimeException(e);
            }

            // Read a set of characters from the socket
            StringBuilder command = new StringBuilder();
            int expected = shutdown.length(); // Cut off to avoid DoS attack
            while (expected > 0) {
                int ch = -1;
                try {
                    ch = stream.read();
                } catch (IOException e) {
                    ch = -1;
                }
                if (ch < 32) {// Control character or EOF terminates loop
                    break;
                }
                command.append((char) ch);
                expected--;
            }

            // Match against our command string
            if (command.toString().equals(shutdown)) {
                stopActivator();
                response(socket, STOPPED);
                break;
            } else {
                LOG.log(Level.INFO, "Invalid command '" + command.toString() + "' received");
                response(socket, INVALID);
            }
        }

        // Close the server socket and return
        try {
            serverSocket.close();
        } catch (IOException e) {
            ;
        }

    }