public <T extends IMessage>void addHandler(final Class<T> type, final IMessageHandler<T> handler) {
        List<IMessageHandler<? extends IMessage>> handlers = handlersByMessage.get(type);
        
        if (handlers == null) {
            handlers = new ArrayList<IMessageHandler<? extends IMessage>>();
            handlersByMessage.put(type, handlers);
        }
        
        if (!handlers.contains(handler)) {
            handlers.add(handler);
        }
    }