camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] camel git commit: CAMEL-7999: More components include documentation
Date Sun, 04 Jan 2015 11:06:42 GMT
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/00ed8501
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/00ed8501
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/00ed8501

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

----------------------------------------------------------------------
 .../camel/component/krati/KratiComponent.java    |  9 +++++++--
 .../camel/component/krati/KratiEndpoint.java     | 19 ++++++++++++++++---
 2 files changed, 23 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/00ed8501/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiComponent.java
b/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiComponent.java
index de80ee7..b12c1e5 100644
--- a/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiComponent.java
+++ b/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiComponent.java
@@ -17,13 +17,18 @@
 package org.apache.camel.component.krati;
 
 import java.util.Map;
+
 import org.apache.camel.Endpoint;
-import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.impl.UriEndpointComponent;
 
 /**
  * Represents the component that manages {@link KratiEndpoint}.
  */
-public class KratiComponent extends DefaultComponent {
+public class KratiComponent extends UriEndpointComponent {
+
+    public KratiComponent() {
+        super(KratiEndpoint.class);
+    }
 
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object>
parameters) throws Exception {
         Endpoint endpoint = new KratiEndpoint(uri, this);

http://git-wip-us.apache.org/repos/asf/camel/blob/00ed8501/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiEndpoint.java
b/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiEndpoint.java
index 435086b..e7124c6 100644
--- a/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiEndpoint.java
+++ b/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiEndpoint.java
@@ -32,28 +32,41 @@ import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.component.krati.serializer.KratiDefaultSerializer;
 import org.apache.camel.impl.ScheduledPollEndpoint;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
 
 /**
  * Represents a Krati endpoint.
  */
+@UriEndpoint(scheme = "krati", consumerClass = KratiConsumer.class, label = "database,nosql")
 public class KratiEndpoint extends ScheduledPollEndpoint {
 
     protected static Map<String, KratiDataStoreRegistration> dataStoreRegistry = new
HashMap<String, KratiDataStoreRegistration>();
 
+    @UriPath
+    protected String path;
+    @UriParam
     protected String key;
+    @UriParam
     protected String value;
+    @UriParam
     protected String operation;
-
+    @UriParam(defaultValue = "100")
     protected int initialCapacity = 100;
+    @UriParam(defaultValue = "64")
     protected int segmentFileSize = 64;
+    @UriParam
     @SuppressWarnings({"unchecked", "rawtypes"})
     protected Serializer<Object> keySerializer = new KratiDefaultSerializer();
     @SuppressWarnings({"unchecked", "rawtypes"})
+    @UriParam
     protected Serializer<Object> valueSerializer = new KratiDefaultSerializer();
+    @UriParam
     protected SegmentFactory segmentFactory = new ChannelSegmentFactory();
+    @UriParam
     protected HashFunction<byte[]> hashFunction = new FnvHashFunction();
-
-    protected String path;
+    @UriParam
     protected int maxMessagesPerPoll;
 
     public KratiEndpoint(String uri, KratiComponent component) throws URISyntaxException
{


Mime
View raw message