CAMEL-11242 Split camel-twitter component/endpoint into 4 (directmessage, 
search, streaming, timeline)


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/bb64dca0
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bb64dca0
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bb64dca0

Branch: refs/heads/master
Commit: bb64dca0f2b2104f757a09e7f3e5e94237c6acd5
Parents: 26cbd18
Author: Tomohisa Igarashi <tm.igara...@gmail.com>
Authored: Mon May 8 21:51:59 2017 +0900
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Wed May 24 13:11:03 2017 +0200

----------------------------------------------------------------------
 .../src/main/docs/twitter-component.adoc        |  15 +-
 .../docs/twitter-directmessage-component.adoc   |  97 ++++++++
 .../src/main/docs/twitter-search-component.adoc |  94 ++++++++
 .../main/docs/twitter-streaming-component.adoc  |  94 ++++++++
 .../main/docs/twitter-timeline-component.adoc   |  95 ++++++++
 .../camel-twitter/src/main/docs/twitter.adoc    | 154 +++++++++++++
 .../twitter/AbstractTwitterComponent.java       | 165 ++++++++++++++
 .../twitter/AbstractTwitterEndpoint.java        | 153 +++++++++++++
 .../DefaultTwitterComponentVerifier.java        |  95 ++++++++
 .../component/twitter/TwitterComponent.java     | 142 ++----------
 .../twitter/TwitterComponentVerifier.java       |  90 --------
 .../component/twitter/TwitterConfiguration.java |   7 +-
 .../component/twitter/TwitterEndpoint.java      |   4 +
 .../twitter/TwitterEndpointDirect.java          |  14 +-
 .../component/twitter/TwitterEndpointEvent.java |   9 +-
 .../twitter/TwitterEndpointPolling.java         |  20 +-
 .../camel/component/twitter/TwitterHelper.java  |  77 ++++---
 .../AbstractTwitterConsumerHandler.java         |  85 +++++++
 .../consumer/DefaultTwitterConsumer.java        | 121 ++++++++++
 .../twitter/consumer/TwitterConsumer.java       |  85 -------
 .../twitter/consumer/TwitterConsumerDirect.java |   5 +-
 .../twitter/consumer/TwitterConsumerEvent.java  |  19 +-
 .../consumer/TwitterConsumerPolling.java        |  17 +-
 .../directmessage/DirectMessageConsumer.java    |  54 -----
 .../twitter/consumer/search/SearchConsumer.java | 127 -----------
 .../streaming/AbstractStreamingConsumer.java    | 128 -----------
 .../streaming/FilterStreamingConsumer.java      |  77 -------
 .../streaming/SampleStreamingConsumer.java      |  40 ----
 .../streaming/UserStreamingConsumer.java        | 226 -------------------
 .../timeline/AbstractStatusConsumer.java        |  55 -----
 .../twitter/consumer/timeline/HomeConsumer.java |  43 ----
 .../consumer/timeline/MentionsConsumer.java     |  43 ----
 .../consumer/timeline/RetweetsConsumer.java     |  43 ----
 .../twitter/consumer/timeline/UserConsumer.java |  43 ----
 .../component/twitter/data/TrendsType.java      |   1 +
 .../DirectMessageConsumerHandler.java           |  54 +++++
 .../directmessage/DirectMessageProducer.java    |  54 +++++
 .../TwitterDirectMessageComponent.java          |  44 ++++
 .../TwitterDirectMessageEndpoint.java           |  44 ++++
 .../twitter/producer/DirectMessageProducer.java |  50 ----
 .../twitter/producer/SearchProducer.java        | 130 -----------
 .../twitter/producer/TwitterProducer.java       |  37 ---
 .../twitter/producer/UserProducer.java          |  71 ------
 .../twitter/search/SearchConsumerHandler.java   | 127 +++++++++++
 .../twitter/search/SearchProducer.java          | 134 +++++++++++
 .../twitter/search/TwitterSearchComponent.java  |  45 ++++
 .../twitter/search/TwitterSearchEndpoint.java   |  44 ++++
 .../AbstractStreamingConsumerHandler.java       | 128 +++++++++++
 .../FilterStreamingConsumerHandler.java         |  77 +++++++
 .../SampleStreamingConsumerHandler.java         |  40 ++++
 .../streaming/TwitterStreamingComponent.java    |  44 ++++
 .../streaming/TwitterStreamingEndpoint.java     |  62 +++++
 .../streaming/UserStreamingConsumerHandler.java | 226 +++++++++++++++++++
 .../timeline/AbstractStatusConsumerHandler.java |  55 +++++
 .../twitter/timeline/HomeConsumerHandler.java   |  43 ++++
 .../timeline/MentionsConsumerHandler.java       |  43 ++++
 .../timeline/RetweetsConsumerHandler.java       |  43 ++++
 .../timeline/TwitterTimelineComponent.java      |  45 ++++
 .../timeline/TwitterTimelineEndpoint.java       |  79 +++++++
 .../twitter/timeline/UserConsumerHandler.java   |  43 ++++
 .../twitter/timeline/UserProducer.java          |  75 ++++++
 .../camel/component/twitter-directmessage       |  18 ++
 .../org/apache/camel/component/twitter-search   |  18 ++
 .../apache/camel/component/twitter-streaming    |  18 ++
 .../org/apache/camel/component/twitter-timeline |  18 ++
 .../twitter/CamelComponentVerifierTest.java     |  28 ++-
 .../twitter/DirectMessageDirectTest.java        |  21 +-
 .../twitter/DirectMessagePollingTest.java       |  20 +-
 .../twitter/HomeTimeLineDirectTest.java         |   2 +-
 .../twitter/HomeTimeLinePollingTest.java        |   2 +-
 .../twitter/SearchByExchangeDirectTest.java     |   6 +-
 .../SearchDirectCustomComponentTest.java        |   5 +-
 .../component/twitter/SearchDirectTest.java     |   2 +-
 .../component/twitter/SearchEventTest.java      |   2 +-
 .../component/twitter/SearchPollingTest.java    |   2 +-
 .../component/twitter/UriConfigurationTest.java |  76 ++++++-
 .../twitter/UserProducerInOnlyTest.java         |   6 +-
 .../twitter/UserProducerInOutTest.java          |   6 +-
 .../component/twitter/UserStreamingTest.java    |   2 +-
 .../twitter/UserTimeLineDirectTest.java         |   2 +-
 .../twitter/UserTimeLinePollingTest.java        |   2 +-
 .../deprecated/DirectMessageDirectTest.java     |  58 +++++
 .../deprecated/DirectMessagePollingTest.java    |  55 +++++
 .../deprecated/HomeTimeLineDirectTest.java      |  38 ++++
 .../deprecated/HomeTimeLinePollingTest.java     |  37 +++
 .../deprecated/SearchByExchangeDirectTest.java  | 139 ++++++++++++
 .../SearchDirectCustomComponentTest.java        |  48 ++++
 .../twitter/deprecated/SearchDirectTest.java    |  38 ++++
 .../twitter/deprecated/SearchEventTest.java     |  91 ++++++++
 .../twitter/deprecated/SearchPollingTest.java   |  37 +++
 .../deprecated/UserProducerInOnlyTest.java      |  78 +++++++
 .../deprecated/UserProducerInOutTest.java       |  84 +++++++
 .../twitter/deprecated/UserStreamingTest.java   |  51 +++++
 .../deprecated/UserTimeLineDirectTest.java      |  38 ++++
 .../deprecated/UserTimeLinePollingTest.java     |  38 ++++
 components/readme.adoc                          |  16 +-
 docs/user-manual/en/SUMMARY.md                  |   4 +
 .../example/mention/TwitterSalesforceRoute.java |   2 +-
 .../OSGI-INF/blueprint/camel-twitter.xml        |   4 +-
 .../websocket/TwitterWebSocketRoute.java        |   2 +-
 ...DirectMessageComponentAutoConfiguration.java | 130 +++++++++++
 ...tterDirectMessageComponentConfiguration.java | 146 ++++++++++++
 ...TwitterSearchComponentAutoConfiguration.java | 129 +++++++++++
 .../TwitterSearchComponentConfiguration.java    | 145 ++++++++++++
 .../TwitterComponentConfiguration.java          |   4 +-
 ...tterStreamingComponentAutoConfiguration.java | 129 +++++++++++
 .../TwitterStreamingComponentConfiguration.java | 146 ++++++++++++
 ...itterTimelineComponentAutoConfiguration.java | 129 +++++++++++
 .../TwitterTimelineComponentConfiguration.java  | 146 ++++++++++++
 .../main/resources/META-INF/spring.factories    |  10 +-
 110 files changed, 5020 insertions(+), 1582 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/bb64dca0/components/camel-twitter/src/main/docs/twitter-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-twitter/src/main/docs/twitter-component.adoc 
b/components/camel-twitter/src/main/docs/twitter-component.adoc
index 94b4b6a..93501d9 100644
--- a/components/camel-twitter/src/main/docs/twitter-component.adoc
+++ b/components/camel-twitter/src/main/docs/twitter-component.adoc
@@ -1,7 +1,18 @@
-## Twitter Component
+## Twitter Component (deprecated)
 
 *Available as of Camel version 2.10*
 
+[IMPORTANT]
+====================================================================================
+The composite twitter component has been deprecated. Use individual component 
for directmessage, search, streaming and timeline.
+
+* link:twitter.html[Twitter Components]
+  ** link:twitter-directmessage-component.html[Twitter Direct Message]
+  ** link:twitter-search-component.html[Twitter Search]
+  ** link:twitter-streaming-component.html[Twitter Streaming]
+  ** link:twitter-timeline-component.html[Twitter Timeline]
+====================================================================================
+
 The Twitter component enables the most useful features of the Twitter
 API by encapsulating http://twitter4j.org/[Twitter4J]. It allows direct,
 polling, or event-driven consumption of timelines, users, trends, and
