svn commit: r642763 - in /activemq/camel/trunk/components/camel-cxf/src: main/java/org/apache/camel/component/cxf/ main/java/org/apache/camel/component/cxf/interceptors/ main/java/org/apache/camel/component/cxf/invoker/ main/java/org/apache/camel/compo...

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r642763 - in /activemq/camel/trunk/components/camel-cxf/src: main/java/org/apache/camel/component/cxf/ main/java/org/apache/camel/component/cxf/interceptors/ main/java/org/apache/camel/component/cxf/invoker/ main/java/org/apache/camel/compo...

davsclaus-2
Author: davsclaus
Date: Sun Mar 30 09:01:47 2008
New Revision: 642763

URL: http://svn.apache.org/viewvc?rev=642763&view=rev
Log:
CAMEL-404 fixed javadoc warnings (camel-cxf)

Modified:
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CamelInvoker.java
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/MessageInvoker.java
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/interceptors/AbstractMessageInInterceptor.java
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/invoker/InvokingContext.java
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java
    activemq/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelDestinationTest.java

Modified: activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CamelInvoker.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CamelInvoker.java?rev=642763&r1=642762&r2=642763&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CamelInvoker.java (original)
+++ activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CamelInvoker.java Sun Mar 30 09:01:47 2008
@@ -24,7 +24,6 @@
 import java.util.logging.Logger;
 
 import org.apache.camel.ExchangePattern;
-import org.apache.cxf.binding.soap.SoapFault;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.frontend.MethodDispatcher;
 import org.apache.cxf.helpers.CastUtils;
@@ -49,13 +48,12 @@
     * This method is called when the incoming message is to
     * be passed into the camel processor. The return value is the response
     * from the processor
