- java.lang.Object
-
- com.pi4j.Pi4J
-
public class Pi4J extends Object
Pi4J class.
- Version:
- $Id: $Id
- Author:
- Robert Savage (http://www.savagehomeautomation.com)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Context
newAutoContext()
Returns a new 'Context' instance which represents the Pi4J runtime state and lifecycle.static Context
newContext()
Returns a new empty 'Context' instance which represents the Pi4J runtime state and lifecycle.static ContextBuilder
newContextBuilder()
Returns a new 'ContextBuilder' instance to help create a custom 'Context' which represents the Pi4J runtime state and lifecycle.
-
-
-
Method Detail
-
newContextBuilder
public static ContextBuilder newContextBuilder()
Returns a new 'ContextBuilder' instance to help create a custom 'Context' which represents the Pi4J runtime state and lifecycle. The 'ContextBuilder' will allow you to add custom 'Platforms' and 'Providers'.- Returns:
- ContextBuilder
-
newAutoContext
public static Context newAutoContext()
Returns a new 'Context' instance which represents the Pi4J runtime state and lifecycle. This 'Context' instance will automatically load all detected 'Platforms' and 'Providers' that are detected in the application's class-path.- Returns:
- Context
-
newContext
public static Context newContext()
Returns a new empty 'Context' instance which represents the Pi4J runtime state and lifecycle. This empty 'Context' will not contain any 'Platforms' or 'Providers' by default. The empty context can be used if 'Platforms' and 'Providers' need to be added to the runtime context.- Returns:
- Context
-
-