org.springframework.integration.twitter.inbound
Class SearchReceivingMessageSource

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.twitter.inbound.SearchReceivingMessageSource
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.integration.context.NamedComponent, org.springframework.integration.core.MessageSource

public class SearchReceivingMessageSource
extends org.springframework.integration.context.IntegrationObjectSupport

Since:
2.0

Field Summary
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Constructor Summary
SearchReceivingMessageSource(org.springframework.social.twitter.api.Twitter twitter)
           
 
Method Summary
 java.lang.String getComponentType()
           
protected  org.springframework.social.twitter.api.Twitter getTwitter()
           
protected  void onInit()
           
protected  java.util.List<org.springframework.social.twitter.api.Tweet> pollForTweets(long sinceId)
          Subclasses must implement this to return tweets.
 org.springframework.integration.Message<?> receive()
           
 void setQuery(java.lang.String query)
           
 
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

SearchReceivingMessageSource

public SearchReceivingMessageSource(org.springframework.social.twitter.api.Twitter twitter)
Method Detail

setQuery

public void setQuery(java.lang.String query)

getComponentType

public java.lang.String getComponentType()
Specified by:
getComponentType in interface org.springframework.integration.context.NamedComponent
Overrides:
getComponentType in class org.springframework.integration.context.IntegrationObjectSupport

pollForTweets

protected java.util.List<org.springframework.social.twitter.api.Tweet> pollForTweets(long sinceId)
Subclasses must implement this to return tweets. The 'sinceId' value will be negative if no last id is known.


getTwitter

protected org.springframework.social.twitter.api.Twitter getTwitter()

onInit

protected void onInit()
               throws java.lang.Exception
Overrides:
onInit in class org.springframework.integration.context.IntegrationObjectSupport
Throws:
java.lang.Exception

receive

public org.springframework.integration.Message<?> receive()
Specified by:
receive in interface org.springframework.integration.core.MessageSource