You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2008/03/24 16:56:11 UTC

svn commit: r640450 - in /activemq/camel/trunk/examples: camel-example-bam/src/main/java/org/apache/camel/example/bam/ camel-example-cxf/src/main/java/org/apache/camel/example/camel/transport/ camel-example-cxf/src/main/java/org/apache/camel/example/cx...

Author: ningjiang
Date: Mon Mar 24 08:56:09 2008
New Revision: 640450

URL: http://svn.apache.org/viewvc?rev=640450&view=rev
Log:
Fixed the example check style errors

Modified:
    activemq/camel/trunk/examples/camel-example-bam/src/main/java/org/apache/camel/example/bam/Main.java
    activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/camel/transport/CamelTransportExample.java
    activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/camel/transport/GreeterImpl.java
    activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/CamelCxfExample.java
    activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/Client.java
    activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/provider/Client.java
    activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/provider/GreeterProvider.java
    activemq/camel/trunk/examples/camel-example-docs/src/main/java/org/apache/camel/example/docs/ContentBasedRouteRoute.java
    activemq/camel/trunk/examples/camel-example-docs/src/main/java/org/apache/camel/example/docs/MulticastRoute.java
    activemq/camel/trunk/examples/camel-example-docs/src/main/java/org/apache/camel/example/docs/PipelineRoute.java
    activemq/camel/trunk/examples/camel-example-docs/src/test/java/org/apache/camel/example/docs/IntegrationTest.java
    activemq/camel/trunk/examples/camel-example-osgi/src/main/java/org/apache/camel/example/osgi/MyTransform.java
    activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java
    activemq/camel/trunk/examples/camel-example-spring/src/test/java/org/apache/camel/example/spring/IntegrationTest.java

Modified: activemq/camel/trunk/examples/camel-example-bam/src/main/java/org/apache/camel/example/bam/Main.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-bam/src/main/java/org/apache/camel/example/bam/Main.java?rev=640450&r1=640449&r2=640450&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-bam/src/main/java/org/apache/camel/example/bam/Main.java (original)
+++ activemq/camel/trunk/examples/camel-example-bam/src/main/java/org/apache/camel/example/bam/Main.java Mon Mar 24 08:56:09 2008
@@ -1,5 +1,4 @@
 /**
- *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,8 +19,10 @@
 /**
  * @version $Revision$
  */