@@ -141,7 +152,7 @@ with the following path and query parameters:
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
 | Name | Description | Default | Type
-| **kind** | *Required* What polling mode to use direct polling or event 
based. The event mode is only supported when the endpoint kind is event based. 
|  | String
+| **kind** | *Required* The kind of endpoint |  | String
 |=======================================================================
 
 #### Query Parameters (43 parameters):

http://git-wip-us.apache.org/repos/asf/camel/blob/bb64dca0/components/camel-twitter/src/main/docs/twitter-directmessage-component.adoc
----------------------------------------------------------------------
diff --git 
a/components/camel-twitter/src/main/docs/twitter-directmessage-component.adoc 
b/components/camel-twitter/src/main/docs/twitter-directmessage-component.adoc
new file mode 100644
index 0000000..46ccda7
--- /dev/null
+++ 
b/components/camel-twitter/src/main/docs/twitter-directmessage-component.adoc
@@ -0,0 +1,97 @@
+## Twitter Direct Message Component
+
+*Available as of Camel version 2.10*
+
+
+The Twitter Direct Message Component consumes/produces a user's direct 
messages.
+
+### URI Options
+
+// component options: START
+The Twitter Direct Message component supports 9 options which are listed below.
+
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|=======================================================================
+| Name | Description | Default | Type
+| **accessToken** (security) | The access token |  | String
+| **accessTokenSecret** (security) | The access token secret |  | String
+| **consumerKey** (security) | The consumer key |  | String
+| **consumerSecret** (security) | The consumer secret |  | String
+| **httpProxyHost** (proxy) | The http proxy host which can be used for the 
camel-twitter. |  | String
+| **httpProxyUser** (proxy) | The http proxy user which can be used for the 
camel-twitter. |  | String
+| **httpProxyPassword** (proxy) | The http proxy password which can be used 
for the camel-twitter. |  | String
+| **httpProxyPort** (proxy) | The http proxy port which can be used for the 
camel-twitter. |  | int
+| **resolveProperty Placeholders** (advanced) | Whether the component should 
resolve property placeholders on itself when starting. Only properties which 
are of String type can use property placeholders. | true | boolean
+|=======================================================================
+// component options: END
+
+
+
+
+// endpoint options: START
+The Twitter Direct Message endpoint is configured using URI syntax:
+
+    twitter-directmessage:endpointId
+
+with the following path and query parameters:
+
+#### Path Parameters (1 parameters):
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|=======================================================================
+| Name | Description | Default | Type
+| **endpointId** | *Required* The endpoint ID (not used). |  | String
+|=======================================================================
+
+#### Query Parameters (43 parameters):
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|=======================================================================
+| Name | Description | Default | Type
+| **user** (common) | Username used for user timeline consumption direct 
message production etc. |  | String
+| **bridgeErrorHandler** (consumer) | Allows for bridging the consumer to the 
Camel routing Error Handler which mean any exceptions occurred while the 
consumer is trying to pickup incoming messages or the likes will now be 
processed as a message and handled by the routing Error Handler. By default the 
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions that will be logged at WARN or ERROR level and ignored. | false | 
boolean
+| **sendEmptyMessageWhenIdle** (consumer) | If the polling consumer did not 
poll any files you can enable this option to send an empty message (no body) 
instead. | false | boolean
+| **type** (consumer) | Endpoint type to use. Only streaming supports event 
type. | polling | EndpointType
+| **distanceMetric** (consumer) | Used by the non-stream geography search to 
search by radius using the configured metrics. The unit can either be mi for 
miles or km for kilometers. You need to configure all the following options: 
longitude latitude radius and distanceMetric. | km | String
+| **exceptionHandler** (consumer) | To let the consumer use a custom 
ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this 
options is not in use. By default the consumer will deal with exceptions that 
will be logged at WARN or ERROR level and ignored. |  | ExceptionHandler
+| **exchangePattern** (consumer) | Sets the exchange pattern when the consumer 
creates an exchange. |  | ExchangePattern
+| **latitude** (consumer) | Used by the non-stream geography search to search 
by latitude. You need to configure all the following options: longitude 
latitude radius and distanceMetric. |  | Double
+| **locations** (consumer) | Bounding boxes created by pairs of lat/lons. Can 
be used for streaming/filter. A pair is defined as latlon. And multiple paris 
can be separated by semi colon. |  | String
+| **longitude** (consumer) | Used by the non-stream geography search to search 
by longitude. You need to configure all the following options: longitude 
latitude radius and distanceMetric. |  | Double
+| **pollStrategy** (consumer) | A pluggable 
org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your 
custom implementation to control error handling usually occurred during the 
poll operation before an Exchange have been created and being routed in Camel. 
|  | PollingConsumerPoll Strategy
+| **radius** (consumer) | Used by the non-stream geography search to search by 
radius. You need to configure all the following options: longitude latitude 
radius and distanceMetric. |  | Double
+| **twitterStream** (consumer) | To use a custom instance of TwitterStream |  
| TwitterStream
+| **synchronous** (advanced) | Sets whether synchronous processing should be 
strictly used or Camel is allowed to use asynchronous processing (if 
supported). | false | boolean
+| **count** (filter) | Limiting number of results per page. |  | Integer
+| **filterOld** (filter) | Filter out old tweets that has previously been 
polled. This state is stored in memory only and based on last tweet id. | true 
| boolean
+| **keywords** (filter) | Can be used for search and streaming/filter. 
Multiple values can be separated with comma. |  | String
+| **lang** (filter) | The lang string ISO_639-1 which will be used for 
searching |  | String
+| **numberOfPages** (filter) | The number of pages result which you want 
camel-twitter to consume. | 1 | Integer
+| **sinceId** (filter) | The last tweet id which will be used for pulling the 
tweets. It is useful when the camel route is restarted after a long running. | 
1 | long
+| **userIds** (filter) | To filter by user ids for streaming/filter. Multiple 
values can be separated by comma. |  | String
+| **backoffErrorThreshold** (scheduler) | The number of subsequent error polls 
(failed due some error) that should happen before the backoffMultipler should 
kick-in. |  | int
+| **backoffIdleThreshold** (scheduler) | The number of subsequent idle polls 
that should happen before the backoffMultipler should kick-in. |  | int
+| **backoffMultiplier** (scheduler) | To let the scheduled polling consumer 
backoff if there has been a number of subsequent idles/errors in a row. The 
multiplier is then the number of polls that will be skipped before the next 
actual attempt is happening again. When this option is in use then 
backoffIdleThreshold and/or backoffErrorThreshold must also be configured. |  | 
int
+| **delay** (scheduler) | Milliseconds before the next poll. | 30000 | long
+| **greedy** (scheduler) | If greedy is enabled then the ScheduledPollConsumer 
will run immediately again if the previous run polled 1 or more messages. | 
false | boolean
+| **initialDelay** (scheduler) | Milliseconds before the first poll starts. 
You can also specify time values using units such as 60s (60 seconds) 5m30s (5 
minutes and 30 seconds) and 1h (1 hour). | 1000 | long
+| **runLoggingLevel** (scheduler) | The consumer logs a start/complete log 
line when it polls. This option allows you to configure the logging level for 
that. | TRACE | LoggingLevel
+| **scheduledExecutorService** (scheduler) | Allows for configuring a 
custom/shared thread pool to use for the consumer. By default each consumer has 
its own single threaded thread pool. |  | ScheduledExecutor Service
+| **scheduler** (scheduler) | To use a cron scheduler from either camel-spring 
or camel-quartz2 component | none | ScheduledPollConsumer Scheduler
+| **schedulerProperties** (scheduler) | To configure additional properties 
when using a custom scheduler or any of the Quartz2 Spring based scheduler. |  
| Map
+| **startScheduler** (scheduler) | Whether the scheduler should be auto 
started. | true | boolean
+| **timeUnit** (scheduler) | Time unit for initialDelay and delay options. | 
MILLISECONDS | TimeUnit
+| **useFixedDelay** (scheduler) | Controls if fixed delay or fixed rate is 
used. See ScheduledExecutorService in JDK for details. | true | boolean
+| **sortById** (sort) | Sorts by id so the oldest are first and newest last. | 
true | boolean
+| **httpProxyHost** (proxy) | The http proxy host which can be used for the 
camel-twitter. Can also be configured on the TwitterComponent level instead. |  
| String
+| **httpProxyPassword** (proxy) | The http proxy password which can be used 
for the camel-twitter. Can also be configured on the TwitterComponent level 
instead. |  | String
+| **httpProxyPort** (proxy) | The http proxy port which can be used for the 
camel-twitter. Can also be configured on the TwitterComponent level instead. |  
| Integer
+| **httpProxyUser** (proxy) | The http proxy user which can be used for the 
camel-twitter. Can also be configured on the TwitterComponent level instead. |  
| String
+| **accessToken** (security) | The access token. Can also be configured on the 
TwitterComponent level instead. |  | String
+| **accessTokenSecret** (security) | The access secret. Can also be configured 
on the TwitterComponent level instead. |  | String
+| **consumerKey** (security) | The consumer key. Can also be configured on the 
TwitterComponent level instead. |  | String
+| **consumerSecret** (security) | The consumer secret. Can also be configured 
on the TwitterComponent level instead. |  | String
+|=======================================================================
+// endpoint options: END

