code: public void addListener(ComObjectListener listener) {
          if(listener==null)
              throw new IllegalArgumentException("listener is null");
          if(listeners.contains(listener))
              throw new IllegalArgumentException("can't register the same listener twice");
          listeners.add(listener);
      }
docs: Adds a {@link ComObjectListener} to this {@link ComThread}
  @param listener the new listener
  @throws IllegalArgumentException if the <code>listener</code> is <code>null</code> or if the listener is already registered.