Files
spring-integration-extensions/spring-integration-social-twitter/README.adoc
Artem Bilan 804e0e9ccf URL Cleanup
This commit updates URLs to prefer the https protocol.
Redirects are not followed to avoid accidentally expanding intentionally
shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK.
However, the https status was the same as the http request or http redirected to an https URL, so they were migrated.
Your review is recommended.

* [ ] http://developer.marklogic.com/express (301) with 1 occurrences migrated to:
  /free-developer ([https](https://developer.marklogic.com/express) result IllegalArgumentException).
* [ ] http://opensmpp.logica.com/CommonPart/Download/download2.html (301) with 1 occurrences migrated to:
  https://public.cgi.com/CommonPart/Download/download2.html ([https](https://opensmpp.logica.com/CommonPart/Download/download2.html) result SSLHandshakeException).
* [ ] http://0.0.0.0:2379 (AnnotatedConnectException) with 2 occurrences migrated to:
  https://0.0.0.0:2379 ([https](https://0.0.0.0:2379) result AnnotatedConnectException).
* [ ] http://en.wikipedia.org/wiki/Zip_%28file_format%29 (301) with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/Zip_%2528file_format%2529 ([https](https://en.wikipedia.org/wiki/Zip_%28file_format%29) result 400).
* [ ] http://build.spring.io/plugins/servlet/buildStatusImage/INTEXT-ZIP (301) with 1 occurrences migrated to:
  https://build.spring.io/plugins/servlet/buildStatusImage/INTEXT-ZIP ([https](https://build.spring.io/plugins/servlet/buildStatusImage/INTEXT-ZIP) result 404).
* [ ] http://docs.hazelcast.org/docs/latest/manual/html/continuousquery.html (301) with 1 occurrences migrated to:
  https://docs.hazelcast.org/docs/latest/manual/html/continuousquery.html ([https](https://docs.hazelcast.org/docs/latest/manual/html/continuousquery.html) result 404).
* [ ] http://docs.hazelcast.org/docs/latest/manual/html/distributed-data-structures.html (301) with 1 occurrences migrated to:
  https://docs.hazelcast.org/docs/latest/manual/html/distributed-data-structures.html ([https](https://docs.hazelcast.org/docs/latest/manual/html/distributed-data-structures.html) result 404).
* [ ] http://docs.hazelcast.org/docs/latest/manual/html/distributedevents.html (301) with 1 occurrences migrated to:
  https://docs.hazelcast.org/docs/latest/manual/html/distributedevents.html ([https](https://docs.hazelcast.org/docs/latest/manual/html/distributedevents.html) result 404).
* [ ] http://docs.hazelcast.org/docs/latest/manual/html/distributedquery.html (301) with 1 occurrences migrated to:
  https://docs.hazelcast.org/docs/latest/manual/html/distributedquery.html ([https](https://docs.hazelcast.org/docs/latest/manual/html/distributedquery.html) result 404).
* [ ] http://docs.spring.io/spring-integration/reference/html/system-management-chapter.html (301) with 3 occurrences migrated to:
  https://docs.spring.io/spring-integration/reference/html/system-management-chapter.html ([https](https://docs.spring.io/spring-integration/reference/html/system-management-chapter.html) result 404).
* [ ] http://docs.spring.io/spring-integration/reference/html/xmpp.html (301) with 1 occurrences migrated to:
  https://docs.spring.io/spring-integration/reference/html/xmpp.html ([https](https://docs.spring.io/spring-integration/reference/html/xmpp.html) result 404).
* [ ] http://help.github.com/send-pull-requests (404) with 1 occurrences migrated to:
  https://help.github.com/send-pull-requests ([https](https://help.github.com/send-pull-requests) result 404).
* [ ] http://www.springframework.org/schema/integration/hazelcast/spring-integration-hazelcast.xsd (404) with 1 occurrences migrated to:
  https://www.springframework.org/schema/integration/hazelcast/spring-integration-hazelcast.xsd ([https](https://www.springframework.org/schema/integration/hazelcast/spring-integration-hazelcast.xsd) result 404).
* [ ] http://www.springframework.org/schema/integration/jgroups/spring-intergration-jgroups.xsd (404) with 3 occurrences migrated to:
  https://www.springframework.org/schema/integration/jgroups/spring-intergration-jgroups.xsd ([https](https://www.springframework.org/schema/integration/jgroups/spring-intergration-jgroups.xsd) result 404).
* [ ] http://www.springframework.org/schema/integration/print/spring-integration-print.xsd (404) with 1 occurrences migrated to:
  https://www.springframework.org/schema/integration/print/spring-integration-print.xsd ([https](https://www.springframework.org/schema/integration/print/spring-integration-print.xsd) result 404).
* [ ] http://www.springframework.org/schema/integration/twitter/spring-integration-social-twitter.xsd (404) with 1 occurrences migrated to:
  https://www.springframework.org/schema/integration/twitter/spring-integration-social-twitter.xsd ([https](https://www.springframework.org/schema/integration/twitter/spring-integration-social-twitter.xsd) result 404).
* [ ] http://www.springframework.org/schema/integration/voldemort/spring-integration-voldemort.xsd (404) with 2 occurrences migrated to:
  https://www.springframework.org/schema/integration/voldemort/spring-integration-voldemort.xsd ([https](https://www.springframework.org/schema/integration/voldemort/spring-integration-voldemort.xsd) result 404).
* [ ] http://search.twitter.com/operators (410) with 1 occurrences migrated to:
  https://search.twitter.com/operators ([https](https://search.twitter.com/operators) result 410).

## Fixed Success
These URLs were switched to an https URL with a 2xx status.
While the status was successful, your review is still recommended.

* [ ] http://aws.amazon.com/ with 1 occurrences migrated to:
  https://aws.amazon.com/ ([https](https://aws.amazon.com/) result 200).
* [ ] http://aws.amazon.com/s3/ with 1 occurrences migrated to:
  https://aws.amazon.com/s3/ ([https](https://aws.amazon.com/s3/) result 200).
* [ ] http://docs.oracle.com/javase/6/docs/api/javax/print/DocFlavor.html with 3 occurrences migrated to:
  https://docs.oracle.com/javase/6/docs/api/javax/print/DocFlavor.html ([https](https://docs.oracle.com/javase/6/docs/api/javax/print/DocFlavor.html) result 200).
* [ ] http://docs.oracle.com/javase/6/docs/api/javax/print/PrintService.html with 1 occurrences migrated to:
  https://docs.oracle.com/javase/6/docs/api/javax/print/PrintService.html ([https](https://docs.oracle.com/javase/6/docs/api/javax/print/PrintService.html) result 200).
* [ ] http://docs.oracle.com/javase/6/docs/api/javax/print/attribute/Attribute.html with 1 occurrences migrated to:
  https://docs.oracle.com/javase/6/docs/api/javax/print/attribute/Attribute.html ([https](https://docs.oracle.com/javase/6/docs/api/javax/print/attribute/Attribute.html) result 200).
* [ ] http://docs.oracle.com/javase/6/docs/api/javax/print/attribute/standard/Chromaticity.html with 1 occurrences migrated to:
  https://docs.oracle.com/javase/6/docs/api/javax/print/attribute/standard/Chromaticity.html ([https](https://docs.oracle.com/javase/6/docs/api/javax/print/attribute/standard/Chromaticity.html) result 200).
* [ ] http://docs.oracle.com/javase/6/docs/api/javax/print/attribute/standard/Copies.html with 1 occurrences migrated to:
  https://docs.oracle.com/javase/6/docs/api/javax/print/attribute/standard/Copies.html ([https](https://docs.oracle.com/javase/6/docs/api/javax/print/attribute/standard/Copies.html) result 200).
* [ ] http://docs.oracle.com/javase/6/docs/api/javax/print/attribute/standard/MediaSizeName.html with 1 occurrences migrated to:
  https://docs.oracle.com/javase/6/docs/api/javax/print/attribute/standard/MediaSizeName.html ([https](https://docs.oracle.com/javase/6/docs/api/javax/print/attribute/standard/MediaSizeName.html) result 200).
* [ ] http://docs.oracle.com/javase/6/docs/api/javax/print/attribute/standard/MediaTray.html with 1 occurrences migrated to:
  https://docs.oracle.com/javase/6/docs/api/javax/print/attribute/standard/MediaTray.html ([https](https://docs.oracle.com/javase/6/docs/api/javax/print/attribute/standard/MediaTray.html) result 200).
* [ ] http://docs.oracle.com/javase/6/docs/api/javax/print/attribute/standard/Sides.html with 1 occurrences migrated to:
  https://docs.oracle.com/javase/6/docs/api/javax/print/attribute/standard/Sides.html ([https](https://docs.oracle.com/javase/6/docs/api/javax/print/attribute/standard/Sides.html) result 200).
* [ ] http://docs.oracle.com/javase/6/docs/technotes/guides/jps/index.html with 2 occurrences migrated to:
  https://docs.oracle.com/javase/6/docs/technotes/guides/jps/index.html ([https](https://docs.oracle.com/javase/6/docs/technotes/guides/jps/index.html) result 200).
* [ ] http://docs.splunk.com/Documentation/Splunk/latest/Data/Monitornetworkports with 1 occurrences migrated to:
  https://docs.splunk.com/Documentation/Splunk/latest/Data/Monitornetworkports ([https](https://docs.splunk.com/Documentation/Splunk/latest/Data/Monitornetworkports) result 200).
* [ ] http://docs.spring.io/spring-integration/reference/ with 4 occurrences migrated to:
  https://docs.spring.io/spring-integration/reference/ ([https](https://docs.spring.io/spring-integration/reference/) result 200).
* [ ] http://docs.spring.io/spring-integration/reference/html/ with 1 occurrences migrated to:
  https://docs.spring.io/spring-integration/reference/html/ ([https](https://docs.spring.io/spring-integration/reference/html/) result 200).
* [ ] http://en.wikipedia.org/wiki/Server_Message_Block with 4 occurrences migrated to:
  https://en.wikipedia.org/wiki/Server_Message_Block ([https](https://en.wikipedia.org/wiki/Server_Message_Block) result 200).
* [ ] http://en.wikipedia.org/wiki/Short_Message_Peer-to-Peer with 2 occurrences migrated to:
  https://en.wikipedia.org/wiki/Short_Message_Peer-to-Peer ([https](https://en.wikipedia.org/wiki/Short_Message_Peer-to-Peer) result 200).
* [ ] http://en.wikipedia.org/wiki/Short_Message_Service with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/Short_Message_Service ([https](https://en.wikipedia.org/wiki/Short_Message_Service) result 200).
* [ ] http://en.wikipedia.org/wiki/Short_message_service_center with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/Short_message_service_center ([https](https://en.wikipedia.org/wiki/Short_message_service_center) result 200).
* [ ] http://en.wikipedia.org/wiki/XML_database with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/XML_database ([https](https://en.wikipedia.org/wiki/XML_database) result 200).
* [ ] http://en.wikipedia.org/wiki/XPath_2.0 with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/XPath_2.0 ([https](https://en.wikipedia.org/wiki/XPath_2.0) result 200).
* [ ] http://en.wikipedia.org/wiki/XQuery with 3 occurrences migrated to:
  https://en.wikipedia.org/wiki/XQuery ([https](https://en.wikipedia.org/wiki/XQuery) result 200).
* [ ] http://en.wikipedia.org/wiki/XQuery_API_for_Java with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/XQuery_API_for_Java ([https](https://en.wikipedia.org/wiki/XQuery_API_for_Java) result 200).
* [ ] http://gradle.org with 1 occurrences migrated to:
  https://gradle.org ([https](https://gradle.org) result 200).
* [ ] http://hazelcast.org/ with 1 occurrences migrated to:
  https://hazelcast.org/ ([https](https://hazelcast.org/) result 200).
* [ ] http://hillert.blogspot.com/2011/12/java-print-service-frustrations.html with 1 occurrences migrated to:
  https://hillert.blogspot.com/2011/12/java-print-service-frustrations.html ([https](https://hillert.blogspot.com/2011/12/java-print-service-frustrations.html) result 200).
* [ ] http://jcp.org/aboutJava/communityprocess/final/jsr225/index.html with 1 occurrences migrated to:
  https://jcp.org/aboutJava/communityprocess/final/jsr225/index.html ([https](https://jcp.org/aboutJava/communityprocess/final/jsr225/index.html) result 200).
* [ ] http://kafka.apache.org/ with 1 occurrences migrated to:
  https://kafka.apache.org/ ([https](https://kafka.apache.org/) result 200).
* [ ] http://maven.apache.org/ with 2 occurrences migrated to:
  https://maven.apache.org/ ([https](https://maven.apache.org/) result 200).
* [ ] http://mqtt.org/ with 2 occurrences migrated to:
  https://mqtt.org/ ([https](https://mqtt.org/) result 200).
* [ ] http://oauth.net with 2 occurrences migrated to:
  https://oauth.net ([https](https://oauth.net) result 200).
* [ ] http://projects.spring.io/spring-social-twitter/ with 2 occurrences migrated to:
  https://projects.spring.io/spring-social-twitter/ ([https](https://projects.spring.io/spring-social-twitter/) result 200).
* [ ] http://spring.io with 4 occurrences migrated to:
  https://spring.io ([https](https://spring.io) result 200).
* [ ] http://spring.io/ with 4 occurrences migrated to:
  https://spring.io/ ([https](https://spring.io/) result 200).
* [ ] http://stackoverflow.com/faq with 2 occurrences migrated to:
  https://stackoverflow.com/faq ([https](https://stackoverflow.com/faq) result 200).
* [ ] http://stackoverflow.com/questions/3725662/what-is-the-earliest-timestamp-value-that-is-supported-in-zip-file-format with 2 occurrences migrated to:
  https://stackoverflow.com/questions/3725662/what-is-the-earliest-timestamp-value-that-is-supported-in-zip-file-format ([https](https://stackoverflow.com/questions/3725662/what-is-the-earliest-timestamp-value-that-is-supported-in-zip-file-format) result 200).
* [ ] http://stackoverflow.com/questions/tagged/spring-integration with 2 occurrences migrated to:
  https://stackoverflow.com/questions/tagged/spring-integration ([https](https://stackoverflow.com/questions/tagged/spring-integration) result 200).
* [ ] http://vimeo.com/34436402 with 1 occurrences migrated to:
  https://vimeo.com/34436402 ([https](https://vimeo.com/34436402) result 200).
* [ ] http://wiki.apache.org/cassandra/HintedHandoff with 1 occurrences migrated to:
  https://wiki.apache.org/cassandra/HintedHandoff ([https](https://wiki.apache.org/cassandra/HintedHandoff) result 200).
* [ ] http://wiki.apache.org/cassandra/Operations with 3 occurrences migrated to:
  https://wiki.apache.org/cassandra/Operations ([https](https://wiki.apache.org/cassandra/Operations) result 200).
* [ ] http://wiki.apache.org/cassandra/StorageConfiguration with 1 occurrences migrated to:
  https://wiki.apache.org/cassandra/StorageConfiguration ([https](https://wiki.apache.org/cassandra/StorageConfiguration) result 200).
* [ ] http://www.apache.org with 11 occurrences migrated to:
  https://www.apache.org ([https](https://www.apache.org) result 200).
* [ ] http://www.html5rocks.com/en/tutorials/websockets/basics/ with 1 occurrences migrated to:
  https://www.html5rocks.com/en/tutorials/websockets/basics/ ([https](https://www.html5rocks.com/en/tutorials/websockets/basics/) result 200).
* [ ] http://www.nowsms.com/long-sms-text-messages-and-the-160-character-limit with 1 occurrences migrated to:
  https://www.nowsms.com/long-sms-text-messages-and-the-160-character-limit ([https](https://www.nowsms.com/long-sms-text-messages-and-the-160-character-limit) result 200).
* [ ] http://www.nowsms.com/smpp-information with 1 occurrences migrated to:
  https://www.nowsms.com/smpp-information ([https](https://www.nowsms.com/smpp-information) result 200).
* [ ] http://www.project-voldemort.com/ with 1 occurrences migrated to:
  https://www.project-voldemort.com/ ([https](https://www.project-voldemort.com/) result 200).
* [ ] http://www.project-voldemort.com/voldemort/ with 1 occurrences migrated to:
  https://www.project-voldemort.com/voldemort/ ([https](https://www.project-voldemort.com/voldemort/) result 200).
* [ ] http://www.sedna.org/ with 2 occurrences migrated to:
  https://www.sedna.org/ ([https](https://www.sedna.org/) result 200).
* [ ] http://www.splunk.com/ with 2 occurrences migrated to:
  https://www.splunk.com/ ([https](https://www.splunk.com/) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans.xsd with 6 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans.xsd ([https](https://www.springframework.org/schema/beans/spring-beans.xsd) result 200).
* [ ] http://www.springframework.org/schema/integration/spring-integration-2.2.xsd with 6 occurrences migrated to:
  https://www.springframework.org/schema/integration/spring-integration-2.2.xsd ([https](https://www.springframework.org/schema/integration/spring-integration-2.2.xsd) result 200).
* [ ] http://www.springframework.org/schema/integration/spring-integration-4.2.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/integration/spring-integration-4.2.xsd ([https](https://www.springframework.org/schema/integration/spring-integration-4.2.xsd) result 200).
* [ ] http://www.springframework.org/schema/integration/spring-integration-5.1.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/integration/spring-integration-5.1.xsd ([https](https://www.springframework.org/schema/integration/spring-integration-5.1.xsd) result 200).
* [ ] http://www.springframework.org/schema/integration/spring-integration.xsd with 9 occurrences migrated to:
  https://www.springframework.org/schema/integration/spring-integration.xsd ([https](https://www.springframework.org/schema/integration/spring-integration.xsd) result 200).
* [ ] http://www.techdive.in/java/send-sms-using-jsmpp with 1 occurrences migrated to:
  https://www.techdive.in/java/send-sms-using-jsmpp ([https](https://www.techdive.in/java/send-sms-using-jsmpp) result 200).
* [ ] http://contributor-covenant.org with 1 occurrences migrated to:
  https://contributor-covenant.org ([https](https://contributor-covenant.org) result 301).
* [ ] http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to:
  https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/) result 301).