-public class Main {
-    
+public final class Main {
+    private Main() {
+        // do nothing here
+    }
     public static void main(String[] args) {
         org.apache.camel.spring.Main.main(args);
     }

Modified: activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/camel/transport/CamelTransportExample.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/camel/transport/CamelTransportExample.java?rev=640450&r1=640449&r2=640450&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/camel/transport/CamelTransportExample.java (original)
+++ activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/camel/transport/CamelTransportExample.java Mon Mar 24 08:56:09 2008
@@ -17,7 +17,7 @@
 package org.apache.camel.example.camel.transport;
 
 
-public class CamelTransportExample {
+public final class CamelTransportExample {
     private CamelTransportExample() {
     }
 

Modified: activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/camel/transport/GreeterImpl.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/camel/transport/GreeterImpl.java?rev=640450&r1=640449&r2=640450&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/camel/transport/GreeterImpl.java (original)
+++ activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/camel/transport/GreeterImpl.java Mon Mar 24 08:56:09 2008
@@ -25,7 +25,10 @@
                       targetNamespace = "http://apache.org/hello_world_soap_http",
                       endpointInterface = "org.apache.hello_world_soap_http.Greeter")
 
- public class GreeterImpl implements Greeter {
+public class GreeterImpl implements Greeter {
+
+    private static final Logger LOG =
+        Logger.getLogger(GreeterImpl.class.getPackage().getName());
 
     private String suffix;
 
@@ -33,9 +36,6 @@
         this.suffix = suffix;
     }
 
-    private static final Logger LOG =
-        Logger.getLogger(GreeterImpl.class.getPackage().getName());
-
     /* (non-Javadoc)
      * @see org.apache.hello_world_soap_http.Greeter#greetMe(java.lang.String)
      */
@@ -43,7 +43,7 @@
         LOG.info("Executing operation greetMe");
         System.out.println("Executing operation greetMe");
         System.out.println("Message received: " + me + "\n");
-        return "Hello " + me + "form " + suffix ;
+        return "Hello " + me + "form " + suffix;
     }
 
     /* (non-Javadoc)

Modified: activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/CamelCxfExample.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/CamelCxfExample.java?rev=640450&r1=640449&r2=640450&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/CamelCxfExample.java (original)
+++ activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/CamelCxfExample.java Mon Mar 24 08:56:09 2008
@@ -28,7 +28,7 @@
 /**
  * An example class for demonstrating camel works as Router.
  * This example shows how camel can route a SOAP over HTTP client's request
- * to a SOAP over JMS Service. 
+ * to a SOAP over JMS Service.
  *
  */
 public final class CamelCxfExample {
@@ -39,17 +39,17 @@
     private static final String SERVICE_NAME = "serviceName={http://apache.org/hello_world_soap_http}SOAPService";
     private static final String SOAP_OVER_HTTP_ROUTER = "portName={http://apache.org/hello_world_soap_http}SoapOverHttpRouter";
     private static final String SOAP_OVER_JMS = "portName={http://apache.org/hello_world_soap_http}SoapOverJms";
-        
-    private static String ROUTER_ENDPOINT_URI = "cxf://" + ROUTER_ADDRESS + "?" + SERVICE_CLASS + "&" 
+
+    private static final String ROUTER_ENDPOINT_URI = "cxf://" + ROUTER_ADDRESS + "?" + SERVICE_CLASS + "&"
                                                    + WSDL_LOCATION + "&" + SERVICE_NAME + "&" + SOAP_OVER_HTTP_ROUTER + "&dataFormat=POJO";
-    private static String SERVICE_ENDPOINT_URI = "cxf://" + SERVICE_ADDRESS + "?" + SERVICE_CLASS + "&" 
+    private static final String SERVICE_ENDPOINT_URI = "cxf://" + SERVICE_ADDRESS + "?" + SERVICE_CLASS + "&"
                                                    + WSDL_LOCATION + "&" + SERVICE_NAME + "&" + SOAP_OVER_JMS + "&dataFormat=POJO";
-    
-    private CamelCxfExample() {        
+
+    private CamelCxfExample() {
     }
-        
+
     public static void main(String args[]) throws Exception {
-        
+
         // START SNIPPET: e1
         CamelContext context = new DefaultCamelContext();
         // END SNIPPET: e1
@@ -57,7 +57,7 @@
         // START SNIPPET: e2
         JmsBroker broker = new JmsBroker();
         Server server = new Server();
-        try {     
+        try {
             broker.start();
             server.start();
             // END SNIPPET: e2
@@ -65,18 +65,18 @@
             // START SNIPPET: e3
             context.addRoutes(new RouteBuilder() {
                 public void configure() {
-                    from(ROUTER_ENDPOINT_URI).to(SERVICE_ENDPOINT_URI);               
+                    from(ROUTER_ENDPOINT_URI).to(SERVICE_ENDPOINT_URI);
                 }
             });
             // END SNIPPET: e3
             // Staring the routing context
-            // Using the CXF Client to kick off the invocations 
+            // Using the CXF Client to kick off the invocations
             // START SNIPPET: e4
             context.start();
             Client client = new Client(ROUTER_ADDRESS + "?wsdl");
             // END SNIPPET: e4
             // Now everything is set up - lets start the context
-             
+
             client.invock();
             Thread.sleep(1000);
             context.stop();
@@ -87,6 +87,6 @@
             broker.stop();
             System.exit(0);
         }
-        
+
     }
 }

Modified: activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/Client.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/Client.java?rev=640450&r1=640449&r2=640450&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/Client.java (original)
+++ activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/Client.java Mon Mar 24 08:56:09 2008
@@ -28,17 +28,17 @@
 
 public final class Client {
 
-    private static final QName SERVICE_NAME 
+    private static final QName SERVICE_NAME
         = new QName("http://apache.org/hello_world_soap_http", "SOAPService");
     private String wsdlLocation;
     private SOAPService soapService;
-           
+
     public Client(String wsdl) throws MalformedURLException {
         URL wsdlURL = null;
-        if (wsdl != null ) {
+        if (wsdl != null) {
             wsdlLocation = wsdl;
-        } 
-        
+        }
+
         File wsdlFile = new File(wsdlLocation);
         if (wsdlFile.exists()) {
             wsdlURL = wsdlFile.toURL();
@@ -47,14 +47,14 @@
         }
         soapService = new SOAPService(wsdlURL, SERVICE_NAME);
     }
-    
-    
+
+
 
     public void invock() throws Exception {
-        
+
         System.out.println("Acquiring router port ...");
         Greeter port = soapService.getSoapOverHttpRouter();
-        String resp; 
+        String resp;
 
         System.out.println("Invoking sayHi...");
         resp = port.sayHi();
@@ -87,9 +87,9 @@
             System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
             FaultDetail detail = ex.getFaultInfo();
             System.out.println("FaultDetail major:" + detail.getMajor());
-            System.out.println("FaultDetail minor:" + detail.getMinor());            
-        }          
-         
+            System.out.println("FaultDetail minor:" + detail.getMinor());
+        }
+
     }
 
 }

Modified: activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/provider/Client.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/provider/Client.java?rev=640450&r1=640449&r2=640450&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/provider/Client.java (original)
+++ activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/provider/Client.java Mon Mar 24 08:56:09 2008
@@ -35,7 +35,7 @@
 public final class Client {
 
     // The endpoint address of the service
-    String endpointAddress = null;
+    String endpointAddress;
 
     public Client(String endpointAddress) {
         this.endpointAddress = endpointAddress;

Modified: activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/provider/GreeterProvider.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/provider/GreeterProvider.java?rev=640450&r1=640449&r2=640450&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/provider/GreeterProvider.java (original)
+++ activemq/camel/trunk/examples/camel-example-cxf/src/main/java/org/apache/camel/example/cxf/provider/GreeterProvider.java Mon Mar 24 08:56:09 2008
@@ -18,25 +18,30 @@
 
 import javax.xml.soap.SOAPMessage;
 import javax.xml.ws.Provider;
+import javax.xml.ws.Service.Mode;
 import javax.xml.ws.ServiceMode;
 import javax.xml.ws.WebServiceProvider;
-import javax.xml.ws.Service.Mode;
+
+
+
 // START SNIPPET: e1
 @WebServiceProvider()
 @ServiceMode(Mode.MESSAGE)
 // END SNIPPET: e1
 /**
- * This class is used by Camel just for getting the endpoint configuration parameters. All the requests
- * aimed at this class would be intercepted routed to the camel route specified. The route has to set the
- * appropriate response message for the service to work.
+ * This class is used by Camel just for getting the endpoint configuration
+ * parameters. All the requests aimed at this class would be intercepted routed
+ * to the camel route specified. The route has to set the appropriate response
+ * message for the service to work.
  */
 // START SNIPPET: e2
 public class GreeterProvider implements Provider<SOAPMessage> {
 
-	public SOAPMessage invoke(SOAPMessage message) {
-		//request should not come here as camel route would intercept the call before this is invoked.
-		throw new UnsupportedOperationException("Placeholder method");
-	}
+    public SOAPMessage invoke(SOAPMessage message) {
+        // request should not come here as camel route would intercept the call
+        // before this is invoked.
+        throw new UnsupportedOperationException("Placeholder method");
+    }
 
 }
-//END SNIPPET: e2
+// END SNIPPET: e2

Modified: activemq/camel/trunk/examples/camel-example-docs/src/main/java/org/apache/camel/example/docs/ContentBasedRouteRoute.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-docs/src/main/java/org/apache/camel/example/docs/ContentBasedRouteRoute.java?rev=640450&r1=640449&r2=640450&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-docs/src/main/java/org/apache/camel/example/docs/ContentBasedRouteRoute.java (original)
+++ activemq/camel/trunk/examples/camel-example-docs/src/main/java/org/apache/camel/example/docs/ContentBasedRouteRoute.java Mon Mar 24 08:56:09 2008
@@ -1,5 +1,4 @@
 /**
- *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,

Modified: activemq/camel/trunk/examples/camel-example-docs/src/main/java/org/apache/camel/example/docs/MulticastRoute.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-docs/src/main/java/org/apache/camel/example/docs/MulticastRoute.java?rev=640450&r1=640449&r2=640450&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-docs/src/main/java/org/apache/camel/example/docs/MulticastRoute.java (original)
+++ activemq/camel/trunk/examples/camel-example-docs/src/main/java/org/apache/camel/example/docs/MulticastRoute.java Mon Mar 24 08:56:09 2008
@@ -1,5 +1,4 @@
 /**
- *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,

Modified: activemq/camel/trunk/examples/camel-example-docs/src/main/java/org/apache/camel/example/docs/PipelineRoute.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-docs/src/main/java/org/apache/camel/example/docs/PipelineRoute.java?rev=640450&r1=640449&r2=640450&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-docs/src/main/java/org/apache/camel/example/docs/PipelineRoute.java (original)
+++ activemq/camel/trunk/examples/camel-example-docs/src/main/java/org/apache/camel/example/docs/PipelineRoute.java Mon Mar 24 08:56:09 2008
@@ -1,5 +1,4 @@
 /**
- *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,

Modified: activemq/camel/trunk/examples/camel-example-docs/src/test/java/org/apache/camel/example/docs/IntegrationTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-docs/src/test/java/org/apache/camel/example/docs/IntegrationTest.java?rev=640450&r1=640449&r2=640450&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-docs/src/test/java/org/apache/camel/example/docs/IntegrationTest.java (original)
+++ activemq/camel/trunk/examples/camel-example-docs/src/test/java/org/apache/camel/example/docs/IntegrationTest.java Mon Mar 24 08:56:09 2008
@@ -1,5 +1,4 @@
 /**
- *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,

Modified: activemq/camel/trunk/examples/camel-example-osgi/src/main/java/org/apache/camel/example/osgi/MyTransform.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-osgi/src/main/java/org/apache/camel/example/osgi/MyTransform.java?rev=640450&r1=640449&r2=640450&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-osgi/src/main/java/org/apache/camel/example/osgi/MyTransform.java (original)
+++ activemq/camel/trunk/examples/camel-example-osgi/src/main/java/org/apache/camel/example/osgi/MyTransform.java Mon Mar 24 08:56:09 2008
@@ -1,5 +1,4 @@
 /**
- *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,7 +30,7 @@
     private String prefix = "MyTransform";
 
     public Object transform(Object body) {
-        String answer = prefix + " set body:  " + new Date() ;
+        String answer = prefix + " set body:  " + new Date();
         if (verbose) {
             System.out.println(">>>> " + answer);
         }

Modified: activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java?rev=640450&r1=640449&r2=640450&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java (original)
+++ activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java Mon Mar 24 08:56:09 2008
@@ -16,9 +16,6 @@
  */
 package org.apache.camel.example.spring;
 
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.Message;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.spring.Main;
 

Modified: activemq/camel/trunk/examples/camel-example-spring/src/test/java/org/apache/camel/example/spring/IntegrationTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring/src/test/java/org/apache/camel/example/spring/IntegrationTest.java?rev=640450&r1=640449&r2=640450&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring/src/test/java/org/apache/camel/example/spring/IntegrationTest.java (original)
+++ activemq/camel/trunk/examples/camel-example-spring/src/test/java/org/apache/camel/example/spring/IntegrationTest.java Mon Mar 24 08:56:09 2008
@@ -1,5 +1,4 @@
 /**
- *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,