
gnu.io.SerialManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nrjavaserial Show documentation
Show all versions of nrjavaserial Show documentation
Fork of the RXTX library with a focus on ease of use and the ability to embed in other libraries.
package gnu.io;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SerialManager {
private static final Logger LOGGER = LoggerFactory.getLogger(SerialManager.class);
private static SerialManager instance;
private static boolean loaded = false;
private SerialManager() throws NativeResourceException {
if (!loaded) {
loaded = true;
LOGGER.info("Load native library.");
new NativeResource().load("libNRJavaSerial");
}
}
public static SerialManager getInstance() throws NativeResourceException {
if (instance == null) {
instance = new SerialManager();
}
return instance;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy