public class SearchReceivingMessageSource
extends org.springframework.integration.context.IntegrationObjectSupport
Constructor and Description |
---|
SearchReceivingMessageSource(org.springframework.social.twitter.api.Twitter twitter,
java.lang.String metadataKey) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getComponentType() |
long |
getLastProcessedId() |
protected int |
getPageSize() |
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.messaging.Message<?> |
receive() |
void |
setMetadataStore(org.springframework.integration.metadata.MetadataStore metadataStore) |
void |
setPageSize(int pageSize)
Set the limit for the number of results returned on each poll; default 20.
|
void |
setPrefetchThreshold(int prefetchThreshold) |
void |
setQuery(java.lang.String query) |
afterPropertiesSet, getApplicationContext, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toString
public SearchReceivingMessageSource(org.springframework.social.twitter.api.Twitter twitter, java.lang.String metadataKey)
public void setQuery(java.lang.String query)
public java.lang.String getComponentType()
getComponentType
in interface org.springframework.integration.support.context.NamedComponent
getComponentType
in class org.springframework.integration.context.IntegrationObjectSupport
protected java.util.List<org.springframework.social.twitter.api.Tweet> pollForTweets(long sinceId)
sinceId
- The id of the last reported tweet.public void setMetadataStore(org.springframework.integration.metadata.MetadataStore metadataStore)
public void setPrefetchThreshold(int prefetchThreshold)
protected org.springframework.social.twitter.api.Twitter getTwitter()
protected int getPageSize()
public void setPageSize(int pageSize)
pageSize
- The pageSize.protected void onInit() throws java.lang.Exception
onInit
in class org.springframework.integration.context.IntegrationObjectSupport
java.lang.Exception
public org.springframework.messaging.Message<?> receive()
receive
in interface org.springframework.integration.core.MessageSource
@ManagedAttribute public long getLastProcessedId()
-1
if lastProcessedId is not set, yet.