http://git-wip-us.apache.org/repos/asf/camel/blob/bb64dca0/components/camel-twitter/src/main/docs/twitter-search-component.adoc
----------------------------------------------------------------------
diff --git 
a/components/camel-twitter/src/main/docs/twitter-search-component.adoc 
b/components/camel-twitter/src/main/docs/twitter-search-component.adoc
new file mode 100644
index 0000000..946f45f
--- /dev/null
+++ b/components/camel-twitter/src/main/docs/twitter-search-component.adoc
@@ -0,0 +1,94 @@
+## Twitter Search Component
+
+*Available as of Camel version 2.10*
+
+The Twitter Search component consumes search results.
+
+// component options: START
+The Twitter Search component supports 9 options which are listed below.
+
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|=======================================================================
+| Name | Description | Default | Type
+| **accessToken** (security) | The access token |  | String
+| **accessTokenSecret** (security) | The access token secret |  | String
+| **consumerKey** (security) | The consumer key |  | String
+| **consumerSecret** (security) | The consumer secret |  | String
+| **httpProxyHost** (proxy) | The http proxy host which can be used for the 
camel-twitter. |  | String
+| **httpProxyUser** (proxy) | The http proxy user which can be used for the 
camel-twitter. |  | String
+| **httpProxyPassword** (proxy) | The http proxy password which can be used 
for the camel-twitter. |  | String
+| **httpProxyPort** (proxy) | The http proxy port which can be used for the 
camel-twitter. |  | int
+| **resolveProperty Placeholders** (advanced) | Whether the component should 
resolve property placeholders on itself when starting. Only properties which 
are of String type can use property placeholders. | true | boolean
+|=======================================================================
+// component options: END
+
+
+
+
+// endpoint options: START
+The Twitter Search endpoint is configured using URI syntax:
+
+    twitter-search:endpointId
+
+with the following path and query parameters:
+
+#### Path Parameters (1 parameters):
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|=======================================================================
+| Name | Description | Default | Type
+| **endpointId** | *Required* The endpoint ID (not used). |  | String
+|=======================================================================
+
+#### Query Parameters (43 parameters):
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|=======================================================================
+| Name | Description | Default | Type
+| **user** (common) | Username used for user timeline consumption direct 
message production etc. |  | String
+| **bridgeErrorHandler** (consumer) | Allows for bridging the consumer to the 
Camel routing Error Handler which mean any exceptions occurred while the 
consumer is trying to pickup incoming messages or the likes will now be 
processed as a message and handled by the routing Error Handler. By default the 
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions that will be logged at WARN or ERROR level and ignored. | false | 
boolean
+| **sendEmptyMessageWhenIdle** (consumer) | If the polling consumer did not 
poll any files you can enable this option to send an empty message (no body) 
instead. | false | boolean
+| **type** (consumer) | Endpoint type to use. Only streaming supports event 
type. | polling | EndpointType
+| **distanceMetric** (consumer) | Used by the non-stream geography search to 
search by radius using the configured metrics. The unit can either be mi for 
miles or km for kilometers. You need to configure all the following options: 
longitude latitude radius and distanceMetric. | km | String
+| **exceptionHandler** (consumer) | To let the consumer use a custom 
ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this 
options is not in use. By default the consumer will deal with exceptions that 
will be logged at WARN or ERROR level and ignored. |  | ExceptionHandler
+| **exchangePattern** (consumer) | Sets the exchange pattern when the consumer 
creates an exchange. |  | ExchangePattern
+| **latitude** (consumer) | Used by the non-stream geography search to search 
by latitude. You need to configure all the following options: longitude 
latitude radius and distanceMetric. |  | Double
+| **locations** (consumer) | Bounding boxes created by pairs of lat/lons. Can 
be used for streaming/filter. A pair is defined as latlon. And multiple paris 
can be separated by semi colon. |  | String
+| **longitude** (consumer) | Used by the non-stream geography search to search 
by longitude. You need to configure all the following options: longitude 
latitude radius and distanceMetric. |  | Double
+| **pollStrategy** (consumer) | A pluggable 
org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your 
custom implementation to control error handling usually occurred during the 
poll operation before an Exchange have been created and being routed in Camel. 
|  | PollingConsumerPoll Strategy
+| **radius** (consumer) | Used by the non-stream geography search to search by 
radius. You need to configure all the following options: longitude latitude 
radius and distanceMetric. |  | Double
+| **twitterStream** (consumer) | To use a custom instance of TwitterStream |  
| TwitterStream
+| **synchronous** (advanced) | Sets whether synchronous processing should be 
strictly used or Camel is allowed to use asynchronous processing (if 
supported). | false | boolean
+| **count** (filter) | Limiting number of results per page. |  | Integer
+| **filterOld** (filter) | Filter out old tweets that has previously been 
polled. This state is stored in memory only and based on last tweet id. | true 
| boolean
+| **keywords** (filter) | Can be used for search and streaming/filter. 
Multiple values can be separated with comma. |  | String
+| **lang** (filter) | The lang string ISO_639-1 which will be used for 
searching |  | String
+| **numberOfPages** (filter) | The number of pages result which you want 
camel-twitter to consume. | 1 | Integer
+| **sinceId** (filter) | The last tweet id which will be used for pulling the 
tweets. It is useful when the camel route is restarted after a long running. | 
1 | long
+| **userIds** (filter) | To filter by user ids for streaming/filter. Multiple 
values can be separated by comma. |  | String
+| **backoffErrorThreshold** (scheduler) | The number of subsequent error polls 
(failed due some error) that should happen before the backoffMultipler should 
kick-in. |  | int
+| **backoffIdleThreshold** (scheduler) | The number of subsequent idle polls 
that should happen before the backoffMultipler should kick-in. |  | int
+| **backoffMultiplier** (scheduler) | To let the scheduled polling consumer 
backoff if there has been a number of subsequent idles/errors in a row. The 
multiplier is then the number of polls that will be skipped before the next 
actual attempt is happening again. When this option is in use then 
backoffIdleThreshold and/or backoffErrorThreshold must also be configured. |  | 
int
+| **delay** (scheduler) | Milliseconds before the next poll. | 30000 | long
+| **greedy** (scheduler) | If greedy is enabled then the ScheduledPollConsumer 
will run immediately again if the previous run polled 1 or more messages. | 
false | boolean
+| **initialDelay** (scheduler) | Milliseconds before the first poll starts. 
You can also specify time values using units such as 60s (60 seconds) 5m30s (5 
minutes and 30 seconds) and 1h (1 hour). | 1000 | long
+| **runLoggingLevel** (scheduler) | The consumer logs a start/complete log 
line when it polls. This option allows you to configure the logging level for 
that. | TRACE | LoggingLevel
+| **scheduledExecutorService** (scheduler) | Allows for configuring a 
custom/shared thread pool to use for the consumer. By default each consumer has 
its own single threaded thread pool. |  | ScheduledExecutor Service
+| **scheduler** (scheduler) | To use a cron scheduler from either camel-spring 
or camel-quartz2 component | none | ScheduledPollConsumer Scheduler
+| **schedulerProperties** (scheduler) | To configure additional properties 
when using a custom scheduler or any of the Quartz2 Spring based scheduler. |  
| Map
+| **startScheduler** (scheduler) | Whether the scheduler should be auto 
started. | true | boolean
+| **timeUnit** (scheduler) | Time unit for initialDelay and delay options. | 
MILLISECONDS | TimeUnit
+| **useFixedDelay** (scheduler) | Controls if fixed delay or fixed rate is 
used. See ScheduledExecutorService in JDK for details. | true | boolean
+| **sortById** (sort) | Sorts by id so the oldest are first and newest last. | 
true | boolean
+| **httpProxyHost** (proxy) | The http proxy host which can be used for the 
camel-twitter. Can also be configured on the TwitterComponent level instead. |  
| String
+| **httpProxyPassword** (proxy) | The http proxy password which can be used 
for the camel-twitter. Can also be configured on the TwitterComponent level 
instead. |  | String
+| **httpProxyPort** (proxy) | The http proxy port which can be used for the 
camel-twitter. Can also be configured on the TwitterComponent level instead. |  
| Integer
+| **httpProxyUser** (proxy) | The http proxy user which can be used for the 
camel-twitter. Can also be configured on the TwitterComponent level instead. |  
| String
+| **accessToken** (security) | The access token. Can also be configured on the 
TwitterComponent level instead. |  | String
+| **accessTokenSecret** (security) | The access secret. Can also be configured 
on the TwitterComponent level instead. |  | String
+| **consumerKey** (security) | The consumer key. Can also be configured on the 
TwitterComponent level instead. |  | String
+| **consumerSecret** (security) | The consumer secret. Can also be configured 
on the TwitterComponent level instead. |  | String
+|=======================================================================
+// endpoint options: END

