Interface SerialPortProvider
@NonNullByDefault
public interface SerialPortProvider
Provides a concrete SerialPort which can handle remote (e.g. via rfc2217) or local ports.
- Author:
- Matthias Steigenberger - Initial contribution
-
Method Summary
Modifier and TypeMethodDescriptionGets all protocol types which this provider is able to create.@Nullable SerialPortIdentifiergetPortIdentifier(URI portName) Gets theSerialPortIdentifierif it is available or null otherwise.Gets all the availableSerialPortIdentifiers for thisSerialPortProvider.
-
Method Details
-
getPortIdentifier
Gets theSerialPortIdentifierif it is available or null otherwise.- Parameters:
portName- The ports name.- Returns:
- The created
SerialPortornullif the serial port does not exist. - Throws:
UnsupportedCommOperationExceptionPortInUseException
-
getAcceptedProtocols
Stream<ProtocolType> getAcceptedProtocols()Gets all protocol types which this provider is able to create.- Returns:
- The protocol type.
-
getSerialPortIdentifiers
Stream<SerialPortIdentifier> getSerialPortIdentifiers()Gets all the availableSerialPortIdentifiers for thisSerialPortProvider. Please note: Discovery is not available necessarily, hence thegetPortIdentifier(URI)must be used in this case.- Returns:
- The available ports
-