public class SerialFactory extends Object
This factory class provide a static method to create new 'Serial' instances.
Before using the Pi4J library, you need to ensure that the Java VM in configured with access to the following system libraries:
This library depends on the wiringPi native system library. (developed by Gordon Henderson @ http://wiringpi.com/)
Serial
,
SerialDataEvent
,
SerialDataEventListener
,
https://www.pi4j.com/Modifier and Type | Method and Description |
---|---|
static Serial |
createInstance()
Create New Serial instance
|
static ExecutorServiceFactory |
getExecutorServiceFactory()
Return instance of
ExecutorServiceFactory . |
static boolean |
isShutdown()
This method returns TRUE if the serial controller has been shutdown.
|
static void |
setExecutorServiceFactory(ExecutorServiceFactory executorServiceFactory)
Sets default
ExecutorServiceFactory . |
static void |
shutdown()
This method can be called to forcefully shutdown all serial port
monitoring, listening, and task threads/executors.
|
public static Serial createInstance()
public static ExecutorServiceFactory getExecutorServiceFactory()
Return instance of ExecutorServiceFactory
.
Note: .
public static void setExecutorServiceFactory(ExecutorServiceFactory executorServiceFactory)
ExecutorServiceFactory
.executorServiceFactory
- service factory instancepublic static boolean isShutdown()
public static void shutdown()
Copyright © 2012–2019 Pi4J. All rights reserved.