org.springframework.integration.twitter.inbound
Class SearchReceivingMessageSource
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.twitter.inbound.SearchReceivingMessageSource
- All Implemented Interfaces:
- org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, NamedComponent, MessageSource
public class SearchReceivingMessageSource
- extends IntegrationObjectSupport
- Since:
- 2.0
- Author:
- Oleg Zhurakousky, Mark Fisher
Method Summary |
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information. |
protected org.springframework.social.twitter.api.Twitter |
getTwitter()
|
protected void |
onInit()
Subclasses may implement this for initialization logic. |
protected java.util.List<org.springframework.social.twitter.api.Tweet> |
pollForTweets(long sinceId)
Subclasses must implement this to return tweets. |
Message<?> |
receive()
Retrieve the next available message from this source. |
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 |
SearchReceivingMessageSource
public SearchReceivingMessageSource(org.springframework.social.twitter.api.Twitter twitter)
setQuery
public void setQuery(java.lang.String query)
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
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
- Description copied from class:
IntegrationObjectSupport
- Subclasses may implement this for initialization logic.
- Overrides:
onInit
in class IntegrationObjectSupport
- Throws:
java.lang.Exception
receive
public Message<?> 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