http://git-wip-us.apache.org/repos/asf/camel/blob/bb64dca0/components/camel-twitter/src/main/docs/twitter-streaming-component.adoc
----------------------------------------------------------------------
diff --git 
a/components/camel-twitter/src/main/docs/twitter-streaming-component.adoc 
b/components/camel-twitter/src/main/docs/twitter-streaming-component.adoc
new file mode 100644
index 0000000..f240c96
--- /dev/null
+++ b/components/camel-twitter/src/main/docs/twitter-streaming-component.adoc
@@ -0,0 +1,94 @@
+## Twitter Streaming Component
+
+*Available as of Camel version 2.10*
+
+The Twitter Streaming component consumes twitter statuses using Streaming API.
+
+// component options: START
+The Twitter Streaming component supports 9 options which are listed below.
+
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|=======================================================================
+| Name | Description | Default | Type
+| **accessToken** (security) | The access token |  | String
+| **accessTokenSecret** (security) | The access token secret |  | String
+| **consumerKey** (security) | The consumer key |  | String
+| **consumerSecret** (security) | The consumer secret |  | String
+| **httpProxyHost** (proxy) | The http proxy host which can be used for the 
camel-twitter. |  | String
+| **httpProxyUser** (proxy) | The http proxy user which can be used for the 
camel-twitter. |  | String
+| **httpProxyPassword** (proxy) | The http proxy password which can be used 
for the camel-twitter. |  | String
+| **httpProxyPort** (proxy) | The http proxy port which can be used for the 
camel-twitter. |  | int
+| **resolveProperty Placeholders** (advanced) | Whether the component should 
resolve property placeholders on itself when starting. Only properties which 
are of String type can use property placeholders. | true | boolean
+|=======================================================================
+// component options: END
+
+
+
+
+// endpoint options: START
+The Twitter Streaming endpoint is configured using URI syntax:
+
+    twitter-streaming:streamingType
+
+with the following path and query parameters:
+
+#### Path Parameters (1 parameters):
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|=======================================================================
+| Name | Description | Default | Type
+| **streamingType** | *Required* The streaming type to consume. |  | 
StreamingType
+|=======================================================================
+
+#### Query Parameters (43 parameters):
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|=======================================================================
+| Name | Description | Default | Type
+| **bridgeErrorHandler** (consumer) | Allows for bridging the consumer to the 
Camel routing Error Handler which mean any exceptions occurred while the 
consumer is trying to pickup incoming messages or the likes will now be 
processed as a message and handled by the routing Error Handler. By default the 
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions that will be logged at WARN or ERROR level and ignored. | false | 
boolean
+| **sendEmptyMessageWhenIdle** (consumer) | If the polling consumer did not 
poll any files you can enable this option to send an empty message (no body) 
instead. | false | boolean
+| **type** (consumer) | Endpoint type to use. Only streaming supports event 
type. | polling | EndpointType
+| **user** (consumer) | Username used for user timeline consumption direct 
message production etc. |  | String
+| **distanceMetric** (consumer) | Used by the non-stream geography search to 
search by radius using the configured metrics. The unit can either be mi for 
miles or km for kilometers. You need to configure all the following options: 
longitude latitude radius and distanceMetric. | km | String
+| **exceptionHandler** (consumer) | To let the consumer use a custom 
ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this 
options is not in use. By default the consumer will deal with exceptions that 
will be logged at WARN or ERROR level and ignored. |  | ExceptionHandler
+| **exchangePattern** (consumer) | Sets the exchange pattern when the consumer 
creates an exchange. |  | ExchangePattern
+| **latitude** (consumer) | Used by the non-stream geography search to search 
by latitude. You need to configure all the following options: longitude 
latitude radius and distanceMetric. |  | Double
+| **locations** (consumer) | Bounding boxes created by pairs of lat/lons. Can 
be used for streaming/filter. A pair is defined as latlon. And multiple paris 
can be separated by semi colon. |  | String
+| **longitude** (consumer) | Used by the non-stream geography search to search 
by longitude. You need to configure all the following options: longitude 
latitude radius and distanceMetric. |  | Double
+| **pollStrategy** (consumer) | A pluggable 
org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your 
custom implementation to control error handling usually occurred during the 
poll operation before an Exchange have been created and being routed in Camel. 
|  | PollingConsumerPoll Strategy
+| **radius** (consumer) | Used by the non-stream geography search to search by 
radius. You need to configure all the following options: longitude latitude 
radius and distanceMetric. |  | Double
+| **twitterStream** (consumer) | To use a custom instance of TwitterStream |  
| TwitterStream
+| **synchronous** (advanced) | Sets whether synchronous processing should be 
strictly used or Camel is allowed to use asynchronous processing (if 
supported). | false | boolean
+| **count** (filter) | Limiting number of results per page. |  | Integer
+| **filterOld** (filter) | Filter out old tweets that has previously been 
polled. This state is stored in memory only and based on last tweet id. | true 
| boolean
+| **keywords** (filter) | Can be used for search and streaming/filter. 
Multiple values can be separated with comma. |  | String
+| **lang** (filter) | The lang string ISO_639-1 which will be used for 
searching |  | String
+| **numberOfPages** (filter) | The number of pages result which you want 
camel-twitter to consume. | 1 | Integer
+| **sinceId** (filter) | The last tweet id which will be used for pulling the 
tweets. It is useful when the camel route is restarted after a long running. | 
1 | long
+| **userIds** (filter) | To filter by user ids for streaming/filter. Multiple 
values can be separated by comma. |  | String
+| **backoffErrorThreshold** (scheduler) | The number of subsequent error polls 
(failed due some error) that should happen before the backoffMultipler should 
kick-in. |  | int
+| **backoffIdleThreshold** (scheduler) | The number of subsequent idle polls 
that should happen before the backoffMultipler should kick-in. |  | int
+| **backoffMultiplier** (scheduler) | To let the scheduled polling consumer 
backoff if there has been a number of subsequent idles/errors in a row. The 
multiplier is then the number of polls that will be skipped before the next 
actual attempt is happening again. When this option is in use then 
backoffIdleThreshold and/or backoffErrorThreshold must also be configured. |  | 
int
+| **delay** (scheduler) | Milliseconds before the next poll. | 30000 | long
+| **greedy** (scheduler) | If greedy is enabled then the ScheduledPollConsumer 
will run immediately again if the previous run polled 1 or more messages. | 
false | boolean
+| **initialDelay** (scheduler) | Milliseconds before the first poll starts. 
You can also specify time values using units such as 60s (60 seconds) 5m30s (5 
minutes and 30 seconds) and 1h (1 hour). | 1000 | long
+| **runLoggingLevel** (scheduler) | The consumer logs a start/complete log 
line when it polls. This option allows you to configure the logging level for 
that. | TRACE | LoggingLevel
+| **scheduledExecutorService** (scheduler) | Allows for configuring a 
custom/shared thread pool to use for the consumer. By default each consumer has 
its own single threaded thread pool. |  | ScheduledExecutor Service
+| **scheduler** (scheduler) | To use a cron scheduler from either camel-spring 
or camel-quartz2 component | none | ScheduledPollConsumer Scheduler
+| **schedulerProperties** (scheduler) | To configure additional properties 
when using a custom scheduler or any of the Quartz2 Spring based scheduler. |  
| Map
+| **startScheduler** (scheduler) | Whether the scheduler should be auto 
started. | true | boolean
+| **timeUnit** (scheduler) | Time unit for initialDelay and delay options. | 
MILLISECONDS | TimeUnit
+| **useFixedDelay** (scheduler) | Controls if fixed delay or fixed rate is 
used. See ScheduledExecutorService in JDK for details. | true | boolean
+| **sortById** (sort) | Sorts by id so the oldest are first and newest last. | 
true | boolean
+| **httpProxyHost** (proxy) | The http proxy host which can be used for the 
camel-twitter. Can also be configured on the TwitterComponent level instead. |  
| String
+| **httpProxyPassword** (proxy) | The http proxy password which can be used 
for the camel-twitter. Can also be configured on the TwitterComponent level 
instead. |  | String
+| **httpProxyPort** (proxy) | The http proxy port which can be used for the 
camel-twitter. Can also be configured on the TwitterComponent level instead. |  
| Integer
+| **httpProxyUser** (proxy) | The http proxy user which can be used for the 
camel-twitter. Can also be configured on the TwitterComponent level instead. |  
| String
+| **accessToken** (security) | The access token. Can also be configured on the 
TwitterComponent level instead. |  | String
+| **accessTokenSecret** (security) | The access secret. Can also be configured 
on the TwitterComponent level instead. |  | String
+| **consumerKey** (security) | The consumer key. Can also be configured on the 
TwitterComponent level instead. |  | String
+| **consumerSecret** (security) | The consumer secret. Can also be configured 
on the TwitterComponent level instead. |  | String
+|=======================================================================
+// endpoint options: END

