How does the CommPortIdentifier class relate to CommPort?
There is a one-to-one correspondence between a CommPortIdentifier object and a CommPort object. CommPortIdentifier provides functionality for discovering comm ports at init time, opening comm ports and managing ownership change events. The static method CommPortIdentifier.getPortIdentifier(String portName) returns a CommPortIdentifier instance with portName, while getPortIdentifiers() returns an enumeration of CommPortIdentifier objects that represent all the available ports.