INT-1603 removed MH prost processor from AMS
This commit is contained in:
@@ -27,32 +27,32 @@
|
||||
<channel id="inbound_updates"/>
|
||||
<channel id="inbound_search"/>
|
||||
|
||||
<beans:bean id="twitterTemplate" class="org.springframework.integration.twitter.core.Twitter4jTemplate">
|
||||
<beans:constructor-arg value="${twitter.oauth.consumerKey}"/>
|
||||
<beans:constructor-arg value="${twitter.oauth.consumerSecret}"/>
|
||||
<beans:constructor-arg value="${twitter.oauth.accessToken}"/>
|
||||
<beans:constructor-arg value="${twitter.oauth.accessTokenSecret}"/>
|
||||
</beans:bean>
|
||||
<!-- <beans:bean id="twitterTemplate" class="org.springframework.integration.twitter.core.Twitter4jTemplate">-->
|
||||
<!-- <beans:constructor-arg value="${twitter.oauth.consumerKey}"/>-->
|
||||
<!-- <beans:constructor-arg value="${twitter.oauth.consumerSecret}"/>-->
|
||||
<!-- <beans:constructor-arg value="${twitter.oauth.accessToken}"/>-->
|
||||
<!-- <beans:constructor-arg value="${twitter.oauth.accessTokenSecret}"/>-->
|
||||
<!-- </beans:bean>-->
|
||||
|
||||
<twitter:mentions-inbound-channel-adapter twitter-template="twitterTemplate" channel="inbound_mentions">
|
||||
<poller fixed-rate="5000" max-messages-per-poll="3"/>
|
||||
</twitter:mentions-inbound-channel-adapter>
|
||||
<service-activator input-channel="inbound_mentions" ref="twitterAnnouncer" method="mention"/>
|
||||
<!-- <twitter:mentions-inbound-channel-adapter twitter-template="twitterTemplate" channel="inbound_mentions">-->
|
||||
<!-- <poller fixed-rate="5000" max-messages-per-poll="3"/>-->
|
||||
<!-- </twitter:mentions-inbound-channel-adapter>-->
|
||||
<!-- <service-activator input-channel="inbound_mentions" ref="twitterAnnouncer" method="mention"/>-->
|
||||
|
||||
<twitter:dm-inbound-channel-adapter twitter-template="twitterTemplate" channel="inbound_dm">
|
||||
<poller fixed-rate="5000" max-messages-per-poll="3"/>
|
||||
</twitter:dm-inbound-channel-adapter>
|
||||
<service-activator input-channel="inbound_dm" ref="twitterAnnouncer" method="dm"/>
|
||||
<!-- <twitter:dm-inbound-channel-adapter twitter-template="twitterTemplate" channel="inbound_dm">-->
|
||||
<!-- <poller fixed-rate="5000" max-messages-per-poll="3"/>-->
|
||||
<!-- </twitter:dm-inbound-channel-adapter>-->
|
||||
<!-- <service-activator input-channel="inbound_dm" ref="twitterAnnouncer" method="dm"/>-->
|
||||
|
||||
<twitter:search-inbound-channel-adapter channel="inbound_search" query="#springintegration">
|
||||
<twitter:search-inbound-channel-adapter id="searchAdapter" channel="inbound_search" query="#springintegration">
|
||||
<poller fixed-rate="5000" max-messages-per-poll="5"/>
|
||||
</twitter:search-inbound-channel-adapter>
|
||||
<service-activator input-channel="inbound_search" ref="twitterAnnouncer" method="search"/>
|
||||
|
||||
<twitter:inbound-channel-adapter id="twitterInbound" twitter-template="twitterTemplate" channel="inbound_updates">
|
||||
<poller fixed-rate="5000" max-messages-per-poll="3"/>
|
||||
</twitter:inbound-channel-adapter>
|
||||
<service-activator input-channel="inbound_updates" ref="twitterAnnouncer" method="updates"/>
|
||||
<!-- <twitter:inbound-channel-adapter id="twitterInbound" twitter-template="twitterTemplate" channel="inbound_updates">-->
|
||||
<!-- <poller fixed-rate="5000" max-messages-per-poll="3"/>-->
|
||||
<!-- </twitter:inbound-channel-adapter>-->
|
||||
<!-- <service-activator input-channel="inbound_updates" ref="twitterAnnouncer" method="updates"/>-->
|
||||
|
||||
<beans:bean id="twitterAnnouncer" class="org.springframework.integration.twitter.ignored.TwitterAnnouncer"/>
|
||||
</beans:beans>
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
package org.springframework.integration.twitter.ignored;
|
||||
|
||||
import org.springframework.integration.Message;
|
||||
import org.springframework.integration.history.MessageHistory;
|
||||
import org.springframework.integration.twitter.core.Tweet;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -26,9 +28,13 @@ public class TwitterAnnouncer {
|
||||
directMessage.getFromUser() + " with text " + directMessage.getText());
|
||||
}
|
||||
|
||||
public void search(Tweet search) {
|
||||
public void search(Message search) {
|
||||
MessageHistory history = MessageHistory.read(search);
|
||||
System.out.println(history);
|
||||
Tweet tweet = (Tweet) search.getPayload();
|
||||
|
||||
System.out.println("A search item was received " +
|
||||
search.getCreatedAt() + " with text " + search.getText());
|
||||
tweet.getCreatedAt() + " with text " + tweet.getText());
|
||||
}
|
||||
|
||||
public void mention(Tweet s) {
|
||||
|
||||
Reference in New Issue
Block a user