camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/2] camel git commit: CAMEL-7999: More components include documentation
Date Sun, 04 Jan 2015 11:06:41 GMT
Repository: camel
Updated Branches:
  refs/heads/master f561a8b7e -> 00ed85017


CAMEL-7999: More components include documentation


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

Branch: refs/heads/master
Commit: 66eee40fa3191c9a70ca035c20248bfc81cdc40f
Parents: f561a8b
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sun Jan 4 12:00:50 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun Jan 4 12:00:50 2015 +0100

----------------------------------------------------------------------
 .../apache/camel/component/kestrel/KestrelComponent.java    | 9 +++++----
 .../camel/component/kestrel/KestrelConfiguration.java       | 7 +++++++
 .../org/apache/camel/component/kestrel/KestrelEndpoint.java | 6 ++++++
 3 files changed, 18 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/66eee40f/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelComponent.java
b/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelComponent.java
index f97fdc3..6fa16dd 100644
--- a/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelComponent.java
+++ b/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelComponent.java
@@ -26,7 +26,7 @@ import net.spy.memcached.FailureMode;
 import net.spy.memcached.MemcachedClient;
 import org.apache.camel.CamelContext;
 import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.impl.UriEndpointComponent;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory;
  * Camel component which offers queueing over the Memcached protocol
  * as supported by Kestrel.
  */
-public class KestrelComponent extends DefaultComponent {
+public class KestrelComponent extends UriEndpointComponent {
     private static final Logger LOG = LoggerFactory.getLogger(KestrelComponent.class);
 
     private KestrelConfiguration configuration;
@@ -46,15 +46,16 @@ public class KestrelComponent extends DefaultComponent {
     private final Map<String, MemcachedClient> memcachedClientCache = new HashMap<String,
MemcachedClient>();
 
     public KestrelComponent() {
-        configuration = new KestrelConfiguration();
+        this(new KestrelConfiguration());
     }
 
     public KestrelComponent(KestrelConfiguration configuration) {
+        super(KestrelEndpoint.class);
         this.configuration = configuration;
     }
 
     public KestrelComponent(CamelContext context) {
-        super(context);
+        super(context, KestrelEndpoint.class);
         configuration = new KestrelConfiguration();
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/66eee40f/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelConfiguration.java
b/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelConfiguration.java
index 19dd855..b8f09ac 100644
--- a/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelConfiguration.java
+++ b/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelConfiguration.java
@@ -21,10 +21,14 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
+import org.apache.camel.spi.UriPath;
 
 /**
  * Represents the configuration of the Kestrel component and/or endpoint.
  */
+@UriParams
 public class KestrelConfiguration implements Cloneable {
     /**
      * The default port on which kestrel runs
@@ -34,16 +38,19 @@ public class KestrelConfiguration implements Cloneable {
     /**
      * The address(es) on which kestrel is running
      */
+    @UriPath
     private String[] addresses = new String[]{"localhost:" + DEFAULT_KESTREL_PORT};
 
     /**
      * How long a given wait should block (server side), in milliseconds
      */
+    @UriParam(defaultValue = "100")
     private int waitTimeMs = 100;
 
     /**
      * How many concurrent listeners to schedule for the thread pool
      */
+    @UriParam(defaultValue = "1")
     private int concurrentConsumers = 1;
 
     public String[] getAddresses() {

http://git-wip-us.apache.org/repos/asf/camel/blob/66eee40f/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelEndpoint.java
b/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelEndpoint.java
index 9590c5c..4aa23c8 100644
--- a/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelEndpoint.java
+++ b/components/camel-kestrel/src/main/java/org/apache/camel/component/kestrel/KestrelEndpoint.java
@@ -21,20 +21,26 @@ import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultEndpoint;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
 
 /**
  * Camel endpoint for communication with a kestrel based queue.
  */
+@UriEndpoint(scheme = "kestrel", consumerClass = KestrelConsumer.class, label = "messaging")
 public class KestrelEndpoint extends DefaultEndpoint {
 
     /**
      * The configuration of this endpoint
      */
+    @UriParam
     private KestrelConfiguration configuration;
 
     /**
      * The queue we are polling
      */
+    @UriPath
     private String queue;
 
     /**


Mime
View raw message