Class NavigationFilters
- java.lang.Object
-
- com.digitalpebble.stormcrawler.util.AbstractConfigurable
-
- com.digitalpebble.stormcrawler.protocol.selenium.NavigationFilter
-
- com.digitalpebble.stormcrawler.protocol.selenium.NavigationFilters
-
- All Implemented Interfaces:
Configurable
public class NavigationFilters extends NavigationFilter
Wrapper for the NavigationFilter defined in a JSON configuration- See Also:
for more information.
-
-
Field Summary
Fields Modifier and Type Field Description static NavigationFilters
emptyNavigationFilters
-
Constructor Summary
Constructors Constructor Description NavigationFilters(@NotNull Map<String,Object> stormConf, @NotNull String configFile)
loads the filters from a JSON configuration file
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(@NotNull Map<String,Object> stormConf, @NotNull com.fasterxml.jackson.databind.JsonNode filtersConf)
Called when this filter is being initializedProtocolResponse
filter(@NotNull org.openqa.selenium.remote.RemoteWebDriver driver, @NotNull Metadata metadata)
The end result comes from the first filter to return non-null *static NavigationFilters
fromConf(@NotNull Map<String,Object> stormConf)
Loads and configure the NavigationFilters based on the storm config if there is one otherwise returns an emptyNavigationFilters.-
Methods inherited from class com.digitalpebble.stormcrawler.util.AbstractConfigurable
configure, getName
-
-
-
-
Field Detail
-
emptyNavigationFilters
public static final NavigationFilters emptyNavigationFilters
-
-
Constructor Detail
-
NavigationFilters
public NavigationFilters(@NotNull @NotNull Map<String,Object> stormConf, @NotNull @NotNull String configFile) throws IOException
loads the filters from a JSON configuration file- Throws:
IOException
-
-
Method Detail
-
filter
public ProtocolResponse filter(@NotNull @NotNull org.openqa.selenium.remote.RemoteWebDriver driver, @NotNull @NotNull Metadata metadata)
Description copied from class:NavigationFilter
The end result comes from the first filter to return non-null *- Specified by:
filter
in classNavigationFilter
-
fromConf
public static NavigationFilters fromConf(@NotNull @NotNull Map<String,Object> stormConf)
Loads and configure the NavigationFilters based on the storm config if there is one otherwise returns an emptyNavigationFilters.
-
configure
public void configure(@NotNull @NotNull Map<String,Object> stormConf, @NotNull @NotNull com.fasterxml.jackson.databind.JsonNode filtersConf)
Description copied from interface:Configurable
Called when this filter is being initialized- Parameters:
stormConf
- The Storm configuration used for the configurablefiltersConf
- the filter specific configuration. Never null
-
-