Class IfTttDaemon


  • public class IfTttDaemon
    extends Object
    This class represents a daemon for polling alarms in order to generate IFTTT events.
    • Constructor Detail

      • IfTttDaemon

        public IfTttDaemon​(AlarmDao alarmDao,
                           org.springframework.transaction.support.TransactionOperations transactionOperations,
                           File ifTttConfigFile)
        Constructor to create the daemon instance with a given configuraton file
        Parameters:
        alarmDao - the alarm dao instance to be used
        transactionOperations - the transaction template to be used
        ifTttConfigFile - the configuration file to be used
      • IfTttDaemon

        public IfTttDaemon​(AlarmDao alarmDao,
                           org.springframework.transaction.support.TransactionOperations transactionOperations)
        Constructor to create the daemon instance.
        Parameters:
        alarmDao - the alarm dao instance to be used
        transactionOperations - the transaction template to be used
    • Method Detail

      • start

        public void start()
        Starts the daemon
      • stop

        public void stop()
        Stops the daemon
      • fireIfTttTriggerSet

        protected void fireIfTttTriggerSet​(IfTttConfig ifTttConfig,
                                           String filterKey,
                                           String name,
                                           VariableNameExpansion variableNameExpansion)
        Executes a configured trigger set with a given String value.
        Parameters:
        ifTttConfig - the IFTTT config instance
        filterKey - the filter
        name - the event name
        variableNameExpansion - the VariableNameExpansion to be used