public class DirectMessageReceivingMessageSource extends IntegrationObjectSupport
logger| Constructor and Description |
|---|
DirectMessageReceivingMessageSource(org.springframework.social.twitter.api.Twitter twitter,
java.lang.String metadataKey) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
long |
getLastProcessedId() |
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.DirectMessage> |
pollForTweets(long sinceId)
Subclasses must implement this to return tweets.
|
Message<?> |
receive()
Retrieve the next available message from this source.
|
void |
setMetadataStore(MetadataStore metadataStore) |
void |
setPrefetchThreshold(int prefetchThreshold) |
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toStringpublic DirectMessageReceivingMessageSource(org.springframework.social.twitter.api.Twitter twitter,
java.lang.String metadataKey)
public java.lang.String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class IntegrationObjectSupportprotected java.util.List<org.springframework.social.twitter.api.DirectMessage> pollForTweets(long sinceId)
public void setMetadataStore(MetadataStore metadataStore)
public void setPrefetchThreshold(int prefetchThreshold)
protected org.springframework.social.twitter.api.Twitter getTwitter()
protected void onInit()
throws java.lang.Exception
IntegrationObjectSupportonInit in class IntegrationObjectSupportjava.lang.Exceptionpublic Message<?> receive()
MessageSourcenull if no message is available.receive in interface MessageSource@ManagedAttribute public long getLastProcessedId()
-1 if lastProcessedId is not set, yet.