camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [7/8] git commit: CAMEL-7186: Added missing @UriParam to some components in camel-core.
Date Mon, 10 Feb 2014 12:05:35 GMT
CAMEL-7186: Added missing @UriParam to some components in camel-core.


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

Branch: refs/heads/camel-2.12.x
Commit: 7ec168b9901fcf9442955c9b1227d85658f377d5
Parents: de608c3
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Feb 10 12:05:02 2014 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Feb 10 13:06:28 2014 +0100

----------------------------------------------------------------------
 .../org/apache/camel/component/ResourceEndpoint.java     |  1 +
 .../apache/camel/component/browse/BrowseComponent.java   |  7 ++++++-
 .../apache/camel/component/browse/BrowseEndpoint.java    |  4 +++-
 .../camel/component/dataformat/DataFormatComponent.java  |  9 +++++++--
 .../camel/component/dataformat/DataFormatEndpoint.java   |  7 ++++++-
 .../org/apache/camel/component/mock/MockComponent.java   |  8 ++++++--
 .../org/apache/camel/component/mock/MockEndpoint.java    | 11 +++++++++++
 7 files changed, 40 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/7ec168b9/camel-core/src/main/java/org/apache/camel/component/ResourceEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/ResourceEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/ResourceEndpoint.java
index 9b3af1d..05358ac 100644
--- a/camel-core/src/main/java/org/apache/camel/component/ResourceEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/ResourceEndpoint.java
@@ -41,6 +41,7 @@ import org.slf4j.LoggerFactory;
 public abstract class ResourceEndpoint extends ProcessorEndpoint implements ManagedResourceEndpointMBean
{
     protected final Logger log = LoggerFactory.getLogger(getClass());
     private volatile byte[] buffer;
+    @UriParam
     private String resourceUri;
     @UriParam
     private boolean contentCache;

http://git-wip-us.apache.org/repos/asf/camel/blob/7ec168b9/camel-core/src/main/java/org/apache/camel/component/browse/BrowseComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/browse/BrowseComponent.java
b/camel-core/src/main/java/org/apache/camel/component/browse/BrowseComponent.java
index fe1d6b2..84bf06f 100644
--- a/camel-core/src/main/java/org/apache/camel/component/browse/BrowseComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/browse/BrowseComponent.java
@@ -20,13 +20,18 @@ import java.util.Map;
 
 import org.apache.camel.Endpoint;
 import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.impl.UriEndpointComponent;
 
