public class FeedEntryMessageSource extends IntegrationObjectSupport implements MessageSource<com.sun.syndication.feed.synd.SyndEntry>
MessageSource
will produce individual
SyndEntry
s for a feed identified with the 'feedUrl' attribute.logger
Constructor and Description |
---|
FeedEntryMessageSource(URL feedUrl,
String metadataKey)
Creates a FeedEntryMessageSource that will use a HttpURLFeedFetcher to read feeds from the given URL.
|
FeedEntryMessageSource(URL feedUrl,
String metadataKey,
com.sun.syndication.fetcher.FeedFetcher feedFetcher)
Creates a FeedEntryMessageSource that will use the provided FeedFetcher to read from the given feed URL.
|
Modifier and Type | Method and Description |
---|---|
String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
Message<com.sun.syndication.feed.synd.SyndEntry> |
receive()
Retrieve the next available message from this source.
|
void |
setMetadataStore(MetadataStore metadataStore) |
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toString
public FeedEntryMessageSource(URL feedUrl, String metadataKey)
FeedFetcher
via the alternate constructor.feedUrl
- The URL.metadataKey
- The metadata key.public FeedEntryMessageSource(URL feedUrl, String metadataKey, com.sun.syndication.fetcher.FeedFetcher feedFetcher)
feedUrl
- The URL.metadataKey
- The metadata key.feedFetcher
- The feed fetcher.public void setMetadataStore(MetadataStore metadataStore)
public String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class IntegrationObjectSupport
public Message<com.sun.syndication.feed.synd.SyndEntry> receive()
MessageSource
null
if no message is available.receive
in interface MessageSource<com.sun.syndication.feed.synd.SyndEntry>
protected void onInit() throws Exception
IntegrationObjectSupport
onInit
in class IntegrationObjectSupport
Exception
- Any exception.