camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [7/7] camel git commit: CAMEL-7999: More components include documentation
Date Fri, 02 Jan 2015 15:28:41 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/aa3c22b6
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/aa3c22b6
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/aa3c22b6

Branch: refs/heads/master
Commit: aa3c22b612b7c3356c28468a4d9185bc09ca27db
Parents: 834a6c0
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Fri Jan 2 16:28:15 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Jan 2 16:28:15 2015 +0100

----------------------------------------------------------------------
 .../camel/component/solr/SolrComponent.java     |  7 ++++++-
 .../camel/component/solr/SolrEndpoint.java      | 21 ++++++++++++++++++--
 2 files changed, 25 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/aa3c22b6/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrComponent.java
b/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrComponent.java
index 232ffb0..262b350 100644
--- a/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrComponent.java
+++ b/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrComponent.java
@@ -22,6 +22,7 @@ import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.camel.Endpoint;
 import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.impl.UriEndpointComponent;
 import org.apache.solr.client.solrj.SolrServer;
 import org.apache.solr.client.solrj.impl.CloudSolrServer;
 import org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer;
@@ -32,7 +33,7 @@ import org.slf4j.LoggerFactory;
 /**
  * Represents the component that manages {@link SolrEndpoint}.
  */
-public class SolrComponent extends DefaultComponent {
+public class SolrComponent extends UriEndpointComponent {
 
     private static final Logger LOG = LoggerFactory.getLogger(SolrComponent.class);
     private final Map<SolrEndpoint, SolrServerReference> servers = new HashMap<SolrEndpoint,
SolrServerReference>();
@@ -77,6 +78,10 @@ public class SolrComponent extends DefaultComponent {
         }
     }
 
+    public SolrComponent() {
+        super(SolrEndpoint.class);
+    }
+
     @Override
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object>
parameters) throws Exception {
         Endpoint endpoint = new SolrEndpoint(uri, this, remaining);

http://git-wip-us.apache.org/repos/asf/camel/blob/aa3c22b6/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrEndpoint.java
b/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrEndpoint.java
index 70dbd18..a018882 100644
--- a/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrEndpoint.java
+++ b/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrEndpoint.java
@@ -24,6 +24,9 @@ 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;
 import org.apache.solr.client.solrj.impl.CloudSolrServer;
 import org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer;
 import org.apache.solr.client.solrj.impl.HttpSolrServer;
@@ -31,22 +34,36 @@ import org.apache.solr.client.solrj.impl.HttpSolrServer;
 /**
  * Represents a Solr endpoint.
  */
+@UriEndpoint(scheme = "solr", label = "monitoring,search")
 public class SolrEndpoint extends DefaultEndpoint {
 
-    private String requestHandler;
+    @UriPath
     private String url;
+    private String scheme = "http://";
+    @UriParam(defaultValue = "" + SolrConstants.DEFUALT_STREAMING_QUEUE_SIZE)
     private int streamingQueueSize = SolrConstants.DEFUALT_STREAMING_QUEUE_SIZE;
+    @UriParam(defaultValue = "" + SolrConstants.DEFAULT_STREAMING_THREAD_COUNT)
     private int streamingThreadCount = SolrConstants.DEFAULT_STREAMING_THREAD_COUNT;
+    @UriParam
     private Integer maxRetries;
+    @UriParam
     private Integer soTimeout;
+    @UriParam
     private Integer connectionTimeout;
+    @UriParam
     private Integer defaultMaxConnectionsPerHost;
+    @UriParam
     private Integer maxTotalConnections;
+    @UriParam(defaultValue = "false")
     private Boolean followRedirects;
+    @UriParam(defaultValue = "false")
     private Boolean allowCompression;
-    private String scheme = "http://";
+    @UriParam
     private String zkHost;
+    @UriParam
     private String collection;
+    @UriParam
+    private String requestHandler;
 
     public SolrEndpoint(String endpointUri, SolrComponent component, String address) throws
Exception {
         super(endpointUri, component);


Mime
View raw message