 /**
  * The <a href="http://camel.apache.org/browse.html">browse</a> component.
  *
  * @version 
  */
-public class BrowseComponent extends DefaultComponent {
+public class BrowseComponent extends UriEndpointComponent {
+
+    public BrowseComponent() {
+        super(BrowseEndpoint.class);
+    }
 
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object>
parameters) throws Exception {
         return new BrowseEndpoint(uri, this);

http://git-wip-us.apache.org/repos/asf/camel/blob/7ec168b9/camel-core/src/main/java/org/apache/camel/component/browse/BrowseEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/browse/BrowseEndpoint.java
b/camel-core/src/main/java/org/apache/camel/component/browse/BrowseEndpoint.java
index 3bc9aeb..6eac130 100644
--- a/camel-core/src/main/java/org/apache/camel/component/browse/BrowseEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/browse/BrowseEndpoint.java
@@ -31,6 +31,7 @@ import org.apache.camel.processor.loadbalancer.LoadBalancer;
 import org.apache.camel.processor.loadbalancer.LoadBalancerConsumer;
 import org.apache.camel.processor.loadbalancer.TopicLoadBalancer;
 import org.apache.camel.spi.BrowsableEndpoint;
+import org.apache.camel.spi.UriEndpoint;
 
 /**
  * An endpoint which maintains a {@link List} of {@link Exchange} instances
@@ -38,7 +39,8 @@ import org.apache.camel.spi.BrowsableEndpoint;
  *
  * @version 
  */
-public class BrowseEndpoint extends DefaultEndpoint implements BrowsableEndpoint, Service
{
+@UriEndpoint(scheme = "browse")
+public class BrowseEndpoint extends DefaultEndpoint implements BrowsableEndpoint {
     private List<Exchange> exchanges;
     private final LoadBalancer loadBalancer = new TopicLoadBalancer();
 

http://git-wip-us.apache.org/repos/asf/camel/blob/7ec168b9/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatComponent.java
b/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatComponent.java
index f692ab8..62ffc59 100644
--- a/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatComponent.java
@@ -19,12 +19,17 @@ package org.apache.camel.component.dataformat;
 import java.util.Map;
 
 import org.apache.camel.Endpoint;
-import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.component.dataset.DataSetEndpoint;
+import org.apache.camel.impl.UriEndpointComponent;
 import org.apache.camel.spi.DataFormat;
 import org.apache.camel.util.EndpointHelper;
 import org.apache.camel.util.ObjectHelper;
 
-public class DataFormatComponent extends DefaultComponent {
+public class DataFormatComponent extends UriEndpointComponent {
+
+    public DataFormatComponent() {
+        super(DataSetEndpoint.class);
+    }
 
     @Override
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object>
parameters) throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/7ec168b9/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatEndpoint.java
b/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatEndpoint.java
index 7304990..1261b2d 100644
--- a/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/dataformat/DataFormatEndpoint.java
@@ -28,13 +28,18 @@ import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.processor.MarshalProcessor;
 import org.apache.camel.processor.UnmarshalProcessor;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
 import org.apache.camel.util.ServiceHelper;
 
+@UriEndpoint(scheme = "dataformat")
 public class DataFormatEndpoint extends DefaultEndpoint {
 
-    private DataFormat dataFormat;
     private MarshalProcessor marshal;
     private UnmarshalProcessor unmarshal;
+    @UriParam
+    private DataFormat dataFormat;
+    @UriParam
     private String operation;
 
     public DataFormatEndpoint() {

http://git-wip-us.apache.org/repos/asf/camel/blob/7ec168b9/camel-core/src/main/java/org/apache/camel/component/mock/MockComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/mock/MockComponent.java b/camel-core/src/main/java/org/apache/camel/component/mock/MockComponent.java
index 0cb58d7..8977918 100644
--- a/camel-core/src/main/java/org/apache/camel/component/mock/MockComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/mock/MockComponent.java
@@ -20,7 +20,7 @@ import java.util.Map;
 
 import org.apache.camel.Endpoint;
 import org.apache.camel.Processor;
-import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.impl.UriEndpointComponent;
 import org.apache.camel.processor.ThroughputLogger;
 import org.apache.camel.util.CamelLogger;
 
@@ -29,7 +29,11 @@ import org.apache.camel.util.CamelLogger;
  *
  * @version 
  */
-public class MockComponent extends DefaultComponent {
+public class MockComponent extends UriEndpointComponent {
+
+    public MockComponent() {
+        super(MockEndpoint.class);
+    }
 
     @Override
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object>
parameters) throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/7ec168b9/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
index d793b6e..804159b 100644
--- a/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
@@ -49,6 +49,8 @@ import org.apache.camel.impl.DefaultAsyncProducer;
 import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.impl.InterceptSendToEndpoint;
 import org.apache.camel.spi.BrowsableEndpoint;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
 import org.apache.camel.util.CamelContextHelper;
 import org.apache.camel.util.CaseInsensitiveMap;
 import org.apache.camel.util.ExchangeHelper;
@@ -75,12 +77,14 @@ import org.slf4j.LoggerFactory;
  *
  * @version 
  */
+@UriEndpoint(scheme = "mock")
 public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint {
     private static final Logger LOG = LoggerFactory.getLogger(MockEndpoint.class);
     // must be volatile so changes is visible between the thread which performs the assertions
     // and the threads which process the exchanges when routing messages in Camel
     protected volatile Processor reporter;
     protected boolean copyOnExchange = true;
+    @UriParam
     private volatile int expectedCount;
     private volatile int counter;
     private volatile Processor defaultProcessor;
@@ -89,10 +93,15 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint
{
     private volatile List<Throwable> failures;
     private volatile List<Runnable> tests;
     private volatile CountDownLatch latch;
+    @UriParam
     private volatile long sleepForEmptyTest;
+    @UriParam
     private volatile long resultWaitTime;
+    @UriParam
     private volatile long resultMinimumWaitTime;
+    @UriParam
     private volatile long assertPeriod;
+    @UriParam
     private volatile int expectedMinimumCount;
     private volatile List<?> expectedBodyValues;
     private volatile List<Object> actualBodyValues;
@@ -100,7 +109,9 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint
{
     private volatile Map<String, Object> actualHeaderValues;
     private volatile Map<String, Object> expectedPropertyValues;
     private volatile Map<String, Object> actualPropertyValues;
+    @UriParam
     private volatile int retainFirst;
+    @UriParam
     private volatile int retainLast;
 
     public MockEndpoint(String endpointUri, Component component) {


Mime
View raw message