public class TwitterSearchOutboundGateway
extends org.springframework.integration.handler.AbstractReplyProducingMessageHandler
AbstractReplyProducingMessageHandler implementation to perform request/reply
Twitter search with SearchParameters as the result of searchArgsExpression
expression evaluation.messagingTemplate| Constructor and Description |
|---|
TwitterSearchOutboundGateway(org.springframework.social.twitter.api.Twitter twitter) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInit() |
java.lang.String |
getComponentType() |
protected org.springframework.social.twitter.api.Twitter |
getTwitter() |
protected java.lang.Object |
handleRequestMessage(org.springframework.messaging.Message<?> requestMessage) |
void |
setIntegrationEvaluationContext(org.springframework.expression.EvaluationContext evaluationContext) |
void |
setSearchArgsExpression(org.springframework.expression.Expression searchArgsExpression)
An expression that is used to build the search; must resolve to a
SearchParameters object, or a
String, in which case the default page size of 20 is applied,
or a list of up to 4 arguments, such as
"{payload, headers.pageSize, headers.sinceId, headers.maxId}". |
doInvokeAdvisedRequestHandler, getRequiresReply, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setRequiresReplycreateOutputMessage, getOutputChannel, isAsync, produceOutput, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setOutputChannel, setOutputChannelName, setSendTimeout, shouldCopyRequestHeaders, shouldSplitOutputconfigureMetrics, getActiveCount, getActiveCountLong, getDuration, getErrorCount, getErrorCountLong, getHandleCount, getHandleCountLong, getManagedName, getManagedType, getMaxDuration, getMeanDuration, getMinDuration, getOrder, getStandardDeviationDuration, handleMessage, isCountsEnabled, isLoggingEnabled, isStatsEnabled, onComplete, onError, onNext, onSubscribe, reset, setCountsEnabled, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, setStatsEnabledafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringpublic TwitterSearchOutboundGateway(org.springframework.social.twitter.api.Twitter twitter)
public void setSearchArgsExpression(org.springframework.expression.Expression searchArgsExpression)
SearchParameters object, or a
String, in which case the default page size of 20 is applied,
or a list of up to 4 arguments, such as
"{payload, headers.pageSize, headers.sinceId, headers.maxId}".
The first (required) argument must resolve to a String (query), the
optional arguments must resolve to an Number and represent the
page size, sinceId, and maxId respectively. Refer to the 'Spring
Social Twitter' documentation for more details.
When using a SearchParameters directly, it is not necessary
to include the package: "new SearchParameters("#foo").count(20)").
Default: "payload".
searchArgsExpression - The expression.public void setIntegrationEvaluationContext(org.springframework.expression.EvaluationContext evaluationContext)
public java.lang.String getComponentType()
getComponentType in interface org.springframework.integration.support.context.NamedComponentgetComponentType in class org.springframework.integration.handler.AbstractMessageHandlerprotected org.springframework.social.twitter.api.Twitter getTwitter()
protected void doInit()
doInit in class org.springframework.integration.handler.AbstractReplyProducingMessageHandlerprotected java.lang.Object handleRequestMessage(org.springframework.messaging.Message<?> requestMessage)
handleRequestMessage in class org.springframework.integration.handler.AbstractReplyProducingMessageHandler