code: public void addPortOwnershipListener(CommPortOwnershipListener c) {
          LOGGER.fine("CommPortIdentifier:addPortOwnershipListener()");
  
          /*  is the Vector instantiated? */
          if (ownershipListener == null) {
              ownershipListener = new Vector();
          }
  
          if (!ownershipListener.contains(c)) {
              ownershipListener.addElement(c);
          }
      }
docs: Registers an ownership listener. The listener will be informed when other
  applications open or close the port which is represented by this
  <code>CommPortIdentifier</code>. When the port is currently owned by this
  application the listener is informed when other applications request
  ownership of the port.
  
  @param c the ownership listener to register