activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r531996 - in /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder: ExpressionFactory.java FromBuilder.java RecipientListBuilder.java ValueBuilder.java
Date Tue, 24 Apr 2007 16:13:33 GMT
Author: jstrachan
Date: Tue Apr 24 09:13:32 2007
New Revision: 531996

URL: http://svn.apache.org/viewvc?view=rev&rev=531996
Log:
zapped the ExpressionFactory interface which generally caused complications on the DSL APIs
and didn't add much value

Removed:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionFactory.java
Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FromBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/RecipientListBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ValueBuilder.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FromBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FromBuilder.java?view=diff&rev=531996&r1=531995&r2=531996
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FromBuilder.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FromBuilder.java
Tue Apr 24 09:13:32 2007
@@ -138,13 +138,6 @@
     }
 
     /**
-     * Creates an {@link IdempotentConsumer} to avoid duplicate messages
-     */
-    public IdempotentConsumerBuilder<E> idempotentConsumer(ExpressionFactory<E>
messageIdExpressionFactory, MessageIdRepository messageIdRepository) {
-        return idempotentConsumer(messageIdExpressionFactory.createExpression(), messageIdRepository);
-    }
-
-    /**
      * Creates a predicate which is applied and only if it is true then
      * the exchange is forwarded to the destination
      *
@@ -271,14 +264,6 @@
     public FromBuilder<E> setBody(Expression<E> expression) {
         addProcessorBuilder(ProcessorBuilder.setBody(expression));
         return this;
-    }
-
-    /**
-     * Adds a processor which sets the body on the IN message
-     */
-    @Fluent
-    public FromBuilder<E> setBody(ExpressionFactory<E> expressionFactory) {
-        return setBody(expressionFactory.createExpression());
     }
 
     /**

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/RecipientListBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/RecipientListBuilder.java?view=diff&rev=531996&r1=531995&r2=531996
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/RecipientListBuilder.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/RecipientListBuilder.java
Tue Apr 24 09:13:32 2007
@@ -28,15 +28,15 @@
  * @version $Revision$
  */
 public class RecipientListBuilder<E extends Exchange> extends BuilderSupport<E>
implements ProcessorFactory<E> {
-    private final ExpressionFactory<E> expressionFactory;
+    private final Expression<E> expression;
 
-    public RecipientListBuilder(FromBuilder<E> parent, ExpressionFactory<E> expressionFactory)
{
+
+    public RecipientListBuilder(FromBuilder<E> parent, Expression<E> expression)
{
         super(parent);
-        this.expressionFactory = expressionFactory;
+        this.expression = expression;
     }
 
     public Processor<E> createProcessor() {
-        Expression<E> expression = expressionFactory.createExpression();
         return new RecipientList<E>(expression);
     }
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ValueBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ValueBuilder.java?view=diff&rev=531996&r1=531995&r2=531996
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ValueBuilder.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ValueBuilder.java
Tue Apr 24 09:13:32 2007
@@ -25,8 +25,7 @@
  *
  * @version $Revision: $
  */
-//public class ValueBuilder<E extends Exchange> implements Expression<E>, ExpressionFactory<E>
{
-public class ValueBuilder<E extends Exchange> implements ExpressionFactory<E>
{
+public class ValueBuilder<E extends Exchange> implements Expression<E> {
     private Expression<E> expression;
 
     public ValueBuilder(Expression<E> expression) {
@@ -41,10 +40,6 @@
         return expression;
     }
 
-    public Expression<E> createExpression() {
-        return expression;
-    }
-
     // Predicate builders
     //-------------------------------------------------------------------------
 
@@ -205,10 +200,6 @@
     protected Expression<E> asExpression(Object value) {
         if (value instanceof Expression) {
             return (Expression<E>) value;
-        }
-        else if (value instanceof ExpressionFactory) {
-            ExpressionFactory expressionFactory = (ExpressionFactory) value;
-            return expressionFactory.createExpression();
         }
         else {
             return ExpressionBuilder.constantExpression(value);



Mime
View raw message