camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: CAMEL-8545: camel-swagger-java to run outside servlet - work in progress
Date Thu, 24 Sep 2015 06:47:35 GMT
Repository: camel
Updated Branches:
  refs/heads/master 55627269c -> 6357550e5


CAMEL-8545: camel-swagger-java to run outside servlet - work in progress


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

Branch: refs/heads/master
Commit: 6357550e514d2aac88c3dc0bac497448a1e7237e
Parents: 5562726
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Sep 24 08:48:40 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Sep 24 08:48:40 2015 +0200

----------------------------------------------------------------------
 .../apache/camel/component/rest/RestApiComponent.java  |  3 +++
 .../apache/camel/component/rest/RestApiEndpoint.java   | 13 -------------
 .../org/apache/camel/component/rest/RestComponent.java |  3 +++
 .../org/apache/camel/spi/RestApiConsumerFactory.java   |  7 +++++++
 .../org/apache/camel/spi/RestApiProcessorFactory.java  |  6 ++++++
 .../java/org/apache/camel/spi/RestConfiguration.java   |  4 ++--
 .../java/org/apache/camel/spi/RestConsumerFactory.java |  5 +++++
 7 files changed, 26 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/6357550e/camel-core/src/main/java/org/apache/camel/component/rest/RestApiComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/rest/RestApiComponent.java
b/camel-core/src/main/java/org/apache/camel/component/rest/RestApiComponent.java
index 9abaaac..a3646fc 100644
--- a/camel-core/src/main/java/org/apache/camel/component/rest/RestApiComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/rest/RestApiComponent.java
@@ -21,6 +21,9 @@ import java.util.Map;
 import org.apache.camel.Endpoint;
 import org.apache.camel.impl.UriEndpointComponent;
 
+/**
+ * Rest API component.
+ */
 public class RestApiComponent extends UriEndpointComponent {
 
     public RestApiComponent() {

http://git-wip-us.apache.org/repos/asf/camel/blob/6357550e/camel-core/src/main/java/org/apache/camel/component/rest/RestApiEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/rest/RestApiEndpoint.java
b/camel-core/src/main/java/org/apache/camel/component/rest/RestApiEndpoint.java
index 7c3a858..2ce98f7 100644
--- a/camel-core/src/main/java/org/apache/camel/component/rest/RestApiEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/rest/RestApiEndpoint.java
@@ -245,19 +245,6 @@ public class RestApiEndpoint extends DefaultEndpoint {
                 path = "/" + path;
             }
 
-            // TODO: is this needed?
-            // there may be an optional context path configured to help Camel calculate the
correct urls for the REST services
-            // this may be needed when using camel-servlet where we cannot get the actual
context-path or port number of the servlet engine
-            // during init of the servlet
-/*            String contextPath = config.getApiContextPath();
-            if (contextPath != null) {
-                if (!contextPath.startsWith("/")) {
-                    path = "/" + contextPath + path;
-                } else {
-                    path = contextPath + path;
-                }
-            }
-*/
             Consumer consumer = factory.createApiConsumer(getCamelContext(), processor, path,
config, getParameters());
             configureConsumer(consumer);
 

http://git-wip-us.apache.org/repos/asf/camel/blob/6357550e/camel-core/src/main/java/org/apache/camel/component/rest/RestComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/rest/RestComponent.java b/camel-core/src/main/java/org/apache/camel/component/rest/RestComponent.java
index a39e722..857e750 100644
--- a/camel-core/src/main/java/org/apache/camel/component/rest/RestComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/rest/RestComponent.java
@@ -23,6 +23,9 @@ import org.apache.camel.impl.UriEndpointComponent;
 import org.apache.camel.util.FileUtil;
 import org.apache.camel.util.ObjectHelper;
 
+/**
+ * REST-DSL component.
+ */
 public class RestComponent extends UriEndpointComponent {
 
     public RestComponent() {

http://git-wip-us.apache.org/repos/asf/camel/blob/6357550e/camel-core/src/main/java/org/apache/camel/spi/RestApiConsumerFactory.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/RestApiConsumerFactory.java b/camel-core/src/main/java/org/apache/camel/spi/RestApiConsumerFactory.java
index c000d93..2786cf1 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/RestApiConsumerFactory.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/RestApiConsumerFactory.java
@@ -22,6 +22,13 @@ import org.apache.camel.CamelContext;
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 
+/**
+ * Allows SPI to plugin a {@link RestApiConsumerFactory} that creates the Camel {@link Consumer}
responsible
+ * for handling incoming HTTP GET requests from clients that request to access the REST API
documentation.
+ * <p/>
+ * For example most of the Camel components that supports REST-DSL does that,
+ * such as <tt>camel-jetty</tt>, <tt>camel-netty4-http</tt>.
+ */
 public interface RestApiConsumerFactory {
 
     /**

http://git-wip-us.apache.org/repos/asf/camel/blob/6357550e/camel-core/src/main/java/org/apache/camel/spi/RestApiProcessorFactory.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/RestApiProcessorFactory.java b/camel-core/src/main/java/org/apache/camel/spi/RestApiProcessorFactory.java
index d65fbec..b66e55c 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/RestApiProcessorFactory.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/RestApiProcessorFactory.java
@@ -21,6 +21,12 @@ import java.util.Map;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Processor;
 
+/**
+ * Allows SPI to plugin a {@link RestApiProcessorFactory} that creates the Camel {@link Processor}
responsible
+ * for servicing and generating the REST API documentation.
+ * <p/>
+ * For example the <tt>camel-swagger-java</tt> component provides such a factory
that uses Swagger to generate the documentation.
+ */
 public interface RestApiProcessorFactory {
 
     /**

http://git-wip-us.apache.org/repos/asf/camel/blob/6357550e/camel-core/src/main/java/org/apache/camel/spi/RestConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/RestConfiguration.java b/camel-core/src/main/java/org/apache/camel/spi/RestConfiguration.java
index 89c98ef..4c78a39 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/RestConfiguration.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/RestConfiguration.java
@@ -19,8 +19,8 @@ package org.apache.camel.spi;
 import java.util.Map;
 
 /**
- * Configuration use by {@link org.apache.camel.spi.RestConsumerFactory} for Camel components
to support
- * the Camel {@link org.apache.camel.model.rest.RestDefinition rest} DSL.
+ * Configuration use by {@link org.apache.camel.spi.RestConsumerFactory} and {@link org.apache.camel.spi.RestApiConsumerFactory}
+ * for Camel components to support the Camel {@link org.apache.camel.model.rest.RestDefinition
rest} DSL.
  */
 public class RestConfiguration {
 

http://git-wip-us.apache.org/repos/asf/camel/blob/6357550e/camel-core/src/main/java/org/apache/camel/spi/RestConsumerFactory.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/RestConsumerFactory.java b/camel-core/src/main/java/org/apache/camel/spi/RestConsumerFactory.java
index 26f51a3..bbb5f15 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/RestConsumerFactory.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/RestConsumerFactory.java
@@ -22,6 +22,11 @@ import org.apache.camel.CamelContext;
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 
+/**
+ * Allows SPI to plugin a {@link RestConsumerFactory} that creates the Camel {@link Consumer}
responsible
+ * for handling incoming HTTP requests from clients that request to access REST services
which has been created using
+ * the <a href="http://camel.apache.org/rest-dsl">rest-dsl</a>.
+ */
 public interface RestConsumerFactory {
 
     /**


Mime
View raw message