public class GpioFactory extends Object
This factory class provides a static method to create new 'GpioController' 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/)
GpioController
,
GpioProvider
,
https://www.pi4j.com/Modifier and Type | Method and Description |
---|---|
static GpioProvider |
getDefaultProvider()
Return default instance of
GpioProvider . |
static ExecutorServiceFactory |
getExecutorServiceFactory()
Return instance of
ExecutorServiceFactory . |
static GpioController |
getInstance()
Return default instance of
GpioController . |
static void |
setDefaultProvider(GpioProvider provider)
Sets default
GpioProvider . |
static void |
setExecutorServiceFactory(ExecutorServiceFactory executorServiceFactory)
Sets default
ExecutorServiceFactory . |
public static GpioController getInstance()
Return default instance of GpioController
.
Note: this is not thread safe singleton pattern implementation. Implementation does not provide any synchronization or mechanisms to prevent instantiation of two instances.
public static GpioProvider getDefaultProvider()
Return default instance of GpioProvider
.
Note: this is not thread safe singleton pattern implementation. Implementation does not provide any synchronization or mechanisms to prevent instantiation of two instances.
public static void setDefaultProvider(GpioProvider provider)
GpioProvider
.provider
- default gpio providerpublic static ExecutorServiceFactory getExecutorServiceFactory()
Return instance of ExecutorServiceFactory
.
Note: .
public static void setExecutorServiceFactory(ExecutorServiceFactory executorServiceFactory)
ExecutorServiceFactory
.executorServiceFactory
- service factory instanceCopyright © 2012–2021 Pi4J. All rights reserved.