public class SimpleOrderedFetcherManager extends Object implements Fetcher
Fetcher
instances that is based on the
order of the given fetchers. If the manager has got the fetchers A and B, it
will first try to fetch data from the given URI using A. If this is
successful (i.e., A.fetch(uri) != null
) the result of Fetcher
A is returned. Only if A returns null
Fetcher
B is used.Modifier and Type | Field and Description |
---|---|
static String |
FETCHER |
private Fetcher[] |
fetchers |
private static org.slf4j.Logger |
LOGGER |
Constructor and Description |
---|
SimpleOrderedFetcherManager(Fetcher... fetchers) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
File |
fetch(org.dice_research.squirrel.data.uri.CrawleableUri uri,
Delayer delayer)
|
Fetcher[] |
getFetchers() |
void |
setFetchers(Fetcher... fetchers) |
private static final org.slf4j.Logger LOGGER
public static final String FETCHER
private Fetcher[] fetchers
public SimpleOrderedFetcherManager(Fetcher... fetchers)
public void setFetchers(Fetcher... fetchers)
public Fetcher[] getFetchers()
public File fetch(org.dice_research.squirrel.data.uri.CrawleableUri uri, Delayer delayer)
Fetcher
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2017–2020. All rights reserved.