public void run()
    {
        AbstractMessage message;
        try {
            // Take a new message from the queue or wait.
            while (!isInterrupted() && (message = queue.take()) != null) {
                handleMessage(message);
            }
        } catch (InterruptedException e) {
            System.out.println("Interrupted GSMessageHandler");
        }
    }