public class RssStreamProvider extends Object implements StreamsProvider
StreamsProvider
that provides content from rss feeds in boilerpipe format
To use from command line:
Supply configuration similar to src/test/resources/rss.conf
Launch using:
mvn exec:java -Dexec.mainClass=org.apache.streams.rss.provider.RssStreamProvider -Dexec.args="rss.conf articles.json"Modifier and Type | Field and Description |
---|---|
protected RssFeedScheduler |
scheduler |
static String |
STREAMS_ID |
Constructor and Description |
---|
RssStreamProvider() |
RssStreamProvider(boolean perpetual) |
RssStreamProvider(RssStreamConfiguration config) |
RssStreamProvider(RssStreamConfiguration config,
boolean perpetual) |
Modifier and Type | Method and Description |
---|---|
void |
cleanUp() |
String |
getId() |
protected RssFeedScheduler |
getScheduler(BlockingQueue<StreamsDatum> queue) |
boolean |
isRunning() |
static void |
main(String[] args) |
void |
prepare(Object configurationObject) |
StreamsResultSet |
readCurrent() |
StreamsResultSet |
readNew(BigInteger sequence) |
StreamsResultSet |
readRange(org.joda.time.DateTime start,
org.joda.time.DateTime end) |
void |
setConfig(RssStreamConfiguration config) |
void |
setRssFeeds(Map<String,Long> feeds) |
void |
setRssFeeds(Set<String> urlFeeds) |
void |
startStream() |
public static final String STREAMS_ID
protected RssFeedScheduler scheduler
public RssStreamProvider()
public RssStreamProvider(boolean perpetual)
public RssStreamProvider(RssStreamConfiguration config)
public RssStreamProvider(RssStreamConfiguration config, boolean perpetual)
public String getId()
getId
in interface StreamsOperation
public void setConfig(RssStreamConfiguration config)
public void startStream()
startStream
in interface StreamsProvider
public StreamsResultSet readCurrent()
readCurrent
in interface StreamsProvider
public StreamsResultSet readNew(BigInteger sequence)
readNew
in interface StreamsProvider
public StreamsResultSet readRange(org.joda.time.DateTime start, org.joda.time.DateTime end)
readRange
in interface StreamsProvider
public boolean isRunning()
isRunning
in interface StreamsProvider
public void prepare(Object configurationObject)
prepare
in interface StreamsOperation
protected RssFeedScheduler getScheduler(BlockingQueue<StreamsDatum> queue)
public void cleanUp()
cleanUp
in interface StreamsOperation
Copyright © 2012–2016 The Apache Software Foundation. All rights reserved.