Spring Integration

org.springframework.integration.feed.inbound
Class FeedEntryMessageSource

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by 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.InitializingBean, NamedComponent, MessageSource<com.sun.syndication.feed.synd.SyndEntry>

public class FeedEntryMessageSource
extends IntegrationObjectSupport
implements MessageSource<com.sun.syndication.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

Field Summary
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Constructor Summary
FeedEntryMessageSource(java.net.URL feedUrl)
          Creates a FeedEntryMessageSource that will use a HttpURLFeedFetcher to read feeds from the given URL.
FeedEntryMessageSource(java.net.URL feedUrl, com.sun.syndication.fetcher.FeedFetcher feedFetcher)
          Creates a FeedEntryMessageSource that will use the provided FeedFetcher to read from the given feed URL.
 
Method Summary
 java.lang.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)
           
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FeedEntryMessageSource

public FeedEntryMessageSource(java.net.URL feedUrl)
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 FeedFetcher via the alternate constructor.


FeedEntryMessageSource

public FeedEntryMessageSource(java.net.URL feedUrl,
                              com.sun.syndication.fetcher.FeedFetcher feedFetcher)
Creates a FeedEntryMessageSource that will use the provided FeedFetcher to read from the given feed URL.

Method Detail

setMetadataStore

public void setMetadataStore(MetadataStore metadataStore)

getComponentType

public java.lang.String getComponentType()
Description copied from class: IntegrationObjectSupport
Subclasses may implement this method to provide component type information.

Specified by:
getComponentType in interface NamedComponent
Overrides:
getComponentType in class IntegrationObjectSupport

receive

public Message<com.sun.syndication.feed.synd.SyndEntry> receive()
Description copied from interface: MessageSource
Retrieve the next available message from this source. Returns null if no message is available.

Specified by:
receive in interface MessageSource<com.sun.syndication.feed.synd.SyndEntry>

onInit

protected void onInit()
               throws java.lang.Exception
Description copied from class: IntegrationObjectSupport
Subclasses may implement this for initialization logic.

Overrides:
onInit in class IntegrationObjectSupport
Throws:
java.lang.Exception

Spring Integration