public class TwitterSearchOutboundGateway extends AbstractReplyProducingMessageHandler
AbstractReplyProducingMessageHandler implementation to perform request/reply
Twitter search with SearchParameters as the result of searchArgsExpression
expression evaluation.AbstractReplyProducingMessageHandler.RequestHandlermessagingTemplateEXPRESSION_PARSER, logger| Constructor and Description |
|---|
TwitterSearchOutboundGateway(org.springframework.social.twitter.api.Twitter twitter) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInit() |
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
protected org.springframework.social.twitter.api.Twitter |
getTwitter() |
protected java.lang.Object |
handleRequestMessage(org.springframework.messaging.Message<?> requestMessage)
Subclasses must implement this method to handle the request Message.
|
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, setRequiresReplyaddNotPropagatedHeaders, createOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, produceOutput, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, shouldCopyRequestHeaders, shouldSplitOutputconfigureMetrics, getActiveCount, getActiveCountLong, getDuration, getErrorCount, getErrorCountLong, getHandleCount, getHandleCountLong, getManagedName, getManagedType, getMaxDuration, getMeanDuration, getMinDuration, getOrder, getStandardDeviationDuration, handleMessage, isCountsEnabled, isLoggingEnabled, isStatsEnabled, 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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComponentNamepublic 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()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class AbstractMessageHandlerprotected org.springframework.social.twitter.api.Twitter getTwitter()
protected void doInit()
doInit in class AbstractReplyProducingMessageHandlerprotected java.lang.Object handleRequestMessage(org.springframework.messaging.Message<?> requestMessage)
AbstractReplyProducingMessageHandlerhandleRequestMessage in class AbstractReplyProducingMessageHandlerrequestMessage - The request message.null.