* [ ] http://static.springsource.org/spring-integration/reference (301) with 5 occurrences migrated to:
  https://docs.spring.io/spring-integration/reference ([https](https://static.springsource.org/spring-integration/reference) result 301).
* [ ] http://docs.spring.io/spring-integration/reference/html with 1 occurrences migrated to:
  https://docs.spring.io/spring-integration/reference/html ([https](https://docs.spring.io/spring-integration/reference/html) result 301).
* [ ] http://docs.spring.io/spring/docs/current/spring-framework-reference/html/expressions.html with 1 occurrences migrated to:
  https://docs.spring.io/spring/docs/current/spring-framework-reference/html/expressions.html ([https](https://docs.spring.io/spring/docs/current/spring-framework-reference/html/expressions.html) result 301).
* [ ] http://forum.springsource.org/forumdisplay.php?42-Integration (301) with 1 occurrences migrated to:
  https://forum.spring.io/forumdisplay.php?42-Integration ([https](https://forum.springsource.org/forumdisplay.php?42-Integration) result 301).
* [ ] http://help.github.com/set-up-git-redirect with 1 occurrences migrated to:
  https://help.github.com/set-up-git-redirect ([https](https://help.github.com/set-up-git-redirect) result 301).
* [ ] http://jira.springsource.org/browse/INTEXT with 1 occurrences migrated to:
  https://jira.springsource.org/browse/INTEXT ([https](https://jira.springsource.org/browse/INTEXT) result 301).
