code: @SuppressWarnings("unchecked")
      public <E> MessageHandler<? super E> addReceivedMessageHandler(Class<E> type,
              MessageHandler<? super E> handler) {
          receivedMessageHandlerCache.clear();
          return (MessageHandler<? super E>) receivedMessageHandlers.put(type, handler);
      }
docs: Registers a {@link MessageHandler} that handles the received messages of
  the specified <code>type</code>.
  
  @return the old handler if there is already a registered handler for
  the specified <tt>type</tt>.  <tt>null</tt> otherwise.