Package gnu.io.factory
Class SerialPortRegistry
- java.lang.Object
-
- gnu.io.factory.SerialPortRegistry
-
public class SerialPortRegistry extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SerialPortRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends SerialPort>
SerialPortCreator<T>getPortCreatorForPortName(java.lang.String portName, java.lang.Class<T> expectedClass)Gets the best applicableSerialPortCreatorfor the givenportNameprotected voidregisterDefaultSerialPortCreators()Registers theRxTxPortCreatorand theRFC2217PortCreator.voidregisterSerialPortCreator(SerialPortCreator<? extends SerialPort> creator)Registers aSerialPortCreator.
-
-
-
Method Detail
-
registerDefaultSerialPortCreators
protected void registerDefaultSerialPortCreators()
Registers theRxTxPortCreatorand theRFC2217PortCreator.
-
registerSerialPortCreator
public void registerSerialPortCreator(SerialPortCreator<? extends SerialPort> creator)
Registers aSerialPortCreator.- Parameters:
creator-
-
getPortCreatorForPortName
public <T extends SerialPort> SerialPortCreator<T> getPortCreatorForPortName(java.lang.String portName, java.lang.Class<T> expectedClass)
Gets the best applicableSerialPortCreatorfor the givenportName- Parameters:
portName- The port's name.- Returns:
- A found
SerialPortCreatoror null if none could be found.
-
-