public class FeedEntryMessageSource extends IntegrationObjectSupport implements MessageSource<com.rometools.rome.feed.synd.SyndEntry>
MessageSource
will produce individual
SyndEntry
s for a feed identified with the 'feedUrl' attribute.EXPRESSION_PARSER, logger
Constructor and Description |
---|
FeedEntryMessageSource(org.springframework.core.io.Resource feedResource,
java.lang.String metadataKey)
Creates a FeedEntryMessageSource that will read feeds from the given
Resource . |
FeedEntryMessageSource(java.net.URL feedUrl,
java.lang.String metadataKey)
Creates a FeedEntryMessageSource that will use a HttpURLFeedFetcher to read feeds from the given URL.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
org.springframework.messaging.Message<com.rometools.rome.feed.synd.SyndEntry> |
receive()
Retrieve the next available message from this source.
|
void |
setMetadataStore(MetadataStore metadataStore) |
void |
setPreserveWireFeed(boolean preserveWireFeed)
Specify a flag to indication if
WireFeed should be preserved in the target SyndFeed . |
void |
setSyndFeedInput(com.rometools.rome.io.SyndFeedInput syndFeedInput)
Specify a parser for Feed XML documents.
|
java.lang.String |
toString() |
afterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler
public FeedEntryMessageSource(java.net.URL feedUrl, java.lang.String metadataKey)
Resource
via the alternate constructor.feedUrl
- The URL.metadataKey
- The metadata key.public FeedEntryMessageSource(org.springframework.core.io.Resource feedResource, java.lang.String metadataKey)
Resource
.feedResource
- the Resource
to use.metadataKey
- the metadata key.public void setMetadataStore(MetadataStore metadataStore)
public void setSyndFeedInput(com.rometools.rome.io.SyndFeedInput syndFeedInput)
syndFeedInput
- the SyndFeedInput
to use.public void setPreserveWireFeed(boolean preserveWireFeed)
WireFeed
should be preserved in the target SyndFeed
.preserveWireFeed
- the boolean
flag.SyndFeedInput.setPreserveWireFeed(boolean)
public java.lang.String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class IntegrationObjectSupport
public org.springframework.messaging.Message<com.rometools.rome.feed.synd.SyndEntry> receive()
MessageSource
null
if no message is available.receive
in interface MessageSource<com.rometools.rome.feed.synd.SyndEntry>
protected void onInit() throws java.lang.Exception
IntegrationObjectSupport
onInit
in class IntegrationObjectSupport
java.lang.Exception
- Any exception.public java.lang.String toString()
toString
in class IntegrationObjectSupport