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: Try to fix CI build with issue with javadoc generation in example
Date Sat, 16 Jul 2016 06:38:03 GMT
Try to fix CI build with issue with javadoc generation in example


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

Branch: refs/heads/master
Commit: 71e83c6c4d9e2b2c14df98f84c19b165fa406216
Parents: be3523f
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sat Jul 16 08:37:47 2016 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sat Jul 16 08:37:47 2016 +0200

----------------------------------------------------------------------
 .../example/cdi/kubernetes/Application.java     | 26 +++++++++-----------
 1 file changed, 11 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/71e83c6c/examples/camel-example-cdi-kubernetes/src/main/java/org/apache/camel/example/cdi/kubernetes/Application.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-cdi-kubernetes/src/main/java/org/apache/camel/example/cdi/kubernetes/Application.java
b/examples/camel-example-cdi-kubernetes/src/main/java/org/apache/camel/example/cdi/kubernetes/Application.java
index db25c64..d3fca08 100644
--- a/examples/camel-example-cdi-kubernetes/src/main/java/org/apache/camel/example/cdi/kubernetes/Application.java
+++ b/examples/camel-example-cdi-kubernetes/src/main/java/org/apache/camel/example/cdi/kubernetes/Application.java
@@ -26,8 +26,6 @@ import javax.inject.Named;
 
 import io.fabric8.kubernetes.api.model.Pod;
 
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.cdi.ContextName;
 import org.apache.camel.component.properties.DefaultPropertiesParser;
@@ -35,27 +33,25 @@ import org.apache.camel.component.properties.PropertiesComponent;
 import org.apache.camel.component.properties.PropertiesParser;
 import org.apache.deltaspike.core.api.config.ConfigResolver;
 
-class Application {
+/**
+ * Example application
+ */
+public class Application {
 
     @ContextName("camel-example-kubernetes-cdi")
     static class KubernetesRoute extends RouteBuilder {
 
         @Override
         public void configure() {
-
             from("timer:stream?repeatCount=3")
                 .to("kubernetes://{{kubernetes-master-url}}?oauthToken={{kubernetes-oauth-token}}&category=pods&operation=listPods")
-                .process(new Processor() {
-            
-                    @Override
-                    public void process(Exchange exchange) throws Exception {
-                        List<Pod> list = exchange.getIn().getBody(List.class);
-                        System.out.println("We currently have " + list.size() + " pods");
-                        Iterator<Pod> it = list.iterator();
-                        while (it.hasNext()) {
-                            Pod pod = it.next();
-                            System.out.println("Pod name " + pod.getMetadata().getName()
+ " with status " + pod.getStatus().getPhase());
-                        }
+                .process(exchange -> {
+                    List<Pod> list = exchange.getIn().getBody(List.class);
+                    System.out.println("We currently have " + list.size() + " pods");
+                    Iterator<Pod> it = list.iterator();
+                    while (it.hasNext()) {
+                        Pod pod = it.next();
+                        System.out.println("Pod name " + pod.getMetadata().getName() + "
with status " + pod.getStatus().getPhase());
                     }
                 });
         }


Mime
View raw message