Class TriggerConfiguration
- java.lang.Object
-
- org.apache.plc4x.java.scraper.triggeredscraper.triggerhandler.TriggerConfiguration
-
public class TriggerConfiguration extends Object
basic configuration for all available triggers and handling of regarding condition
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTriggerConfiguration.Comparatorstatic classTriggerConfiguration.ConcatTypestatic classTriggerConfiguration.TriggerElementstatic classTriggerConfiguration.TriggerType
-
Constructor Summary
Constructors Constructor Description TriggerConfiguration(TriggerConfiguration.TriggerType triggerType, String scrapeInterval)default constructor when scheduled trigger shall be performedTriggerConfiguration(TriggerConfiguration.TriggerType triggerType, String scrapeInterval, List<TriggerConfiguration.TriggerElement> triggerElementList, TriggeredScrapeJobImpl triggeredScrapeJobImpl)default constructor when a tag should be used for triggering
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TriggerConfigurationcreateConfiguration(String jobTriggerStrategy, TriggeredScrapeJobImpl triggeredScrapeJob)creates the TriggerConfiguration for a given ScrapeJob from triggerConfig-StringlonggetScrapeInterval()List<TriggerConfiguration.TriggerElement>getTriggerElementList()
-
-
-
Constructor Detail
-
TriggerConfiguration
public TriggerConfiguration(TriggerConfiguration.TriggerType triggerType, String scrapeInterval, List<TriggerConfiguration.TriggerElement> triggerElementList, TriggeredScrapeJobImpl triggeredScrapeJobImpl) throws ScraperConfigurationException
default constructor when a tag should be used for triggering- Parameters:
triggerType- type of trigger from enumscrapeInterval- scrape interval of triggered variabletriggerElementList- list of triggerElements with concat that combined is used as triggertriggeredScrapeJobImpl- the job which is valid for the configuration- Throws:
ScraperConfigurationException- when something goes wrong with configuration
-
TriggerConfiguration
public TriggerConfiguration(TriggerConfiguration.TriggerType triggerType, String scrapeInterval) throws ScraperConfigurationException
default constructor when scheduled trigger shall be performed- Parameters:
triggerType- type of trigger from enumscrapeInterval- scrape interval of data from block- Throws:
ScraperConfigurationException- when something goes wrong with configuration
-
-
Method Detail
-
createConfiguration
public static TriggerConfiguration createConfiguration(String jobTriggerStrategy, TriggeredScrapeJobImpl triggeredScrapeJob) throws ScraperConfigurationException
creates the TriggerConfiguration for a given ScrapeJob from triggerConfig-String- Parameters:
jobTriggerStrategy- config-string from filetriggeredScrapeJob- job belonging to the config- Returns:
- created TriggerConfiguration
- Throws:
ScraperConfigurationException- when something goes wrong
-
getScrapeInterval
public long getScrapeInterval()
-
getTriggerElementList
public List<TriggerConfiguration.TriggerElement> getTriggerElementList()
-
-