Class IfTttDaemon


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

      Constructors 
      Constructor Description
      IfTttDaemon​(AlarmDao alarmDao, org.springframework.transaction.support.TransactionOperations transactionOperations)
      Constructor to create the daemon instance.
      IfTttDaemon​(AlarmDao alarmDao, org.springframework.transaction.support.TransactionOperations transactionOperations, java.io.File ifTttConfigFile)
      Constructor to create the daemon instance with a given configuraton file
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void fireIfTttTriggerSet​(IfTttConfig ifTttConfig, java.lang.String filterKey, java.lang.String name, VariableNameExpansion variableNameExpansion)
      Executes a configured trigger set with a given String value.
      void start()
      Starts the daemon
      void stop()
      Stops the daemon
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IfTttDaemon

        public IfTttDaemon​(AlarmDao alarmDao,
                           org.springframework.transaction.support.TransactionOperations transactionOperations,
                           java.io.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,
                                           java.lang.String filterKey,
                                           java.lang.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