private void deliver(AbstractMessage message)
    {
        System.out.println("Delivering " + message);
        try {
            targetNode.receive(message);
            queue.remove();
        } catch (Exception e) {
            System.err.println("GSMessageChannel: exception: " + e.toString());
            System.out.println("Occured while handling " + message);
            System.out.println("Deregistering channel to " + targetName);

            if (targetName.substring(0, 2).equals("GS")) {
                parent.markGSNodeAsDead(targetName);
            } else if (targetName.substring(0, 2).equals("RM")) {
                parent.markRMNodeAsDead(targetName);
            }
        }
    }