code: private void addListener(Integer channel, Class<? extends Message> messageClass, MessageListener messageListener) {
          // Build up the empty class listener map if not already there
          if (!messageListenerMap.containsKey(messageClass)) {
             messageListenerMap.put(messageClass, ArrayListMultimap.create());
          }
  
          // Get the message listener map for the given class
          ArrayListMultimap<Integer, MessageListener> listenerMap = messageListenerMap.get(messageClass);
  
          // Get the message listener array for the given channel
          List<MessageListener> messageListeners = listenerMap.get(channel);
          if (!messageListeners.contains(messageListener)) {
              messageListeners.add(messageListener);
          }
      }
docs: Add a messageListener to the Firmata object which will fire whenever a matching message is received
  over the SerialPort that corresponds to the given channel. If the channel is null, the listener
  will fire regardless of which channel (pin) the message is coming from.
  
  @param channel Integer indicating the specific channel or pin to listen on, or null to listen to
  all messages regardless of channel/pin.
  @param messageClass Class indicating the message type to listen to.
  @param messageListener MessageListener object to handle a received Message event over the SerialPort.