Module com.pi4j
Package com.pi4j.provider
Class ProviderBase<PROVIDER_TYPE extends Provider,IO_TYPE extends IO,CONFIG_TYPE extends Config>
- java.lang.Object
-
- com.pi4j.common.IdentityBase<T>
-
- com.pi4j.extension.ExtensionBase<PROVIDER_TYPE>
-
- com.pi4j.provider.ProviderBase<PROVIDER_TYPE,IO_TYPE,CONFIG_TYPE>
-
- All Implemented Interfaces:
Describable
,Identity
,Lifecycle<PROVIDER_TYPE>
,Extension<PROVIDER_TYPE>
,Provider<PROVIDER_TYPE,IO_TYPE,CONFIG_TYPE>
- Direct Known Subclasses:
com.pi4j.io.gpio.GpioProviderBase
,I2CProviderBase
,PwmProviderBase
,SerialProviderBase
,SpiProviderBase
public abstract class ProviderBase<PROVIDER_TYPE extends Provider,IO_TYPE extends IO,CONFIG_TYPE extends Config> extends ExtensionBase<PROVIDER_TYPE> implements Provider<PROVIDER_TYPE,IO_TYPE,CONFIG_TYPE>
Abstract ProviderBase class.
- Version:
- $Id: $Id
- Author:
- Robert Savage (http://www.savagehomeautomation.com)
-
-
Field Summary
Fields Modifier and Type Field Description protected Context
context
protected org.slf4j.Logger
logger
-
Fields inherited from class com.pi4j.common.IdentityBase
description, id, metadata, name
-
-
Constructor Summary
Constructors Constructor Description ProviderBase()
Constructor for ProviderBase.ProviderBase(String id)
Constructor for ProviderBase.ProviderBase(String id, String name)
Constructor for ProviderBase.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Context
context()
PROVIDER_TYPE
initialize(Context context)
initialize.PROVIDER_TYPE
shutdown(Context context)
shutdown.-
Methods inherited from class com.pi4j.common.IdentityBase
description, id, metadata, name
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.pi4j.common.Identity
description, getDescription, getId, getMetadata, getName, id, metadata, name
-
-
-
-
Field Detail
-
logger
protected org.slf4j.Logger logger
-
context
protected Context context
-
-
Method Detail
-
initialize
public PROVIDER_TYPE initialize(Context context) throws InitializeException
initialize.
- Specified by:
initialize
in interfaceLifecycle<PROVIDER_TYPE extends Provider>
- Parameters:
context
- aContext
object.- Returns:
- a T object.
- Throws:
InitializeException
- if an error occurs during initialization.
-
shutdown
public PROVIDER_TYPE shutdown(Context context) throws ShutdownException
shutdown.
- Specified by:
shutdown
in interfaceLifecycle<PROVIDER_TYPE extends Provider>
- Parameters:
context
- aContext
object.- Returns:
- a T object.
- Throws:
ShutdownException
- if an error occurs during shutdown.
-
context
public Context context()
- Specified by:
context
in interfaceProvider<PROVIDER_TYPE extends Provider,IO_TYPE extends IO,CONFIG_TYPE extends Config>
-
-