* [ ] http://projects.spring.io/spring-social with 1 occurrences migrated to:
  https://projects.spring.io/spring-social ([https](https://projects.spring.io/spring-social) result 301).
* [ ] http://support.twitter.com/articles/119138-types-of-tweets-and-where-they-appear with 1 occurrences migrated to:
  https://support.twitter.com/articles/119138-types-of-tweets-and-where-they-appear ([https](https://support.twitter.com/articles/119138-types-of-tweets-and-where-they-appear) result 301).
* [ ] http://www.linkedin.com/answers/technology/information-technology/telecommunications/TCH_ITS_TCI/461130-44316394 with 1 occurrences migrated to:
  https://www.linkedin.com/answers/technology/information-technology/telecommunications/TCH_ITS_TCI/461130-44316394 ([https](https://www.linkedin.com/answers/technology/information-technology/telecommunications/TCH_ITS_TCI/461130-44316394) result 301).
* [ ] http://www.splunk.com/download with 1 occurrences migrated to:
  https://www.splunk.com/download ([https](https://www.splunk.com/download) result 301).
* [ ] http://www.spring.io with 5 occurrences migrated to:
  https://www.spring.io ([https](https://www.spring.io) result 301).
* [ ] http://www.springframework.org with 6 occurrences migrated to:
  https://www.springframework.org ([https](https://www.springframework.org) result 301).
