camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/3] camel git commit: Component docs
Date Mon, 22 Jun 2015 07:26:16 GMT
Component docs


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

Branch: refs/heads/master
Commit: 67505910e9788a4361d6d9c42c32bc052f32edab
Parents: 90d337e
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Jun 22 09:28:28 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Jun 22 09:28:28 2015 +0200

----------------------------------------------------------------------
 .../component/twitter/TwitterEndpointDirect.java     |  6 ++----
 .../component/twitter/TwitterEndpointEvent.java      | 15 ++++++++-------
 2 files changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/67505910/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 2c6103f..bc5b350 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
@@ -26,16 +26,14 @@ import org.apache.camel.component.direct.DirectEndpoint;
 import org.apache.camel.component.twitter.consumer.Twitter4JConsumer;
 import org.apache.camel.component.twitter.consumer.TwitterConsumerDirect;
 import org.apache.camel.component.twitter.data.EndpointType;
-import org.apache.camel.spi.UriEndpoint;
-import org.apache.camel.spi.UriParam;
 
 /**
  * Twitter direct endpoint
  */
-@UriEndpoint(scheme = "twitter", title = "Twitter", syntax = "twitter:type", consumerClass
= Twitter4JConsumer.class, label = "api,social")
 public class TwitterEndpointDirect extends DirectEndpoint implements TwitterEndpoint {
 
-    @UriParam
+    // only TwitterEndpointPolling is annotated
+
     private TwitterConfiguration properties;
 
     public TwitterEndpointDirect(String uri, TwitterComponent component, TwitterConfiguration
properties) {

http://git-wip-us.apache.org/repos/asf/camel/blob/67505910/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java
----------------------------------------------------------------------
diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java
b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java
index a250ceb..0690664 100644
--- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java
+++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java
@@ -19,17 +19,14 @@ package org.apache.camel.component.twitter;
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
-import org.apache.camel.component.direct.DirectEndpoint;
 import org.apache.camel.component.twitter.consumer.Twitter4JConsumer;
 import org.apache.camel.component.twitter.consumer.TwitterConsumerEvent;
 import org.apache.camel.component.twitter.data.EndpointType;
-import org.apache.camel.spi.UriEndpoint;
-import org.apache.camel.spi.UriParam;
+import org.apache.camel.impl.DefaultEndpoint;
 
-@UriEndpoint(scheme = "twitter", title = "Twitter", syntax = "twitter:type", consumerClass
= Twitter4JConsumer.class, label = "api,social")
-public class TwitterEndpointEvent extends DirectEndpoint implements TwitterEndpoint {
+public class TwitterEndpointEvent extends DefaultEndpoint implements TwitterEndpoint {
 
-    @UriParam
+    // only TwitterEndpointPolling is annotated
     private TwitterConfiguration properties;
 
     public TwitterEndpointEvent(String uri, TwitterComponent component, TwitterConfiguration
properties) {
@@ -62,11 +59,15 @@ public class TwitterEndpointEvent extends DirectEndpoint implements TwitterEndpo
     }
 
     @Override
+    public boolean isSingleton() {
+        return true;
+    }
+
+    @Override
     protected void doStop() throws Exception {
         super.doStop();
         if (properties.getTwitterStream() != null) {
             properties.getTwitterStream().shutdown();
         }
     }
-
 }


Mime
View raw message