http://git-wip-us.apache.org/repos/asf/camel/blob/bb64dca0/components/camel-twitter/src/main/docs/twitter-timeline-component.adoc
----------------------------------------------------------------------
diff --git 
a/components/camel-twitter/src/main/docs/twitter-timeline-component.adoc 
b/components/camel-twitter/src/main/docs/twitter-timeline-component.adoc
new file mode 100644
index 0000000..c16e970
--- /dev/null
+++ b/components/camel-twitter/src/main/docs/twitter-timeline-component.adoc
@@ -0,0 +1,95 @@
+## Twitter Timeline Component
+
+*Available as of Camel version 2.10*
+
+The Twitter Timeline component consumes twitter timeline or update the status 
of specific user.
+
+// component options: START
+The Twitter Timeline component supports 9 options which are listed below.
+
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|=======================================================================
+| Name | Description | Default | Type
+| **accessToken** (security) | The access token |  | String
+| **accessTokenSecret** (security) | The access token secret |  | String
+| **consumerKey** (security) | The consumer key |  | String
+| **consumerSecret** (security) | The consumer secret |  | String
+| **httpProxyHost** (proxy) | The http proxy host which can be used for the 
camel-twitter. |  | String
+| **httpProxyUser** (proxy) | The http proxy user which can be used for the 
camel-twitter. |  | String
+| **httpProxyPassword** (proxy) | The http proxy password which can be used 
for the camel-twitter. |  | String
+| **httpProxyPort** (proxy) | The http proxy port which can be used for the 
camel-twitter. |  | int
+| **resolveProperty Placeholders** (advanced) | Whether the component should 
resolve property placeholders on itself when starting. Only properties which 
are of String type can use property placeholders. | true | boolean
+|=======================================================================
+// component options: END
+
+
+
+
+// endpoint options: START
+The Twitter Timeline endpoint is configured using URI syntax:
+
+    twitter-timeline:timelineType
+
+with the following path and query parameters:
+
+#### Path Parameters (1 parameters):
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|=======================================================================
+| Name | Description | Default | Type
+| **timelineType** | *Required* The timeline type to produce/consume. |  | 
TimelineType
+|=======================================================================
+
+#### Query Parameters (43 parameters):
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|=======================================================================
+| Name | Description | Default | Type
+| **user** (common) | Username used for user timeline consumption direct 
message production etc. |  | String
+| **bridgeErrorHandler** (consumer) | Allows for bridging the consumer to the 
Camel routing Error Handler which mean any exceptions occurred while the 
consumer is trying to pickup incoming messages or the likes will now be 
processed as a message and handled by the routing Error Handler. By default the 
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions that will be logged at WARN or ERROR level and ignored. | false | 
boolean
+| **sendEmptyMessageWhenIdle** (consumer) | If the polling consumer did not 
poll any files you can enable this option to send an empty message (no body) 
instead. | false | boolean
+| **type** (consumer) | Endpoint type to use. Only streaming supports event 
type. | polling | EndpointType
+| **distanceMetric** (consumer) | Used by the non-stream geography search to 
search by radius using the configured metrics. The unit can either be mi for 
miles or km for kilometers. You need to configure all the following options: 
longitude latitude radius and distanceMetric. | km | String
+| **exceptionHandler** (consumer) | To let the consumer use a custom 
ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this 
options is not in use. By default the consumer will deal with exceptions that 
will be logged at WARN or ERROR level and ignored. |  | ExceptionHandler
+| **exchangePattern** (consumer) | Sets the exchange pattern when the consumer 
creates an exchange. |  | ExchangePattern
+| **latitude** (consumer) | Used by the non-stream geography search to search 
by latitude. You need to configure all the following options: longitude 
latitude radius and distanceMetric. |  | Double
+| **locations** (consumer) | Bounding boxes created by pairs of lat/lons. Can 
be used for streaming/filter. A pair is defined as latlon. And multiple paris 
can be separated by semi colon. |  | String
+| **longitude** (consumer) | Used by the non-stream geography search to search 
by longitude. You need to configure all the following options: longitude 
latitude radius and distanceMetric. |  | Double
+| **pollStrategy** (consumer) | A pluggable 
org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your 
custom implementation to control error handling usually occurred during the 
poll operation before an Exchange have been created and being routed in Camel. 
|  | PollingConsumerPoll Strategy
+| **radius** (consumer) | Used by the non-stream geography search to search by 
radius. You need to configure all the following options: longitude latitude 
radius and distanceMetric. |  | Double
+| **twitterStream** (consumer) | To use a custom instance of TwitterStream |  
| TwitterStream
+| **synchronous** (advanced) | Sets whether synchronous processing should be 
strictly used or Camel is allowed to use asynchronous processing (if 
supported). | false | boolean
+| **count** (filter) | Limiting number of results per page. |  | Integer
+| **filterOld** (filter) | Filter out old tweets that has previously been 
polled. This state is stored in memory only and based on last tweet id. | true 
| boolean
+| **keywords** (filter) | Can be used for search and streaming/filter. 
Multiple values can be separated with comma. |  | String
+| **lang** (filter) | The lang string ISO_639-1 which will be used for 
searching |  | String
+| **numberOfPages** (filter) | The number of pages result which you want 
camel-twitter to consume. | 1 | Integer
+| **sinceId** (filter) | The last tweet id which will be used for pulling the 
tweets. It is useful when the camel route is restarted after a long running. | 
1 | long
+| **userIds** (filter) | To filter by user ids for streaming/filter. Multiple 
values can be separated by comma. |  | String
+| **backoffErrorThreshold** (scheduler) | The number of subsequent error polls 
(failed due some error) that should happen before the backoffMultipler should 
kick-in. |  | int
+| **backoffIdleThreshold** (scheduler) | The number of subsequent idle polls 
that should happen before the backoffMultipler should kick-in. |  | int
+| **backoffMultiplier** (scheduler) | To let the scheduled polling consumer 
backoff if there has been a number of subsequent idles/errors in a row. The 
multiplier is then the number of polls that will be skipped before the next 
actual attempt is happening again. When this option is in use then 
backoffIdleThreshold and/or backoffErrorThreshold must also be configured. |  | 
int
+| **delay** (scheduler) | Milliseconds before the next poll. | 30000 | long
+| **greedy** (scheduler) | If greedy is enabled then the ScheduledPollConsumer 
will run immediately again if the previous run polled 1 or more messages. | 
false | boolean
+| **initialDelay** (scheduler) | Milliseconds before the first poll starts. 
You can also specify time values using units such as 60s (60 seconds) 5m30s (5 
minutes and 30 seconds) and 1h (1 hour). | 1000 | long
+| **runLoggingLevel** (scheduler) | The consumer logs a start/complete log 
line when it polls. This option allows you to configure the logging level for 
that. | TRACE | LoggingLevel
+| **scheduledExecutorService** (scheduler) | Allows for configuring a 
custom/shared thread pool to use for the consumer. By default each consumer has 
its own single threaded thread pool. |  | ScheduledExecutor Service
+| **scheduler** (scheduler) | To use a cron scheduler from either camel-spring 
or camel-quartz2 component | none | ScheduledPollConsumer Scheduler
+| **schedulerProperties** (scheduler) | To configure additional properties 
when using a custom scheduler or any of the Quartz2 Spring based scheduler. |  
| Map
+| **startScheduler** (scheduler) | Whether the scheduler should be auto 
started. | true | boolean
+| **timeUnit** (scheduler) | Time unit for initialDelay and delay options. | 
MILLISECONDS | TimeUnit
+| **useFixedDelay** (scheduler) | Controls if fixed delay or fixed rate is 
used. See ScheduledExecutorService in JDK for details. | true | boolean
+| **sortById** (sort) | Sorts by id so the oldest are first and newest last. | 
true | boolean
+| **httpProxyHost** (proxy) | The http proxy host which can be used for the 
camel-twitter. Can also be configured on the TwitterComponent level instead. |  
| String
+| **httpProxyPassword** (proxy) | The http proxy password which can be used 
for the camel-twitter. Can also be configured on the TwitterComponent level 
instead. |  | String
+| **httpProxyPort** (proxy) | The http proxy port which can be used for the 
camel-twitter. Can also be configured on the TwitterComponent level instead. |  
| Integer
+| **httpProxyUser** (proxy) | The http proxy user which can be used for the 
camel-twitter. Can also be configured on the TwitterComponent level instead. |  
| String
+| **accessToken** (security) | The access token. Can also be configured on the 
TwitterComponent level instead. |  | String
+| **accessTokenSecret** (security) | The access secret. Can also be configured 
on the TwitterComponent level instead. |  | String
+| **consumerKey** (security) | The consumer key. Can also be configured on the 
TwitterComponent level instead. |  | String
+| **consumerSecret** (security) | The consumer secret. Can also be configured 
on the TwitterComponent level instead. |  | String
+|=======================================================================
+// endpoint options: END
+

