Package com.diozero.util
Class DeviceFactoryHelper
java.lang.Object
com.diozero.util.DeviceFactoryHelper
public class DeviceFactoryHelper
extends java.lang.Object
Helper class for instantiating different devices via the configured provider.
To set the provider edit META-INF/services/com.diozero.internal.provider.NativeDeviceFactoryInterface
While the ServiceLoader supports multiple service providers, only the first entry in this file is used.
Alternatively you can set the command line property "com.diozero.devicefactory" to override the ServiceLoader.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEVICE_FACTORY_PROP
-
Constructor Summary
Constructors Constructor Description DeviceFactoryHelper()
-
Method Summary
Modifier and Type Method Description static NativeDeviceFactoryInterface
getNativeDeviceFactory()
static void
setNativeDeviceFactory(NativeDeviceFactoryInterface ndf)
-
Field Details
-
DEVICE_FACTORY_PROP
public static final java.lang.String DEVICE_FACTORY_PROP- See Also:
- Constant Field Values
-
-
Constructor Details
-
DeviceFactoryHelper
public DeviceFactoryHelper()
-
-
Method Details