* [ ] http://www.springsource.com with 10 occurrences migrated to:
  https://www.springsource.com ([https](https://www.springsource.com) result 301).
* [ ] http://www.springsource.org/spring-integration with 18 occurrences migrated to:
  https://www.springsource.org/spring-integration ([https](https://www.springsource.org/spring-integration) result 301).
* [ ] http://www.springintegration.org/ (301) with 2 occurrences migrated to:
  https://www.springsource.org/spring-integration/ ([https](https://www.springintegration.org/) result 301).
* [ ] http://www.springsource.org/sts with 1 occurrences migrated to:
  https://www.springsource.org/sts ([https](https://www.springsource.org/sts) result 301).
* [ ] http://dev.twitter.com with 2 occurrences migrated to:
  https://dev.twitter.com ([https](https://dev.twitter.com) result 302).
* [ ] http://dev.twitter.com/pages/oauth_faq with 1 occurrences migrated to:
  https://dev.twitter.com/pages/oauth_faq ([https](https://dev.twitter.com/pages/oauth_faq) result 302).
* [ ] http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html with 1 occurrences migrated to:
  https://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html ([https](https://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html) result 302).
* [ ] http://hueniverse.com/oauth with 2 occurrences migrated to:
  https://hueniverse.com/oauth ([https](https://hueniverse.com/oauth) result 302).
