camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r720765 - in /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model: AggregatorType.java ExceptionType.java IdempotentConsumerType.java ProceedType.java ResequencerType.java
Date Wed, 26 Nov 2008 08:30:04 GMT
Author: davsclaus
Date: Wed Nov 26 00:30:04 2008
New Revision: 720765

URL: http://svn.apache.org/viewvc?rev=720765&view=rev
Log:
CAMEL-1116: Added javadoc for fluent builders. Added missing collectionRef builder to aggregator.

Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregatorType.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ExceptionType.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/IdempotentConsumerType.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProceedType.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ResequencerType.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregatorType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregatorType.java?rev=720765&r1=720764&r2=720765&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregatorType.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregatorType.java
Wed Nov 26 00:30:04 2008
@@ -269,6 +269,14 @@
         this.strategyRef = strategyRef;
     }
 
+    public String getCollectionRef() {
+        return collectionRef;
+    }
+
+    public void setCollectionRef(String collectionRef) {
+        this.collectionRef = collectionRef;
+    }
+
     public void setCompletedPredicate(ExpressionSubElementType completedPredicate) {
         this.completedPredicate = completedPredicate;
     }
@@ -336,6 +344,17 @@
     }
 
     /**
+     * Sets the aggegate collection to use
+     *
+     * @param collectionRef  reference to the aggregate collection to lookup in the registry
+     * @return the builder
+     */
+    public AggregatorType collectionRef(String collectionRef) {
+        setCollectionRef(collectionRef);
+        return this;
+    }
+
+    /**
      * Sets the aggegate strategy to use
      *
      * @param strategyRef  reference to the strategy to lookup in the registry

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ExceptionType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ExceptionType.java?rev=720765&r1=720764&r2=720765&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ExceptionType.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ExceptionType.java
Wed Nov 26 00:30:04 2008
@@ -85,12 +85,6 @@
         return "Exception[" + getExceptionClasses() + (onWhen != null ? " " + onWhen : "")
+ " -> " + getOutputs() + "]";
     }
     
-    @Override
-    public ExceptionType onException(Class exceptionType) {
-        getExceptionClasses().add(exceptionType);
-        return this;
-    }
-    
     /**
      * Allows an exception handler to create a new redelivery policy for this exception type
      * @param context the camel context
@@ -127,6 +121,13 @@
 
     // Fluent API
     //-------------------------------------------------------------------------
+
+    @Override
+    public ExceptionType onException(Class exceptionType) {
+        getExceptionClasses().add(exceptionType);
+        return this;
+    }
+
     /**
      * Sets wether the exchange should be marked as handled or not.
      *

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/IdempotentConsumerType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/IdempotentConsumerType.java?rev=720765&r1=720764&r2=720765&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/IdempotentConsumerType.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/IdempotentConsumerType.java
Wed Nov 26 00:30:04 2008
@@ -83,7 +83,13 @@
                                       childProcessor);
     }
 
-    public MessageIdRepository resolveMessageIdRepository(RouteContext routeContext) {
+    /**
+     * Strategy method to resolve the {@link org.apache.camel.processor.idempotent.MessageIdRepository}
to use
+     *
+     * @param routeContext  route context
+     * @return the repository
+     */
+    protected MessageIdRepository resolveMessageIdRepository(RouteContext routeContext) {
         if (messageIdRepository == null) {
             messageIdRepository = routeContext.lookup(messageIdRepositoryRef, MessageIdRepository.class);
         }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProceedType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProceedType.java?rev=720765&r1=720764&r2=720765&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProceedType.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProceedType.java
Wed Nov 26 00:30:04 2008
@@ -37,9 +37,7 @@
         return "proceed";
     }
 
-    // TODO we should be just returning the outputs!
     public Processor createProcessor(RouteContext routeContext) throws Exception {
-        //return routeContext.createProceedProcessor();
         return createOutputsProcessor(routeContext);
     }
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ResequencerType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ResequencerType.java?rev=720765&r1=720764&r2=720765&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ResequencerType.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ResequencerType.java
Wed Nov 26 00:30:04 2008
@@ -282,7 +282,7 @@
     }
 
     private Route<? extends Exchange> createBatchResequencerRoute(RouteContext routeContext)
throws Exception {
-        // TODO: No used should it be removed?
+        // TODO: Not used should it be removed?
         final Resequencer resequencer = createBatchResequencer(routeContext, batchConfig);
         return new Route(routeContext.getEndpoint(), resequencer) {
             @Override
@@ -293,7 +293,7 @@
     }
     
     private Route<? extends Exchange> createStreamResequencerRoute(RouteContext routeContext)
throws Exception {
-        // TODO: No used should it be removed?
+        // TODO: Not used should it be removed?
         final StreamResequencer resequencer = createStreamResequencer(routeContext, streamConfig);
         return new Route(routeContext.getEndpoint(), resequencer) {
             @Override



Mime
View raw message