Class FeedEntryMessageSource
java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.endpoint.AbstractMessageSource<com.rometools.rome.feed.synd.SyndEntry>
org.springframework.integration.feed.inbound.FeedEntryMessageSource
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.integration.core.MessageSource<com.rometools.rome.feed.synd.SyndEntry>,org.springframework.integration.IntegrationPattern,org.springframework.integration.support.context.NamedComponent,org.springframework.integration.support.management.IntegrationInboundManagement,org.springframework.integration.support.management.IntegrationManagement
public class FeedEntryMessageSource
extends org.springframework.integration.endpoint.AbstractMessageSource<com.rometools.rome.feed.synd.SyndEntry>
This implementation of
MessageSource will
produce individual SyndEntrys for a feed identified with the 'feedUrl'
attribute.- Since:
- 2.0
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description FeedEntryMessageSource(java.net.URL feedUrl, java.lang.String metadataKey)Creates a FeedEntryMessageSource that will use a HttpURLFeedFetcher to read feeds from the given URL.FeedEntryMessageSource(org.springframework.core.io.Resource feedResource, java.lang.String metadataKey)Creates a FeedEntryMessageSource that will read feeds from the givenResource. -
Method Summary
Modifier and Type Method Description protected com.rometools.rome.feed.synd.SyndEntrydoReceive()java.lang.StringgetComponentType()protected voidonInit()voidsetMetadataStore(org.springframework.integration.metadata.MetadataStore metadataStore)voidsetPreserveWireFeed(boolean preserveWireFeed)Specify a flag to indication ifWireFeedshould be preserved in the targetSyndFeed.voidsetSyndFeedInput(com.rometools.rome.io.SyndFeedInput syndFeedInput)Specify a parser for Feed XML documents.java.lang.StringtoString()Methods inherited from class org.springframework.integration.endpoint.AbstractMessageSource
buildMessage, destroy, getBeanName, getComponentName, getManagedName, getManagedType, getOverrides, isLoggingEnabled, receive, registerMetricsCaptor, setBeanName, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedTypeMethods inherited from class org.springframework.integration.util.AbstractExpressionEvaluator
afterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, setBeanFactory, setConversionServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
FeedEntryMessageSource
public FeedEntryMessageSource(java.net.URL feedUrl, java.lang.String metadataKey)Creates a FeedEntryMessageSource that will use a HttpURLFeedFetcher to read feeds from the given URL. If the feed URL has a protocol other than http*, consider providing a custom implementation of theResourcevia the alternate constructor.- Parameters:
feedUrl- The URL.metadataKey- The metadata key.
-
FeedEntryMessageSource
public FeedEntryMessageSource(org.springframework.core.io.Resource feedResource, java.lang.String metadataKey)Creates a FeedEntryMessageSource that will read feeds from the givenResource.- Parameters:
feedResource- theResourceto use.metadataKey- the metadata key.- Since:
- 5.0
-
-
Method Details
-
setMetadataStore
public void setMetadataStore(org.springframework.integration.metadata.MetadataStore metadataStore) -
setSyndFeedInput
public void setSyndFeedInput(com.rometools.rome.io.SyndFeedInput syndFeedInput)Specify a parser for Feed XML documents.- Parameters:
syndFeedInput- theSyndFeedInputto use.- Since:
- 5.0
-
setPreserveWireFeed
public void setPreserveWireFeed(boolean preserveWireFeed)Specify a flag to indication ifWireFeedshould be preserved in the targetSyndFeed.- Parameters:
preserveWireFeed- thebooleanflag.- Since:
- 5.0
- See Also:
SyndFeedInput.setPreserveWireFeed(boolean)
-
getComponentType
public java.lang.String getComponentType() -
onInit
protected void onInit()- Overrides:
onInitin classorg.springframework.integration.util.AbstractExpressionEvaluator
-
doReceive
protected com.rometools.rome.feed.synd.SyndEntry doReceive()- Specified by:
doReceivein classorg.springframework.integration.endpoint.AbstractMessageSource<com.rometools.rome.feed.synd.SyndEntry>
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-