http://git-wip-us.apache.org/repos/asf/camel/blob/bb64dca0/components/camel-twitter/src/main/docs/twitter.adoc
----------------------------------------------------------------------
diff --git a/components/camel-twitter/src/main/docs/twitter.adoc 
b/components/camel-twitter/src/main/docs/twitter.adoc
new file mode 100644
index 0000000..e9fd24b
--- /dev/null
+++ b/components/camel-twitter/src/main/docs/twitter.adoc
@@ -0,0 +1,154 @@
+## Twitter Components 
+
+*Available as of Camel version 2.10*
+
+The camel-twitter consists of 4 components:
+
+* link:twitter-directmessage-component.html[Twitter Direct Message]
+* link:twitter-search-component.html[Twitter Search]
+* link:twitter-streaming-component.html[Twitter Streaming]
+* link:twitter-timeline-component.html[Twitter Timeline]
+
+The Twitter components enable the most useful features of the Twitter
+API by encapsulating http://twitter4j.org/[Twitter4J]. It allows direct,
+polling, or event-driven consumption of timelines, users, trends, and
+direct messages. Also, it supports producing messages as status updates
+or direct messages.
+
+Twitter now requires the use of OAuth for all client application
+authentication. In order to use camel-twitter with your account, you'll
+need to create a new application within Twitter at
+https://dev.twitter.com/apps/new and grant the application access to
+your account. Finally, generate your access token and secret.
+
+Maven users will need to add the following dependency to their pom.xml
+for this component:
+
+[source,xml]
+----
+<dependency>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>camel-twitter</artifactId>
+    <version>${camel-version}</version>
+</dependency>
+----
+
+### Consumer endpoints
+
+Rather than the endpoints returning a List through one single route
+exchange, camel-twitter creates one route exchange per returned object.
+As an example, if "timeline/home" results in five statuses, the route
+will be executed five times (one for each Status).
+
+[width="100%",cols="10%,10%,10%,70%",options="header",]
+|=======================================================================
+|Endpoint |Context |Body Type |Notice
+|link:twitter-directmessage-component.html[twitter-directmessage] |direct, 
polling |twitter4j.DirectMessage | 
+
+|link:twitter-search-component.html[twitter-search] |direct, polling 
|twitter4j.Status | 
+
+|link:twitter-streaming-component.html[twitter-streaming] |event, polling 
|twitter4j.Status | 
+
+|link:twitter-timeline-component.html[twitter-timeline] |direct, polling 
|twitter4j.Status | 
+|=======================================================================
+
+### Producer endpoints
+
+[width="100%",cols="10%,10%,80%",options="header",]
+|==============================
+|Endpoint |Body Type |Notice
+|link:twitter-directmessage-component.html[twitter-directmessage] |String |
+|link:twitter-search-component.html[twitter-search] |List<twitter4j.Status> |
+|link:twitter-timeline-component.html[twitter-timeline] |String |Only 'user' 
timelineType is supported for producer
+|==============================
+
+### Message headers
+
+[width="100%",cols="20%,80%",options="header",]
+|=======================================================================
+|Name |Description
+|`CamelTwitterKeywords` |This header is used by the search producer to
+change the search key words dynamically.
+
+|`CamelTwitterSearchLanguage` |*Camel 2.11.0:* This header can override
+the option of `lang` which set the search language for the search
+endpoint dynamically
+
+|`CamelTwitterCount` |*Camel 2.11.0* This header can override the option
+of `count` which sets the max twitters that will be returned.
+
+|`CamelTwitterNumberOfPages` |*Camel 2.11.0* This header can override
+the option of `numberOfPages` which sets how many pages we want to
+twitter returns.
+|=======================================================================
+
+### Message body
+
+All message bodies utilize objects provided by the Twitter4J API.
+
+### Use cases
+
+NOTE: *API Rate Limits:* Twitter REST APIs encapsulated by 
http://twitter4j.org/[Twitter4J] are
+subjected to https://dev.twitter.com/rest/public/rate-limiting[API Rate
+Limiting]. You can find the per method limits in the
+https://dev.twitter.com/rest/public/rate-limits[API Rate Limits]
+documentation. Note that endpoints/resources not listed in that page are
+default to 15 requests per allotted user per window.
+
+#### To create a status update within your Twitter profile, send this producer 
a String body:
+
+[source,java]
+----
+from("direct:foo")
+  
.to("twitter-timeline://user?consumerKey=[s]&consumerSecret=[s]&accessToken=[s]&accessTokenSecret=[s]);
+----
+
+#### To poll, every 60 sec., all statuses on your home timeline:
+
+[source,java]
+----
+from("twitter-timeline://home?type=polling&delay=60&consumerKey=[s]&consumerSecret=[s]&accessToken=[s]&accessTokenSecret=[s]")
+  .to("bean:blah");
+----
+
+#### To search for all statuses with the keyword 'camel' only once:
+
+[source,java]
+----
+from("twitter-search://foo?type=polling&keywords=camel&consumerKey=[s]&consumerSecret=[s]&accessToken=[s]&accessTokenSecret=[s]")
+  .to("bean:blah");
+----
+
+#### Searching using a producer with static keywords:
+
+[source,java]
+----
+from("direct:foo")
+  
.to("twitter-search://foo?keywords=camel&consumerKey=[s]&consumerSecret=[s]&accessToken=[s]&accessTokenSecret=[s]");
+----
+
+#### Searching using a producer with dynamic keywords from header:
+
+In the `bar` header we have the keywords we want to search, so we can
+assign this value to the `CamelTwitterKeywords` header:
+
+[source,java]
+----
+from("direct:foo")
+  .setHeader("CamelTwitterKeywords", header("bar"))
+  
.to("twitter-search://foo?consumerKey=[s]&consumerSecret=[s]&accessToken=[s]&accessTokenSecret=[s]");
+----
+
+### Example
+
+See also the link:twitter-websocket-example.html[Twitter Websocket
+Example].
+
+### See Also
+
+* link:configuring-camel.html[Configuring Camel]
+* link:component.html[Component]
+* link:endpoint.html[Endpoint]
+* link:getting-started.html[Getting Started]
+
+* link:twitter-websocket-example.html[Twitter Websocket Example]

http://git-wip-us.apache.org/repos/asf/camel/blob/bb64dca0/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/AbstractTwitterComponent.java
----------------------------------------------------------------------
diff --git 
a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/AbstractTwitterComponent.java
 
b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/AbstractTwitterComponent.java
new file mode 100644
index 0000000..d86f603
--- /dev/null
+++ 
b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/AbstractTwitterComponent.java
@@ -0,0 +1,165 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.twitter;
+
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentVerifier;
+import org.apache.camel.Endpoint;
+import org.apache.camel.VerifiableComponent;
+import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.spi.Metadata;
+
+/**
+ * Base Twitter component
+ */
+public abstract class AbstractTwitterComponent extends DefaultComponent 
implements VerifiableComponent {
+
+    @Metadata(label = "security", secret = true)
+    private String consumerKey;
+    @Metadata(label = "security", secret = true)
+    private String consumerSecret;
+    @Metadata(label = "security", secret = true)
+    private String accessToken;
+    @Metadata(label = "security", secret = true)
+    private String accessTokenSecret;
+    @Metadata(label = "proxy")
+    private String httpProxyHost;
+    @Metadata(label = "proxy")
+    private String httpProxyUser;
+    @Metadata(label = "proxy")
+    private String httpProxyPassword;
+    @Metadata(label = "proxy")
+    private Integer httpProxyPort;
+
+    public AbstractTwitterComponent() {
+    }
+
+    public AbstractTwitterComponent(CamelContext context) {
+        super(context);
+    }
+
+    protected Endpoint createEndpoint(String uri, String remaining, 
Map<String, Object> parameters) throws Exception {
+        TwitterConfiguration properties = new TwitterConfiguration();
+        properties.setConsumerKey(consumerKey);
+        properties.setConsumerSecret(consumerSecret);
+        properties.setAccessToken(accessToken);
+        properties.setAccessTokenSecret(accessTokenSecret);
+        properties.setHttpProxyHost(httpProxyHost);
+        properties.setHttpProxyUser(httpProxyUser);
+        properties.setHttpProxyPassword(httpProxyPassword);
+        if (httpProxyPort != null) {
+            properties.setHttpProxyPort(httpProxyPort);
+        }
+
+        // and then override from parameters
+        setProperties(properties, parameters);
+        return doCreateEndpoint(properties, uri, remaining, parameters);
+    }
+
+    protected abstract Endpoint doCreateEndpoint(TwitterConfiguration 
properties, String uri, String remaining, Map<String, Object> parameters) 
throws Exception;
+
+    public String getAccessToken() {
+        return accessToken;
+    }
+
+    /**
+     * The access token
+     */
+    public void setAccessToken(String accessToken) {
+        this.accessToken = accessToken;
+    }
+
+    public String getAccessTokenSecret() {
+        return accessTokenSecret;
+    }
+
+    /**
+     * The access token secret
+     */
+    public void setAccessTokenSecret(String accessTokenSecret) {
+        this.accessTokenSecret = accessTokenSecret;
+    }
+
+    public String getConsumerKey() {
+        return consumerKey;
+    }
+
+    /**
+     * The consumer key
+     */
+    public void setConsumerKey(String consumerKey) {
+        this.consumerKey = consumerKey;
+    }
+
+    public String getConsumerSecret() {
+        return consumerSecret;
+    }
+
+    /**
+     * The consumer secret
+     */
+    public void setConsumerSecret(String consumerSecret) {
+        this.consumerSecret = consumerSecret;
+    }
+
+    /**
+     * The http proxy host which can be used for the camel-twitter.
+     */
+    public void setHttpProxyHost(String httpProxyHost) {
+        this.httpProxyHost = httpProxyHost;
+    }
+
+    public String getHttpProxyHost() {
+        return httpProxyHost;
+    }
+
+    /**
+     * The http proxy user which can be used for the camel-twitter.
+     */
+    public void setHttpProxyUser(String httpProxyUser) {
+        this.httpProxyUser = httpProxyUser;
+    }
+
+    public String getHttpProxyUser() {
+        return httpProxyUser;
+    }
+
+    /**
+     * The http proxy password which can be used for the camel-twitter.
+     */
+    public void setHttpProxyPassword(String httpProxyPassword) {
+        this.httpProxyPassword = httpProxyPassword;
+    }
+
+    public String getHttpProxyPassword() {
+        return httpProxyPassword;
+    }
+
+    /**
+     * The http proxy port which can be used for the camel-twitter.
+     */
+    public void setHttpProxyPort(int httpProxyPort) {
+        this.httpProxyPort = httpProxyPort;
+    }
+
+    public Integer getHttpProxyPort() {
+        return httpProxyPort;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/bb64dca0/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/AbstractTwitterEndpoint.java
----------------------------------------------------------------------
diff --git 
a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/AbstractTwitterEndpoint.java
 
b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/AbstractTwitterEndpoint.java
new file mode 100644
index 0000000..c9c047c
--- /dev/null
+++ 
b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/AbstractTwitterEndpoint.java
@@ -0,0 +1,153 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.twitter;
+
+import org.apache.camel.Consumer;
+import org.apache.camel.Endpoint;
+import org.apache.camel.api.management.ManagedAttribute;
+import org.apache.camel.component.twitter.consumer.TwitterConsumerPolling;
+import org.apache.camel.component.twitter.data.EndpointType;
+import org.apache.camel.impl.DefaultPollingEndpoint;
+import org.apache.camel.spi.UriParam;
+
+/**
+ * The base Twitter Endpoint.
+ */
+public abstract class AbstractTwitterEndpoint extends DefaultPollingEndpoint 
implements TwitterEndpoint {
+
+    @UriParam(optionalPrefix = "consumer.", defaultValue = "" + 
TwitterConsumerPolling.DEFAULT_CONSUMER_DELAY, label = "consumer,scheduler",
+        description = "Milliseconds before the next poll.")
+    private long delay = TwitterConsumerPolling.DEFAULT_CONSUMER_DELAY;
+
+    @UriParam
+    private TwitterConfiguration properties;
+
+    public AbstractTwitterEndpoint(String uri, AbstractTwitterComponent 
component, TwitterConfiguration properties) {
+        super(uri, component);
+        this.properties = properties;
+    }
+
+    @Override
+    protected void doStop() throws Exception {
+        super.doStop();
+        if (properties.getType() == EndpointType.EVENT && 
properties.getTwitterStream() != null) {
+            properties.getTwitterStream().shutdown();
+        }
+    }
+
+    public void configureConsumer(Consumer consumer) throws Exception {
+        super.configureConsumer(consumer);
+    }
+
+    @ManagedAttribute
+    public boolean isSingleton() {
+        return true;
+    }
+
+    public TwitterConfiguration getProperties() {
+        return properties;
+    }
+
+    public void setProperties(TwitterConfiguration properties) {
+        this.properties = properties;
+    }
+
+    @ManagedAttribute
+    public String getKeywords() {
+        return getProperties().getKeywords();
+    }
+
+    @ManagedAttribute
+    public void setKeywords(String keywords) {
+        getProperties().setKeywords(keywords);
+    }
+
+    @ManagedAttribute
+    public String getLocations() {
+        return getProperties().getLocations();
+    }
+
+    @ManagedAttribute
+    public void setLocations(String locations) {
+        getProperties().setLocations(locations);
+    }
+
+    @ManagedAttribute
+    public void setFilterOld(boolean filterOld) {
+        getProperties().setFilterOld(filterOld);
+    }
+
+    @ManagedAttribute
+    public boolean isFilterOld() {
+        return getProperties().isFilterOld();
+    }
+
+    @ManagedAttribute
+    public void setSinceId(long sinceId) {
+        getProperties().setSinceId(sinceId);
+    }
+
+    @ManagedAttribute
+    public long getSinceId() {
+        return getProperties().getSinceId();
+    }
+
+    @ManagedAttribute
+    public void setLang(String lang) {
+        getProperties().setLang(lang);
+    }
+
+    @ManagedAttribute
+    public String getLang() {
+        return getProperties().getLang();
+    }
+
+    @ManagedAttribute
+    public void setCount(Integer count) {
+        getProperties().setCount(count);
+    }
+
+    @ManagedAttribute
+    public Integer getCount() {
+        return getProperties().getCount();
+    }
+
+    @ManagedAttribute
+    public void setNumberOfPages(Integer numberOfPages) {
+        getProperties().setNumberOfPages(numberOfPages);
+    }
+
+    @ManagedAttribute
+    public Integer getNumberOfPages() {
+        return getProperties().getNumberOfPages();
+    }
+
+    @Override
+    public EndpointType getEndpointType() {
+        return getProperties().getType();
+    }
+
+    /**
+     * Milliseconds before the next poll.
+     */
+    @Override
+    public void setDelay(long delay) {
+        super.setDelay(delay);
+        this.delay = delay;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/bb64dca0/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/DefaultTwitterComponentVerifier.java
----------------------------------------------------------------------
diff --git 
a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/DefaultTwitterComponentVerifier.java
 
b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/DefaultTwitterComponentVerifier.java
new file mode 100644
index 0000000..cdc1d6e
--- /dev/null
+++ 
b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/DefaultTwitterComponentVerifier.java
@@ -0,0 +1,95 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.twitter;
+
+import java.util.Map;
+
+import org.apache.camel.ComponentVerifier;
+import org.apache.camel.impl.verifier.DefaultComponentVerifier;
+import org.apache.camel.impl.verifier.ResultBuilder;
+import org.apache.camel.impl.verifier.ResultErrorBuilder;
+import org.apache.camel.impl.verifier.ResultErrorHelper;
+import twitter4j.Twitter;
+import twitter4j.TwitterException;
+
+public class DefaultTwitterComponentVerifier extends DefaultComponentVerifier {
+
+    public DefaultTwitterComponentVerifier(AbstractTwitterComponent component) 
{
+        super("twitter", component.getCamelContext());
+    }
+
+    public DefaultTwitterComponentVerifier(AbstractTwitterComponent component, 
String scheme) {
+        super(scheme, component.getCamelContext());
+    }
+
+    // *********************************
+    // Parameters validation
+    // *********************************
+
+    @Override
+    protected Result verifyParameters(Map<String, Object> parameters) {
+        ResultBuilder builder = 
ResultBuilder.withStatusAndScope(Result.Status.OK, Scope.PARAMETERS)
+            .error(ResultErrorHelper.requiresOption("accessToken", parameters))
+            .error(ResultErrorHelper.requiresOption("accessTokenSecret", 
parameters))
+            .error(ResultErrorHelper.requiresOption("consumerKey", parameters))
+            .error(ResultErrorHelper.requiresOption("consumerSecret", 
parameters));
+
+        // Validate using the catalog
+        super.verifyParametersAgainstCatalog(builder, parameters);
+
+        return builder.build();
+    }
+
+    // *********************************
+    // Connectivity validation
+    // *********************************
+
+    @Override
+    protected Result verifyConnectivity(Map<String, Object> parameters) {
+        return ResultBuilder.withStatusAndScope(Result.Status.OK, 
Scope.CONNECTIVITY)
+            .error(parameters, this::verifyCredentials)
+            .build();
+    }
+
+    private void verifyCredentials(ResultBuilder builder, Map<String, Object> 
parameters) throws Exception {
+        try {
+            TwitterConfiguration configuration = setProperties(new 
TwitterConfiguration(), parameters);
+            Twitter twitter = configuration.getTwitter();
+
+            twitter.verifyCredentials();
+        } catch (TwitterException e) {
+            // verifyCredentials throws TwitterException when Twitter service 
or
+            // network is unavailable or if supplied credential is wrong
+            ResultErrorBuilder errorBuilder = 
ResultErrorBuilder.withCodeAndDescription(VerificationError.StandardCode.AUTHENTICATION,
 e.getErrorMessage())
+                .detail("twitter_error_code", e.getErrorCode())
+                .detail("twitter_status_code", e.getStatusCode())
+                .detail("twitter_exception_code", e.getExceptionCode())
+                .detail("twitter_exception_message", e.getMessage())
+                .detail("twitter_exception_caused-by-network-issue", 
e.isCausedByNetworkIssue())
+                
.detail(ComponentVerifier.VerificationError.ExceptionAttribute.EXCEPTION_CLASS, 
e.getClass().getName())
+                
.detail(ComponentVerifier.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE,
 e);
+
+            // For a complete list of error codes see:
+            //   https://dev.twitter.com/overview/api/response-codes
+            if (e.getErrorCode() == 89) {
+                errorBuilder.parameterKey("accessToken");
+            }
+
+            builder.error(errorBuilder.build());
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/bb64dca0/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java
----------------------------------------------------------------------
diff --git 
a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java
 
b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java
index 3672501..092fe2f 100644
--- 
a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java
+++ 
b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java
@@ -22,31 +22,28 @@ import org.apache.camel.CamelContext;
 import org.apache.camel.ComponentVerifier;
 import org.apache.camel.Endpoint;
 import org.apache.camel.VerifiableComponent;
+import org.apache.camel.component.twitter.data.ConsumerType;
+import org.apache.camel.component.twitter.data.EndpointType;
 import org.apache.camel.impl.DefaultComponent;
 import org.apache.camel.spi.Metadata;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Twitter component
+ * 
+ * @deprecated Use
+ * {@link 
org.apache.camel.component.twitter.directmessage.TwitterDirectMessageComponent},
+ * {@link org.apache.camel.component.twitter.search.TwitterSearchComponent},
+ * {@link 
org.apache.camel.component.twitter.streaming..TwitterStreamingComponent} or
+ * {@link org.apache.camel.component.twitter.timeline.TwitterTimelineComponent}
+ * instead.
  */
+@Deprecated
 @Metadata(label = "verifiers", enums = "parameters,connectivity")
-public class TwitterComponent extends DefaultComponent implements 
VerifiableComponent {
+public class TwitterComponent extends AbstractTwitterComponent {
 
-    @Metadata(label = "security", secret = true)
-    private String consumerKey;
-    @Metadata(label = "security", secret = true)
-    private String consumerSecret;
-    @Metadata(label = "security", secret = true)
-    private String accessToken;
-    @Metadata(label = "security", secret = true)
-    private String accessTokenSecret;
-    @Metadata(label = "proxy")
-    private String httpProxyHost;
-    @Metadata(label = "proxy")
-    private String httpProxyUser;
-    @Metadata(label = "proxy")
-    private String httpProxyPassword;
-    @Metadata(label = "proxy")
-    private Integer httpProxyPort;
+    private static final Logger LOG = 
LoggerFactory.getLogger(TwitterComponent.class);
 
     public TwitterComponent() {
     }
@@ -55,24 +52,9 @@ public class TwitterComponent extends DefaultComponent 
implements VerifiableComp
         super(context);
     }
 
-    protected Endpoint createEndpoint(String uri, String remaining, 
Map<String, Object> parameters) throws Exception {
-
-        TwitterConfiguration properties = new TwitterConfiguration();
-
-        // set options from component
-        properties.setConsumerKey(consumerKey);
-        properties.setConsumerSecret(consumerSecret);
-        properties.setAccessToken(accessToken);
-        properties.setAccessTokenSecret(accessTokenSecret);
-        properties.setHttpProxyHost(httpProxyHost);
-        properties.setHttpProxyUser(httpProxyUser);
-        properties.setHttpProxyPassword(httpProxyPassword);
-        if (httpProxyPort != null) {
-            properties.setHttpProxyPort(httpProxyPort);
-        }
-
-        // and then override from parameters
-        setProperties(properties, parameters);
+    protected Endpoint doCreateEndpoint(TwitterConfiguration properties, 
String uri, String remaining, Map<String, Object> parameters) throws Exception {
+        String[] tokens = remaining.split("/");
+        LOG.warn("The scheme syntax 'twitter:{}' has been deprecated. Use 
'twitter-{}' instead.", tokens[0], tokens[0]);
 
         TwitterEndpoint endpoint;
 
@@ -90,98 +72,10 @@ public class TwitterComponent extends DefaultComponent 
implements VerifiableComp
         return endpoint;
     }
 
-    public String getAccessToken() {
-        return accessToken;
-    }
-
-    /**
-     * The access token
-     */
-    public void setAccessToken(String accessToken) {
-        this.accessToken = accessToken;
-    }
-
-    public String getAccessTokenSecret() {
-        return accessTokenSecret;
-    }
-
-    /**
-     * The access token secret
-     */
-    public void setAccessTokenSecret(String accessTokenSecret) {
-        this.accessTokenSecret = accessTokenSecret;
-    }
-
-    public String getConsumerKey() {
-        return consumerKey;
-    }
-
-    /**
-     * The consumer key
-     */
-    public void setConsumerKey(String consumerKey) {
-        this.consumerKey = consumerKey;
-    }
-
-    public String getConsumerSecret() {
-        return consumerSecret;
-    }
-
-    /**
-     * The consumer secret
-     */
-    public void setConsumerSecret(String consumerSecret) {
-        this.consumerSecret = consumerSecret;
-    }
-
-    /**
-     * The http proxy host which can be used for the camel-twitter.
-     */
-    public void setHttpProxyHost(String httpProxyHost) {
-        this.httpProxyHost = httpProxyHost;
-    }
-
-    public String getHttpProxyHost() {
-        return httpProxyHost;
-    }
-
-    /**
-     * The http proxy user which can be used for the camel-twitter.
-     */
-    public void setHttpProxyUser(String httpProxyUser) {
-        this.httpProxyUser = httpProxyUser;
-    }
-
-    public String getHttpProxyUser() {
-        return httpProxyUser;
-    }
-
-    /**
-     * The http proxy password which can be used for the camel-twitter.
-     */
-    public void setHttpProxyPassword(String httpProxyPassword) {
-        this.httpProxyPassword = httpProxyPassword;
-    }
-
-    public String getHttpProxyPassword() {
-        return httpProxyPassword;
-    }
-
-    /**
-     * The http proxy port which can be used for the camel-twitter.
-     */
-    public void setHttpProxyPort(int httpProxyPort) {
-        this.httpProxyPort = httpProxyPort;
-    }
-
-    public int getHttpProxyPort() {
-        return httpProxyPort;
-    }
-
     /**
      * Get a verifier for the twitter component.
      */
     public ComponentVerifier getVerifier() {
-        return new TwitterComponentVerifier(this);
+        return new DefaultTwitterComponentVerifier(this);
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/bb64dca0/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponentVerifier.java
----------------------------------------------------------------------
diff --git 
a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponentVerifier.java
 
b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponentVerifier.java
deleted file mode 100644
index bd2d761..0000000
--- 
a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponentVerifier.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.twitter;
-
-import java.util.Map;
-
-import org.apache.camel.ComponentVerifier;
-import org.apache.camel.impl.verifier.DefaultComponentVerifier;
-import org.apache.camel.impl.verifier.ResultBuilder;
-import org.apache.camel.impl.verifier.ResultErrorBuilder;
-import org.apache.camel.impl.verifier.ResultErrorHelper;
-import twitter4j.Twitter;
-import twitter4j.TwitterException;
-
-final class TwitterComponentVerifier extends DefaultComponentVerifier {
-    TwitterComponentVerifier(TwitterComponent component) {
-        super("twitter", component.getCamelContext());
-    }
-
-    // *********************************
-    // Parameters validation
-    // *********************************
-
-    @Override
-    protected Result verifyParameters(Map<String, Object> parameters) {
-        ResultBuilder builder = 
ResultBuilder.withStatusAndScope(Result.Status.OK, Scope.PARAMETERS)
-            .error(ResultErrorHelper.requiresOption("accessToken", parameters))
-            .error(ResultErrorHelper.requiresOption("accessTokenSecret", 
parameters))
-            .error(ResultErrorHelper.requiresOption("consumerKey", parameters))
-            .error(ResultErrorHelper.requiresOption("consumerSecret", 
parameters));
-
-        // Validate using the catalog
-        super.verifyParametersAgainstCatalog(builder, parameters);
-
-        return builder.build();
-    }
-
-    // *********************************
-    // Connectivity validation
-    // *********************************
-
-    @Override
-    protected Result verifyConnectivity(Map<String, Object> parameters) {
-        return ResultBuilder.withStatusAndScope(Result.Status.OK, 
Scope.CONNECTIVITY)
-            .error(parameters, this::verifyCredentials)
-            .build();
-    }
-
-    private void verifyCredentials(ResultBuilder builder, Map<String, Object> 
parameters) throws Exception {
-        try {
-            TwitterConfiguration configuration = setProperties(new 
TwitterConfiguration(), parameters);
-            Twitter twitter = configuration.getTwitter();
-
-            twitter.verifyCredentials();
-        } catch (TwitterException e) {
-            // verifyCredentials throws TwitterException when Twitter service 
or
-            // network is unavailable or if supplied credential is wrong
-            ResultErrorBuilder errorBuilder = 
ResultErrorBuilder.withCodeAndDescription(VerificationError.StandardCode.AUTHENTICATION,
 e.getErrorMessage())
-                .detail("twitter_error_code", e.getErrorCode())
-                .detail("twitter_status_code", e.getStatusCode())
-                .detail("twitter_exception_code", e.getExceptionCode())
-                .detail("twitter_exception_message", e.getMessage())
-                .detail("twitter_exception_caused-by-network-issue", 
e.isCausedByNetworkIssue())
-                
.detail(ComponentVerifier.VerificationError.ExceptionAttribute.EXCEPTION_CLASS, 
e.getClass().getName())
-                
.detail(ComponentVerifier.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE,
 e);
-
-            // For a complete list of error codes see:
-            //   https://dev.twitter.com/overview/api/response-codes
-            if (e.getErrorCode() == 89) {
-                errorBuilder.parameterKey("accessToken");
-            }
-
-            builder.error(errorBuilder.build());
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/bb64dca0/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterConfiguration.java
----------------------------------------------------------------------
diff --git 
a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterConfiguration.java
 
b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterConfiguration.java
index 846a1f8..fcb47e0 100644
--- 
a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterConfiguration.java
+++ 
b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterConfiguration.java
@@ -32,8 +32,9 @@ import twitter4j.conf.ConfigurationBuilder;
 @UriParams
 public class TwitterConfiguration {
 
-    @UriPath(description = "The kind of endpoint", enums = 
"directmessage,search,streaming/filter,streaming/sample,streaming/user"
-            + 
",timeline/home,timeline/mentions,timeline/retweetsofme,timeline/user") 
@Metadata(required = "true")
+    //@UriPath(description = "The kind of endpoint", enums = 
"directmessage,search,streaming/filter,streaming/sample,streaming/user"
+    //        + 
",timeline/home,timeline/mentions,timeline/retweetsofme,timeline/user") 
@Metadata(required = "true")
+    @Deprecated
     private String kind;
     @UriParam(label = "consumer", defaultValue = "polling", enums = 
"polling,direct,event")
     private EndpointType type = EndpointType.POLLING;
@@ -161,6 +162,7 @@ public class TwitterConfiguration {
         return twitterStream;
     }
 
+    @Deprecated
     public String getKind() {
         return kind;
     }
@@ -169,6 +171,7 @@ public class TwitterConfiguration {
      * What polling mode to use, direct, polling or event based.
      * The event mode is only supported when the endpoint kind is event based.
      */
+    @Deprecated
     public void setKind(String kind) {
         this.kind = kind;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/bb64dca0/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpoint.java
----------------------------------------------------------------------
diff --git 
a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpoint.java
 
b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpoint.java
index 2353148..fbc699d 100644
--- 
a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpoint.java
+++ 
b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpoint.java
@@ -19,6 +19,10 @@ package org.apache.camel.component.twitter;
 import org.apache.camel.Endpoint;
 import org.apache.camel.component.twitter.data.EndpointType;
 
+/**
+ * @deprecated Migrate with {@link AbstractTwitterEndpoint} in 3.0
+ */
+@Deprecated
 public interface TwitterEndpoint extends Endpoint {
 
     TwitterConfiguration getProperties();

http://git-wip-us.apache.org/repos/asf/camel/blob/bb64dca0/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java
----------------------------------------------------------------------
diff --git 
a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java
 
b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java
index 52f5594..1e72dc3 100644
--- 
a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java
+++ 
b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java
@@ -23,28 +23,30 @@ import org.apache.camel.Producer;
 import org.apache.camel.ServiceStatus;
 import org.apache.camel.api.management.ManagedAttribute;
 import org.apache.camel.component.direct.DirectEndpoint;
-import org.apache.camel.component.twitter.consumer.TwitterConsumer;
+import 
org.apache.camel.component.twitter.consumer.AbstractTwitterConsumerHandler;
 import org.apache.camel.component.twitter.consumer.TwitterConsumerDirect;
 import org.apache.camel.component.twitter.data.EndpointType;
 
 /**
- * Twitter direct endpoint
+ * Twitter direct endpoint.
+ * 
  */
+@Deprecated
 public class TwitterEndpointDirect extends DirectEndpoint implements 
TwitterEndpoint {
-    private final String remaining;
+    private final String kind;
 
     // only TwitterEndpointPolling is annotated
     private TwitterConfiguration properties;
 
     public TwitterEndpointDirect(String uri, String remaining, 
TwitterComponent component, TwitterConfiguration properties) {
         super(uri, component);
-        this.remaining = remaining;
+        this.kind = remaining;
         this.properties = properties;
     }
 
     @Override
     public Consumer createConsumer(Processor processor) throws Exception {
-        TwitterConsumer twitter4jConsumer = TwitterHelper.createConsumer(this, 
getEndpointUri(), remaining);
+        AbstractTwitterConsumerHandler twitter4jConsumer = 
TwitterHelper.createConsumer(this, getEndpointUri(), kind);
         TwitterConsumerDirect answer = new TwitterConsumerDirect(this, 
processor, twitter4jConsumer);
         configureConsumer(answer);
         return answer;
@@ -52,7 +54,7 @@ public class TwitterEndpointDirect extends DirectEndpoint 
implements TwitterEndp
 
     @Override
     public Producer createProducer() throws Exception {
-        return TwitterHelper.createProducer(this, getEndpointUri(), remaining);
+        return TwitterHelper.createProducer(this, getEndpointUri(), kind);
     }
 
     @ManagedAttribute

Reply via email to