Skip to content

Commit

Permalink
Improve SerialPortManager.getIdentifiers() JavaDoc (openhab#1471)
Browse files Browse the repository at this point in the history
* Improve SerialPortManager.getIdentifiers() JavaDoc

The current JavaDocs do not clearly state that it does not always return all identifiers.
E.g. it will not return any RFC2217 identifiers or undiscovered RXTX port identifiers.
So it should not be used to search for an identifier when the serial port name is known.
This method is useful for listing available port options in UIs and logging.

Signed-off-by: Wouter Born <github@maindrain.net>
  • Loading branch information
wborn committed May 13, 2020
1 parent 178ffdf commit 583ea02
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ public interface SerialPortManager {
}

/**
* Gets the serial port identifiers.
* Gets the discovered serial port identifiers.
*
* @return stream of serial port identifiers
* {@link SerialPortProvider}s may not be able to discover any or all identifiers.
* When the port name is known, the preferred way to get an identifier is by using {@link #getIdentifier(String)}.
*
* @return stream of discovered serial port identifiers
*/
Stream<SerialPortIdentifier> getIdentifiers();
}

0 comments on commit 583ea02

Please sign in to comment.