Hold the conversation.
if (!(thePort instanceof SerialPort)) {
System.err.println("But I wanted a SERIAL port!");
System.exit(1);
}
// Tell the Comm API that we want serial events.
((SerialPort)thePort).notifyOnDataAvailable(true);
try {
((SerialPort)thePort).addEventListener(this);
} catch (TooManyListenersException ev) {
// "CantHappen" error
System.err.println("Too many listeners(!) " + ev);
System.exit(0);
}