* [ ] http://spring.io/spring-integration with 1 occurrences migrated to:
  https://spring.io/spring-integration ([https](https://spring.io/spring-integration) result 302).
* [ ] http://springsource.com/support/springsupport with 1 occurrences migrated to:
  https://springsource.com/support/springsupport ([https](https://springsource.com/support/springsupport) result 302).
* [ ] http://www.exist-db.org/ with 1 occurrences migrated to:
  https://www.exist-db.org/ ([https](https://www.exist-db.org/) result 302).

# Ignored
These URLs were intentionally ignored.

* http://www.springframework.org/schema/beans with 30 occurrences
* http://www.springframework.org/schema/integration with 34 occurrences
* http://www.springframework.org/schema/integration/cassandra with 2 occurrences
* http://www.springframework.org/schema/integration/hazelcast with 4 occurrences
* http://www.springframework.org/schema/integration/jgroups with 8 occurrences
* http://www.springframework.org/schema/integration/jt400 with 2 occurrences
* http://www.springframework.org/schema/integration/print with 4 occurrences
* http://www.springframework.org/schema/integration/smb with 3 occurrences
* http://www.springframework.org/schema/integration/smpp with 2 occurrences
* http://www.springframework.org/schema/integration/twitter with 4 occurrences
* http://www.springframework.org/schema/integration/voldemort with 6 occurrences
* http://www.springframework.org/schema/integration/xmpp with 2 occurrences
* http://www.springframework.org/schema/integration/xquery with 2 occurrences
* http://www.springframework.org/schema/integration/zip with 2 occurrences
* http://www.springframework.org/schema/tool with 24 occurrences
* http://www.w3.org/2001/XMLSchema with 12 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 4 occurrences
2019-03-22 14:49:23 -04:00

313 lines
16 KiB
Plaintext

