Module com.pi4j
Package com.pi4j

Class Pi4J

java.lang.Object
com.pi4j.Pi4J

public class Pi4J extends Object

Pi4J class.

Version:
$Id: $Id
Author:
Robert Savage (http://www.savagehomeautomation.com)
  • Method Details

    • 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