-    * @param inMessage
     */
     public void invoke(Exchange exchange) {
         Message inMessage = exchange.getInMessage();
 
         //TODO set the request context here
-        CxfEndpoint endpoint = (CxfEndpoint) cxfConsumer.getEndpoint();
+        CxfEndpoint endpoint = cxfConsumer.getEndpoint();
         CxfExchange cxfExchange = endpoint.createExchange(inMessage);
         try {
             cxfConsumer.getProcessor().process(cxfExchange);
@@ -124,22 +122,16 @@
      * This method is called when the incoming pojo or WebServiceProvider invocation is called
      * from the service invocation interceptor. The return value is the response
      * from the processor
-     * @param inMessage
-     * @return outMessage
      */
     public Object invoke(Exchange exchange, Object o) {
-
-        CxfEndpoint endpoint = (CxfEndpoint) cxfConsumer.getEndpoint();
+        CxfEndpoint endpoint = cxfConsumer.getEndpoint();
 
         Object params = null;
-
-
         if (o instanceof List) {
             params = CastUtils.cast((List<?>)o);
         } else if (o != null) {
             params = new MessageContentsList(o);
         }
-
 
         CxfExchange cxfExchange = endpoint.createExchange(exchange.getInMessage());
 

Modified: activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/MessageInvoker.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/MessageInvoker.java?rev=642763&r1=642762&r2=642763&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/MessageInvoker.java (original)
+++ activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/MessageInvoker.java Sun Mar 30 09:01:47 2008
@@ -28,7 +28,7 @@
      * This method is called when the incoming message is to be passed into the
      * camel processor. The return value is the response from the processor
      *
-     * @param the cxf exchange which holds the in and out message
+     * @param exchange the cxf exchange which holds the in and out message
      */
     void invoke(Exchange exchange);
 

Modified: activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/interceptors/AbstractMessageInInterceptor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/interceptors/AbstractMessageInInterceptor.java?rev=642763&r1=642762&r2=642763&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/interceptors/AbstractMessageInInterceptor.java (original)
+++ activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/interceptors/AbstractMessageInInterceptor.java Sun Mar 30 09:01:47 2008
@@ -58,8 +58,6 @@
         return Boolean.TRUE.equals(message.get(Message.REQUESTOR_ROLE));
     }
 
-  
-
     /**
      * Infer the OperationInfo from the XML Document and get the list of
      * parts as DOM Element
@@ -127,8 +125,6 @@
     /**
      * This method is called to convert a incoming message format e.g Stax Stream
      * to a DOM Tree. Default Implementation converts Stax Stream to a DOM
-     * @param inMessage
-     * @param Document
      */
     protected Document createDOMMessage(T message) {
         Document doc = null;
@@ -148,8 +144,6 @@
 
     /**
      * This method is called on incoming to check if it is a fault.
-     * @param inMessage
-     * @param boolean
      */
     protected abstract boolean isFaultMessage(T message);
 
@@ -157,19 +151,13 @@
      * This method is called when the routing message interceptor has received a inbound message
      * It infers the binding operation by matching the root Element with a binding operation
      * from the service model.
-     * @param inMessage
-     * @param resultPayload
      */
     protected abstract BindingOperationInfo getBindingOperation(T inMessage, Document document);
 
     /**
      * This method is called when the routing message interceptor has intercepted a inbound
      * message as a DOM Content.  It retreives the message parts as DOM Element
-     * and returns a List<Element>
-     * @param inMessage
-     * @param rootElement
-     * @param bindingMessageInfo
-     * @return List<Element>
+     * and returns a List of Element.
      */
     protected abstract List<Element> getPartList(T inMessage, Element rootElement, BindingMessageInfo boi);
 
@@ -177,8 +165,6 @@
      * This method is called when the routing message interceptor has intercepted a inbound
      * message as a DOM Content.  It retreives the header parts as DOM Element
      * and returns a Element.
-     * @param inMessage
-     * @return Element
      */
     protected abstract Element getHeader(T inMessage);
 

Modified: activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/invoker/InvokingContext.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/invoker/InvokingContext.java?rev=642763&r1=642762&r2=642763&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/invoker/InvokingContext.java (original)
+++ activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/invoker/InvokingContext.java Sun Mar 30 09:01:47 2008
@@ -27,16 +27,12 @@
      * This method is called when the router is preparing an outbound message
      * (orignated from the router's client) to be sent to the target CXF server.
      * It sets the content in the given (out) message object.
-     * @param content
      */
     void setRequestOutMessageContent(Message message, Map<Class, Object> contents);
 
     /**
      * This method is call when the CxfClient receives a response from a CXF server and needs
      * to extract the response object from the message.
-     * @param exchange
-     * @param responseContext
-     * @return response object
      */
     Object getResponseObject(Exchange exchange, Map<String, Object> responseContext);
 
@@ -44,8 +40,6 @@
      * This method is called when the routing interceptor has received a response message
      * from the target CXF server and needs to set the response in the outgoing message
      * that is to be sent to the client.
-     * @param outMessage
-     * @param resultPayload
      */
     void setResponseContent(Message outMessage, Object resultPayload);
 
@@ -53,8 +47,6 @@
      * This method is called when the routing interceptor has intercepted a message from
      * the client and needs to extract the request content from the message.  It retreives
      * and receives the request content from the incoming message.
-     * @param inMessage
-     * @return the request contents from client
      */
     Map<Class, Object> getRequestContent(Message inMessage);
 

Modified: activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java?rev=642763&r1=642762&r2=642763&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java (original)
+++ activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java Sun Mar 30 09:01:47 2008
@@ -24,6 +24,7 @@
 import org.apache.camel.CamelContext;
 import org.apache.camel.CamelTemplate;
 import org.apache.camel.Consumer;
+import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.component.cxf.CxfConstants;
@@ -56,7 +57,7 @@
     Consumer consumer;
     String camelDestinationUri;
     private CamelTemplate<Exchange> camelTemplate;
-    private org.apache.camel.Endpoint distinationEndpoint;
+    private Endpoint distinationEndpoint;
 
     public CamelDestination(CamelContext camelContext, Bus bus, ConduitInitiator ci, EndpointInfo info) throws IOException {
         super(bus, getTargetReference(info, bus), info);
@@ -92,7 +93,8 @@
             consumer.start();
 
         } catch (Exception ex) {
-            getLogger().log(Level.SEVERE, "Camel connect failed with EException : ", ex);
+            // TODO: Is it okay just to log severe errors such as this?
+            getLogger().log(Level.SEVERE, "Camel connect failed with Exception : ", ex);
         }
     }
 
@@ -100,8 +102,8 @@
         try {
             consumer.stop();
         } catch (Exception e) {
-            // TODO need to handle the exception somewhere
-            e.printStackTrace();
+            // TODO: Is it okay just to log severe errors such as this?
+            getLogger().log(Level.SEVERE, "Camel stop failed with Exception : ", e);
         }
     }
 
@@ -217,8 +219,8 @@
      * Mark message as a partial message.
      *
      * @param partialResponse the partial response message
-     * @param the decoupled target
-     * @return true iff partial responses are supported
+     * @param decoupledTarget the decoupled target
+     * @return <tt>true</tt> if partial responses is supported
      */
     protected boolean markPartialResponse(Message partialResponse,
                                        EndpointReferenceType decoupledTarget) {

Modified: activemq/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelDestinationTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelDestinationTest.java?rev=642763&r1=642762&r2=642763&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelDestinationTest.java (original)
+++ activemq/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelDestinationTest.java Sun Mar 30 09:01:47 2008
@@ -66,7 +66,7 @@
         endpointInfo.setName(testEndpointQName);
         CamelDestination destination = new CamelDestination(null, bus, null, endpointInfo);
 
-        System.out.println("get the destination bean name" + destination.getBeanName());
+        assertEquals("{http://activemq.apache.org/camel-test}port.camel-destination", destination.getBeanName());
         CamelContext context = destination.getCamelContext();
 
         assertNotNull("The camel context which get from camel destination is not null", context);