== Spring Integration Social Twitter Support
Spring Integration provides support for interacting with Twitter.
With the Twitter adapters you can both receive and send Twitter messages.
You can also perform a Twitter search based on a schedule and publish the search results within Messages.
Also a search outbound gateway is provided to perform dynamic searches.
=== Introduction
Twitter is a social networking and micro-blogging service that enables its users to send and read messages known as tweets.
Tweets are text-based posts of up to 140 characters displayed on the author's profile page and delivered to the author's subscribers who are known as followers.
The Spring Integration Social Twitter is based on the https://projects.spring.io/spring-social[Spring Social] project.
All Twitter endpoints require the configuration of a `TwitterTemplate` because even search operations require an authenticated template.
Spring Integration provides a convenient namespace configuration to define Twitter artifacts.
You can enable it by adding the following within your XML header.
[source,xml]
----
xmlns:int-twitter="http://www.springframework.org/schema/integration/twitter"
xsi:schemaLocation="http://www.springframework.org/schema/integration/twitter
https://www.springframework.org/schema/integration/twitter/spring-integration-social-twitter.xsd"
----
=== Twitter OAuth Configuration
For authenticated operations, Twitter uses OAuth - an authentication protocol that allows users to approve an application to act on their behalf without sharing their password.
More information can be found at https://oauth.net[https://oauth.net] or in this article https://hueniverse.com/oauth[https://hueniverse.com/oauth] from Hueniverse.
Please also see https://dev.twitter.com/pages/oauth_faq[OAuth FAQ] for more information about OAuth and Twitter.
In order to use OAuth authentication/authorization with Twitter you must create a new Application on the Twitter Developers site.
Follow the directions below to create a new application and obtain consumer keys and an access token:
* Go to https://dev.twitter.com[https://dev.twitter.com]
* Click on the `Register an app` link and fill out all required fields on the form provided; set `Application Type` to `Client` and depending on the nature of your application select `Default Access Type` as _Read & Write_ or _Read-only_ and Submit the form.
If everything is successful you'll be presented with the `Consumer Key` and `Consumer Secret`.
Copy both values in a safe place.
* On the same page you should see a `My Access Token` button on the side bar (right).
Click on it and you'll be presented with two more values: `Access Token` and `Access Token Secret`.
Copy these values in a safe place as well.
=== Twitter Template
As mentioned above, Spring Integration relies upon Spring Social, and that library provides an implementation of the template pattern, `o.s.social.twitter.api.impl.TwitterTemplate` to interact with Twitter.
For anonymous operations (e.g., search), you don't have to define an instance of `TwitterTemplate` explicitly, since a default instance will be created and injected into the endpoint.
However, for authenticated operations (update status, send direct message, etc.), you must configure a `TwitterTemplate` as a bean and inject it explicitly into the endpoint, because the authentication configuration is required.
Below is a sample configuration of TwitterTemplate:
[source,xml]
----
<bean id="twitterTemplate" class="o.s.social.twitter.api.impl.TwitterTemplate">
<constructor-arg value="4XzBPacJQxyBzzzH"/>
<constructor-arg value="AbRxUAvyCtqQtvxFK8w5ZMtMj20KFhB6o"/>
<constructor-arg value="21691649-4YZY5iJEOfz2A9qCFd9SjBRGb3HLmIm4HNE"/>
<constructor-arg value="AbRxUAvyNCtqQtxFK8w5ZMtMj20KFhB6o"/>
</bean>
----
NOTE: The values above are not real.
As you can see from the configuration above, all we need to do is to provide OAuth `attributes` as constructor arguments.
The values would be those you obtained in the previous step.
The order of constructor arguments is: 1) `consumerKey`, 2) `consumerSecret`, 3) `accessToken`, and 4) `accessTokenSecret`.
A more practical way to manage OAuth connection attributes would be via Spring's property placeholder support by simply creating a property file (e.g., oauth.properties):
[source,java]
----
twitter.oauth.consumerKey=4XzBPacJQxyBzzzH
twitter.oauth.consumerSecret=AbRxUAvyCtqQtvxFK8w5ZMtMj20KFhB6o
twitter.oauth.accessToken=21691649-4YZY5iJEOfz2A9qCFd9SjBRGb3HLmIm4HNE
twitter.oauth.accessTokenSecret=AbRxUAvyNCtqQtxFK8w5ZMtMj20KFhB6o
----
Then, you can configure a `property-placeholder` to point to the above property file:
[source,xml]
----
<context:property-placeholder location="classpath:oauth.properties"/>
<bean id="twitterTemplate" class="o.s.social.twitter.api.impl.TwitterTemplate">
<constructor-arg value="${twitter.oauth.consumerKey}"/>
<constructor-arg value="${twitter.oauth.consumerSecret}"/>
<constructor-arg value="${twitter.oauth.accessToken}"/>
<constructor-arg value="${twitter.oauth.accessTokenSecret}"/>
</bean>
----
=== Twitter Inbound Adapters
Twitter inbound adapters allow you to receive Twitter Messages.
There are several types of https://support.twitter.com/articles/119138-types-of-tweets-and-where-they-appear[twitter messages, or tweets].
Spring Integration provides support for receiving tweets as _Timeline Updates_, _Direct Messages_, _Mention Messages_ as well as Search Results.
[IMPORTANT]
=====
Every Inbound Twitter Channel Adapter is a _Polling Consumer_ which means you have to provide a poller configuration.
Twitter defines a concept of Rate Limiting.
You can read more about it here: https://dev.twitter.com/docs/rate-limiting/1.1[Rate Limiting].
In a nutshell, Rate Limiting is a mechanism that Twitter uses to manage how often an application can poll for updates.
You should consider this when setting your poller intervals so that the adapter polls in compliance with the Twitter policies.
=====
Another issue that we need to worry about is handling duplicate Tweets.
The same adapter (e.g., Search or Timeline Update) while polling on Twitter may receive the same values more than once.
For example if you keep searching on Twitter with the same search criteria you'll end up with the same set of tweets unless some other new tweet that matches your search criteria was posted in between your searches.
In that situation you'll get all the tweets you had before plus the new one.
But what you really want is only the new tweet(s).
Spring Integration provides an elegant mechanism for handling these situations.
The latest Tweet id will be stored in an instance of the `org.springframework.integration.metadata.MetadataStore` strategy (e.g.
last retrieved tweet in this case).
For more information see https://docs.spring.io/spring-integration/docs/current/reference/html/system-management-chapter.html#metadata-store[MetadataStore].
NOTE: The key used to persist the latest _twitter id_ is the value of the (required) `id` attribute of the Twitter Inbound Channel Adapter component plus the `profileId` of the Twitter user.
==== Inbound Message Channel Adapter
This adapter allows you to receive updates from everyone you follow.
It's essentially the "Timeline Update" adapter.
[source,xml]
----
<int-twitter:inbound-channel-adapter
twitter-template="twitterTemplate"
channel="inChannel">
<int:poller fixed-rate="5000" max-messages-per-poll="3"/>
</int-twitter:inbound-channel-adapter>
----
==== Direct Inbound Message Channel Adapter
This adapter allows you to receive Direct Messages that were sent to you from other Twitter users.
[source,xml]
----
<int-twitter:dm-inbound-channel-adapter
twitter-template="twiterTemplate"
channel="inboundDmChannel">
<int-poller fixed-rate="5000" max-messages-per-poll="3"/>
</int-twitter:dm-inbound-channel-adapter>
----
==== Mentions Inbound Message Channel Adapter
This adapter allows you to receive Twitter Messages that Mention you via `@user` syntax.
[source,xml]
----
<int-twitter:mentions-inbound-channel-adapter
twitter-template="twiterTemplate"
channel="inboundMentionsChannel">
<int:poller fixed-rate="5000" max-messages-per-poll="3"/>
</int-twitter:mentions-inbound-channel-adapter>
----
==== Search Inbound Message Channel Adapter
This adapter allows you to perform searches.
As you can see it is not necessary to define twitter-template since a search can be performed anonymously, however you must define a search query.
[source,xml]
----
<int-twitter:search-inbound-channel-adapter
query="#springintegration"
channel="inboundMentionsChannel">
<int:poller fixed-rate="5000" max-messages-per-poll="3"/>
</int-twitter:search-inbound-channel-adapter>
----
Refer to https://dev.twitter.com/docs/using-search to learn more about Twitter queries.
As you can see the configuration of all of these adapters is very similar to other inbound adapters with one exception.
Some may need to be injected with the `twitter-template`.
Once received each Twitter Message would be encapsulated in a Spring Integration Message and sent to the channel specified by the `channel` attribute.
Currently the Payload type of any Message is `org.springframework.integration.twitter.core.Tweet` which is very similar to the object with the same name in Spring Social.
As we migrate to Spring Social we'll be depending on their API and some of the artifacts that are currently in use will be obsolete, however we've already made sure that the impact of such migration is minimal by aligning our API with the current state (at the time of writing) of Spring Social.
To get the text from the `org.springframework.social.twitter.api.Tweet` simply invoke the `getText()` method.
=== Twitter Outbound Adapter
Twitter outbound channel adapters allow you to send Twitter Messages, or tweets.
Spring Integration also supports sending _Status Update Messages_ and _Direct Messages_.
Twitter outbound channel adapters will take the Message payload and send it as a Twitter message.
Currently the only supported payload type is`String`, so consider adding a _transformer_ if the payload of the incoming message is not a String.
==== Twitter Outbound Update Channel Adapter
This adapter allows you to send regular status updates by simply sending a Message to the channel identified by the `channel` attribute.
[source,xml]
----
<int-twitter:outbound-channel-adapter
twitter-template="twitterTemplate"
channel="twitterChannel"/>
----
The only extra configuration that is required for this adapter is the `twitter-template` reference.
The `<int-twitter:outbound-channel-adapter>` supports a `tweet-data-expression` to populate the `TweetData` argument (https://projects.spring.io/spring-social-twitter/[Spring Social Twitter]) using the message as the root object of the expression evaluation context.
The result can be a `String`, which will be used for the `TweetData` message; a `Tweet` object, the `text` of which will be used for the `TweetData` message; or an entire `TweetData` object.
For convenience, the `TweetData` can be built from the expression directly without needing a fully qualified class name:
[source,xml]
----
<int-twitter:outbound-channel-adapter
twitter-template="twitterTemplate"
channel="twitterChannel"
tweet-data-expression="new TweetData(payload).withMedia(headers.media).displayCoordinates(true)/>
----
This allows, for example, attaching an image to the tweet.
==== Twitter Outbound Direct Message Channel Adapter
This adapter allows you to send Direct Twitter Messages (i.e., `@user`) by simply sending a Message to the channel identified by the `channel` attribute.
[source,xml]
----
<int-twitter:dm-outbound-channel-adapter
twitter-template="twitterTemplate"
channel="twitterChannel"/>
----
The only extra configuration that is required for this adapter is the `twitter-template` reference.
When it comes to Twitter Direct Messages, you must specify who you are sending the message to - the _target userId_.
The Twitter Outbound Direct Message Channel Adapter will look for a target userId in the Message headers under the name `twitter_dmTargetUserId` which is also identified by the following constant: `TwitterHeaders.DM_TARGET_USER_ID`.
So when creating a Message all you need to do is add a value for that header.
[source,java]
----
Message message = MessageBuilder.withPayload("hello")
.setHeader(TwitterHeaders.DM_TARGET_USER_ID, "z_oleg").build();
----
The above approach works well if you are creating the Message programmatically.
However it's more common to provide the header value within a messaging flow.
The value can be provided by an upstream <header-enricher>.
[source,xml]
----
<int:header-enricher input-channel="in" output-channel="out">
<int:header name="twitter_dmTargetUserId" value="z_oleg"/>
</int:header-enricher>
----
It's quite common that the value must be determined dynamically.
For those cases you can take advantage of SpEL support within the `<header-enricher>`.
[source,xml]
----
<int:header-enricher input-channel="in" output-channel="out">
<int:header name="twitter_dmTargetUserId"
expression="@twitterIdService.lookup(headers.username)"/>
</int:header-enricher>
----
IMPORTANT: Twitter does not allow you to post duplicate Messages.
This is a common problem during testing when the same code works the first time but does not work the second time.
So, make sure to change the content of the Message each time.
Another thing that works well for testing is to append a timestamp to the end of each message.
=== Twitter Search Outbound Gateway
In Spring Integration, an outbound gateway is used for two-way request/response communication with an external service.
The Twitter Search Outbound Gateway allows you to issue dynamic twitter searches.
The reply message payload is a collection of `Tweet` objects.
If the search returns no results, the payload is an empty collection.
You can limit the number of tweets and you can page through a larger set of tweets by making multiple calls.
To facilitate this, search reply messages contain a header `twitter_searchMetadata` with its value being a `SearchMetadata` object.
For more information on the `Tweet`, `SearchParameters` and `SearchMetadata` classes, refer to the https://projects.spring.io/spring-social-twitter/[Spring Social Twitter] documentation.
*Configuring the Outbound Gateway*
[source,xml]
----
<int-twitter:search-outbound-gateway id="twitter"
request-channel="in" <1>
twitter-template="twitterTemplate" <2>
search-args-expression="payload" <3>
reply-channel="out" <4>
reply-timeout="123" <5>
order="1" <6>
auto-startup="false" <7>
phase="100" /> <8>
----
<1> The channel used to send search requests to this gateway.
<2> A reference to a `TwitterTemplate` with authentication configuration.
<3> A SpEL expression that evaluates to argument(s) for the search.
Default: *"payload"* - in which case the payload can be a `String` (e.g "#springintegration") and the gateway limits the query to 20 tweets, or the payload can be a `SearchParameters` object. +
The expression can also be specified as a https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#expressions-inline-lists[SpEL List].
The first element (String) is the query, the remaining elements (Numbers) are `pageSize, sinceId, maxId` respectively - refer to the Spring Social Twitter documentation for more information about these parameters.
When specifying a `SearchParameters` object directly in the SpEL expression, you do not have to fully qualify the class name.
Some examples: +
`new SearchParameters(payload).count(5).sinceId(headers.sinceId)` +
`{payload, 30}` +
`{payload, headers.pageSize, headers.sinceId, headers.maxId}`
<4> The channel to which to send the reply; if omitted, the `replyChannel` header is used.
<5> The timeout when sending the reply message to the reply channel; only applies if the reply channel can block, for example a bounded queue channel that is full.
<6> When subscribed to a publish/subscribe channel, the order in which this endpoint will be invoked.
<7> `SmartLifecycle` method.
<8> `SmartLifecycle` method.