restfeed-client-java
Core client library to consume REST Feeds.
Written in pure Java without transitive dependencies.
Spring Boot
Use this library when using Spring Boot:
Getting Started
Follow the Getting Started section in the Spring implementation.
Components
FeedReader
The FeedReader
is the core class that polls the feed endpoint for new items in an endless loop.
Call the read()
method to start reading the feed.
When shutting down the application, call the stop()
method to end the endless loop.
FeedItemConsumer
Implement FeedItemConsumer interface to handle feed items.
NextLinkRepository
Provide an implementation how the next link is stored. The save()
method is called directly after a feed item was consumed.
Typically, the NextLinkRepository is implemented as a SQL or NoSQL database.
An InMemoryNextLinkRepository
is provided for testing.
FeedReaderRestClient
Implement this interface to perform the HTTP connection to the feed endpoint, authenticate, negotiate the content type, and do the unmarshalling.