public class TwitterSearchOutboundGateway extends AbstractReplyProducingMessageHandler implements IntegrationEvaluationContextAware
AbstractReplyProducingMessageHandler
implementation to perform request/reply
Twitter search with SearchParameters
as the result of searchArgsExpression
expression evaluation.AbstractReplyProducingMessageHandler.RequestHandler
logger
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
TwitterSearchOutboundGateway(Twitter twitter) |
Modifier and Type | Method and Description |
---|---|
String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
protected Twitter |
getTwitter() |
protected Object |
handleRequestMessage(Message<?> requestMessage)
Subclasses must implement this method to handle the request Message.
|
void |
setIntegrationEvaluationContext(EvaluationContext evaluationContext) |
void |
setSearchArgsExpression(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}" . |
doInit, doInvokeAdvisedRequestHandler, getMessagingTemplate, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setChannelResolver, setOutputChannel, setOutputChannelName, setRequiresReply, setSendTimeout, shouldCopyRequestHeaders
getOrder, handleMessage, setOrder, setShouldTrack
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getComponentName
public TwitterSearchOutboundGateway(Twitter twitter)
public void setIntegrationEvaluationContext(EvaluationContext evaluationContext)
setIntegrationEvaluationContext
in interface IntegrationEvaluationContextAware
public void setSearchArgsExpression(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 String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class AbstractMessageHandler
protected Twitter getTwitter()
protected Object handleRequestMessage(Message<?> requestMessage)
AbstractReplyProducingMessageHandler
handleRequestMessage
in class AbstractReplyProducingMessageHandler
requestMessage
- The request message.null
.