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 applicableSerialPortCreator
for the givenportName
protected void
registerDefaultSerialPortCreators()
Registers theRxTxPortCreator
and theRFC2217PortCreator
.void
registerSerialPortCreator(SerialPortCreator<? extends SerialPort> creator)
Registers aSerialPortCreator
.
-
-
-
Method Detail
-
registerDefaultSerialPortCreators
protected void registerDefaultSerialPortCreators()
Registers theRxTxPortCreator
and 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 applicableSerialPortCreator
for the givenportName
- Parameters:
portName
- The port's name.- Returns:
- A found
SerialPortCreator
or null if none could be found.
-
-