Package com.pi4j.io.gpio.trigger
Class IFTTTMakerChannelTrigger
- java.lang.Object
-
- com.pi4j.io.gpio.trigger.GpioTriggerBase
-
- com.pi4j.io.gpio.trigger.IFTTTMakerChannelTrigger
-
- All Implemented Interfaces:
GpioTrigger
public class IFTTTMakerChannelTrigger extends GpioTriggerBase
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
IFTTT_MAKER_CHANNEL_URL
-
Constructor Summary
Constructors Constructor Description IFTTTMakerChannelTrigger(String apikey, String eventName)
IFTTTMakerChannelTrigger(String apikey, String eventName, IFTTTMakerChannelTriggerListener listener)
IFTTTMakerChannelTrigger(String apikey, String eventName, PinState state)
IFTTTMakerChannelTrigger(String apikey, String eventName, PinState[] states)
IFTTTMakerChannelTrigger(String apikey, String eventName, PinState[] states, IFTTTMakerChannelTriggerListener listener)
IFTTTMakerChannelTrigger(String apikey, String eventName, PinState state, IFTTTMakerChannelTriggerListener listener)
IFTTTMakerChannelTrigger(String apikey, String eventName, List<PinState> states)
IFTTTMakerChannelTrigger(String apikey, String eventName, List<PinState> states, IFTTTMakerChannelTriggerListener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
invoke(GpioPin pin, PinState state)
void
setTriggerListener(IFTTTMakerChannelTriggerListener listener)
Use this method to register/assign a custom trigger listener.-
Methods inherited from class com.pi4j.io.gpio.trigger.GpioTriggerBase
addPinState, addPinState, hasPinState
-
-
-
-
Field Detail
-
IFTTT_MAKER_CHANNEL_URL
protected static final String IFTTT_MAKER_CHANNEL_URL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
IFTTTMakerChannelTrigger
public IFTTTMakerChannelTrigger(String apikey, String eventName, PinState state)
-
IFTTTMakerChannelTrigger
public IFTTTMakerChannelTrigger(String apikey, String eventName, PinState[] states)
-
IFTTTMakerChannelTrigger
public IFTTTMakerChannelTrigger(String apikey, String eventName, List<PinState> states)
-
IFTTTMakerChannelTrigger
public IFTTTMakerChannelTrigger(String apikey, String eventName, IFTTTMakerChannelTriggerListener listener)
-
IFTTTMakerChannelTrigger
public IFTTTMakerChannelTrigger(String apikey, String eventName, PinState state, IFTTTMakerChannelTriggerListener listener)
-
IFTTTMakerChannelTrigger
public IFTTTMakerChannelTrigger(String apikey, String eventName, PinState[] states, IFTTTMakerChannelTriggerListener listener)
-
IFTTTMakerChannelTrigger
public IFTTTMakerChannelTrigger(String apikey, String eventName, List<PinState> states, IFTTTMakerChannelTriggerListener listener)
-
-
Method Detail
-
setTriggerListener
public void setTriggerListener(IFTTTMakerChannelTriggerListener listener)
Use this method to register/assign a custom trigger listener. This callback listener is fired when the IFTTTMakerChannelTrigger receives a GPIO pin change that invokes the trigger. This listener provides the consumer an opportunity to be notified of the trigger event, to optionally abort the triggered event before sending data to the IFTTT Maker Channel API, or an opportunity to override any data payload values before transmitting to the IFTTT Maker Channel API.- Parameters:
listener
-
-
invoke
public void invoke(GpioPin pin, PinState state)
- Specified by:
invoke
in interfaceGpioTrigger
- Specified by:
invoke
in classGpioTriggerBase
-
-