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:
Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, MessageSource<com.rometools.rome.feed.synd.SyndEntry>, IntegrationPattern, NamedComponent, IntegrationInboundManagement, IntegrationManagement

public class FeedEntryMessageSource extends 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
Author:
Josh Long, Mario Gray, Oleg Zhurakousky, Artem Bilan, Aaron Loes, Christian Tzolov
  • Constructor Details

    • FeedEntryMessageSource

      public FeedEntryMessageSource(URL feedUrl, 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 the Resource via the alternate constructor.
      Parameters:
      feedUrl - The URL.
      metadataKey - The metadata key.
    • FeedEntryMessageSource

      public FeedEntryMessageSource(Resource feedResource, String metadataKey)
      Creates a FeedEntryMessageSource that will read feeds from the given Resource.
      Parameters:
      feedResource - the Resource to use.
      metadataKey - the metadata key.
      Since:
      5.0
  • Method Details

    • setMetadataStore

      public void setMetadataStore(MetadataStore metadataStore)
    • setSyndFeedInput

      public void setSyndFeedInput(com.rometools.rome.io.SyndFeedInput syndFeedInput)
      Specify a parser for Feed XML documents.
      Parameters:
      syndFeedInput - the SyndFeedInput to use.
      Since:
      5.0
    • setPreserveWireFeed

      public void setPreserveWireFeed(boolean preserveWireFeed)
      Specify a flag to indication if WireFeed should be preserved in the target SyndFeed.
      Parameters:
      preserveWireFeed - the boolean flag.
      Since:
      5.0
      See Also:
      • SyndFeedInput.setPreserveWireFeed(boolean)
    • getComponentType

      public String getComponentType()
    • onInit

      protected void onInit()
      Overrides:
      onInit in class AbstractExpressionEvaluator
    • doReceive

      protected com.rometools.rome.feed.synd.SyndEntry doReceive()
      Description copied from class: AbstractMessageSource
      Subclasses must implement this method. Typically the returned value will be the payload of type T, but the returned value may also be a Message instance whose payload is of type T; also can be AbstractIntegrationMessageBuilder which is used for additional headers population.
      Specified by:
      doReceive in class AbstractMessageSource<com.rometools.rome.feed.synd.SyndEntry>
      Returns:
      The value returned.
    • toString

      public String toString()
      Overrides:
      toString in class Object