activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r530514 - in /activemq/camel/trunk: camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/component/mock/ camel-core/src/main/java/org/apache/camel/processor/ camel-core/src/test/java/org/apache/camel/...
Date Thu, 19 Apr 2007 18:46:47 GMT
Author: jstrachan
Date: Thu Apr 19 11:46:46 2007
New Revision: 530514

URL: http://svn.apache.org/viewvc?view=rev&rev=530514
Log:
minor rename of DelegateProcess -> DelegateProcessor

Added:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DelegateProcessor.java
      - copied, changed from r530509, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DelegateProcess.java
Removed:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DelegateProcess.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/InterceptorBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/InterceptorBuilderTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyInterceptorProcessor.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java
    activemq/camel/trunk/camel-spring/src/main/java/org/apache/camel/spring/spi/SpringTransactionInterceptor.java
    activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/xml/XmlRouteBuilderTest.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=530514&r1=530513&r2=530514
==============================================================================
--- 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
Thu Apr 19 11:46:46 2007
@@ -22,7 +22,7 @@
 import org.apache.camel.Predicate;
 import org.apache.camel.Processor;
 import org.apache.camel.processor.CompositeProcessor;
-import org.apache.camel.processor.DelegateProcess;
+import org.apache.camel.processor.DelegateProcessor;
 import org.apache.camel.processor.MulticastProcessor;
 import org.apache.camel.processor.Pipeline;
 import org.apache.camel.processor.RecipientList;
@@ -241,7 +241,7 @@
     }
 
     @Fluent
-    public FromBuilder<E> intercept(@FluentArg("interceptor")DelegateProcess<E>
interceptor) {
+    public FromBuilder<E> intercept(@FluentArg("interceptor")DelegateProcessor<E>
interceptor) {
         InterceptorBuilder<E> answer = new InterceptorBuilder<E>(this);
         answer.add(interceptor);
         addProcessBuilder(answer);

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/InterceptorBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/InterceptorBuilder.java?view=diff&rev=530514&r1=530513&r2=530514
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/InterceptorBuilder.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/InterceptorBuilder.java
Thu Apr 19 11:46:46 2007
@@ -21,7 +21,7 @@
 import java.util.List;
 
 import org.apache.camel.Exchange;
-import org.apache.camel.processor.DelegateProcess;
+import org.apache.camel.processor.DelegateProcessor;
 import org.apache.camel.Processor;
 import org.apache.camel.RuntimeCamelException;
 
@@ -29,7 +29,7 @@
  * @version $Revision: 519943 $
  */
 public class InterceptorBuilder<E extends Exchange> implements ProcessorFactory<E>
{
-    private final List<DelegateProcess<E>> intercepts = new ArrayList<DelegateProcess<E>>();
+    private final List<DelegateProcessor<E>> intercepts = new ArrayList<DelegateProcessor<E>>();
 	private final FromBuilder<E> parent;
 	private FromBuilder<E> target;
 
@@ -38,7 +38,7 @@
 	}
 	
 	@Fluent("interceptor")
-	public InterceptorBuilder<E> add(@FluentArg("ref") DelegateProcess<E> interceptor)
{
+	public InterceptorBuilder<E> add(@FluentArg("ref") DelegateProcessor<E> interceptor)
{
 		intercepts.add(interceptor);
 		return this;
 	}
@@ -56,9 +56,9 @@
     		throw new RuntimeCamelException("target provided.");
     	
     	// Interceptors are optional
-    	DelegateProcess<E> first=null;
-    	DelegateProcess<E> last=null;
-        for (DelegateProcess<E> p : intercepts) {
+    	DelegateProcessor<E> first=null;
+    	DelegateProcessor<E> last=null;
+        for (DelegateProcessor<E> p : intercepts) {
             if( first == null ) {
             	first = p;
             }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java?view=diff&rev=530514&r1=530513&r2=530514
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
Thu Apr 19 11:46:46 2007
@@ -175,13 +175,6 @@
     }
 
     /**
-     * Adds the expection which will be invoked when enough messages are received
-     */
-    public void expects(Runnable runnable) {
-        tests.add(runnable);
-    }
-
-    /**
      * Adds an expectation that the given body values are received by this endpoint
      */
     public void expectedBodiesReceived(Object... bodies) {
@@ -191,6 +184,15 @@
         }
         expectedBodiesReceived(bodyList);
     }
+
+
+    /**
+     * Adds the expection which will be invoked when enough messages are received
+     */
+    public void expects(Runnable runnable) {
+        tests.add(runnable);
+    }
+    
 
     // Properties
     //-------------------------------------------------------------------------

Copied: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DelegateProcessor.java
(from r530509, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DelegateProcess.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DelegateProcessor.java?view=diff&rev=530514&p1=activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DelegateProcess.java&r1=530509&p2=activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DelegateProcessor.java&r2=530514
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DelegateProcess.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DelegateProcessor.java
Thu Apr 19 11:46:46 2007
@@ -28,13 +28,13 @@
  *
  * @version $Revision: 519941 $
  */
-public class DelegateProcess<E> extends ServiceSupport implements Processor<E>
{
+public class DelegateProcessor<E> extends ServiceSupport implements Processor<E>
{
     protected Processor<E> next;
 
-    public DelegateProcess() {
+    public DelegateProcessor() {
     }
 
-    public DelegateProcess(Processor<E> next) {
+    public DelegateProcessor(Processor<E> next) {
         this.next = next;
     }
 
@@ -50,7 +50,7 @@
 
     @Override
     public String toString() {
-        return "intercept(" + next + ")";
+        return "delegate(" + next + ")";
     }
 
     public Processor<E> getNext() {

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/InterceptorBuilderTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/InterceptorBuilderTest.java?view=diff&rev=530514&r1=530513&r2=530514
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/InterceptorBuilderTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/InterceptorBuilderTest.java
Thu Apr 19 11:46:46 2007
@@ -24,7 +24,7 @@
 import org.apache.camel.Producer;
 import org.apache.camel.TestSupport;
 import org.apache.camel.impl.DefaultCamelContext;
-import org.apache.camel.processor.DelegateProcess;
+import org.apache.camel.processor.DelegateProcessor;
 
 /**
  * @version $Revision: 530102 $
@@ -41,7 +41,7 @@
         CamelContext container = new DefaultCamelContext();
         final ArrayList<String> order = new ArrayList<String>();
 
-        final DelegateProcess<Exchange> interceptor1 = new DelegateProcess<Exchange>()
{
+        final DelegateProcessor<Exchange> interceptor1 = new DelegateProcessor<Exchange>()
{
         	@Override
         	public void process(Exchange exchange) {
         		order.add("START:1");
@@ -49,7 +49,7 @@
         		order.add("END:1");
         	}
         };
-        final DelegateProcess<Exchange> interceptor2 = new DelegateProcess<Exchange>()
{
+        final DelegateProcessor<Exchange> interceptor2 = new DelegateProcessor<Exchange>()
{
         	@Override
         	public void process(Exchange exchange) {
         		order.add("START:2");

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyInterceptorProcessor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyInterceptorProcessor.java?view=diff&rev=530514&r1=530513&r2=530514
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyInterceptorProcessor.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyInterceptorProcessor.java
Thu Apr 19 11:46:46 2007
@@ -4,9 +4,9 @@
 package org.apache.camel.builder;
 
 import org.apache.camel.Exchange;
-import org.apache.camel.processor.DelegateProcess;
+import org.apache.camel.processor.DelegateProcessor;
 
-public class MyInterceptorProcessor extends DelegateProcess<Exchange> {
+public class MyInterceptorProcessor extends DelegateProcessor<Exchange> {
 	public void process(Exchange exchange) {
 		System.out.println("START of onExchange: "+exchange);
 		next.process(exchange);

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java?view=diff&rev=530514&r1=530513&r2=530514
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java
Thu Apr 19 11:46:46 2007
@@ -24,7 +24,7 @@
 import org.apache.camel.processor.ChoiceProcessor;
 import org.apache.camel.processor.DeadLetterChannel;
 import org.apache.camel.processor.FilterProcessor;
-import org.apache.camel.processor.DelegateProcess;
+import org.apache.camel.processor.DelegateProcessor;
 import org.apache.camel.processor.MulticastProcessor;
 import org.apache.camel.processor.RecipientList;
 import org.apache.camel.processor.SendProcessor;
@@ -41,8 +41,8 @@
  */
 public class RouteBuilderTest extends TestSupport {
     protected Processor<Exchange> myProcessor = new MyProcessor();
-    protected DelegateProcess<Exchange> interceptor1;
-    protected DelegateProcess<Exchange> interceptor2;
+    protected DelegateProcessor<Exchange> interceptor1;
+    protected DelegateProcessor<Exchange> interceptor2;
 
     protected RouteBuilder<Exchange> buildSimpleRoute() {
         // START SNIPPET: e1
@@ -232,7 +232,7 @@
     }
 
     protected RouteBuilder<Exchange> buildRouteWithInterceptor() {
-        interceptor1 = new DelegateProcess<Exchange>() {
+        interceptor1 = new DelegateProcessor<Exchange>() {
         };
 
         // START SNIPPET: e7        
@@ -264,10 +264,10 @@
             assertEquals("From endpoint", "queue:a", key.getEndpointUri());
             Processor processor = getProcessorWithoutErrorHandler(route);
 
-            DelegateProcess<Exchange> p1 = assertIsInstanceOf(DelegateProcess.class,
processor);
+            DelegateProcessor<Exchange> p1 = assertIsInstanceOf(DelegateProcessor.class,
processor);
             processor = p1.getNext();
 
-            DelegateProcess<Exchange> p2 = assertIsInstanceOf(DelegateProcess.class,
processor);
+            DelegateProcessor<Exchange> p2 = assertIsInstanceOf(DelegateProcessor.class,
processor);
 
             assertSendTo(p2.getNext(), "queue:d");
         }

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java?view=diff&rev=530514&r1=530513&r2=530514
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java
Thu Apr 19 11:46:46 2007
@@ -17,14 +17,11 @@
  */
 package org.apache.camel.component.pojo;
 
-import java.util.concurrent.atomic.AtomicInteger;
-
 import junit.framework.TestCase;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.DefaultCamelContext;
-import org.apache.camel.processor.DelegateProcess;
 
 /**
  * @version $Revision: 520220 $

Modified: activemq/camel/trunk/camel-spring/src/main/java/org/apache/camel/spring/spi/SpringTransactionInterceptor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-spring/src/main/java/org/apache/camel/spring/spi/SpringTransactionInterceptor.java?view=diff&rev=530514&r1=530513&r2=530514
==============================================================================
--- activemq/camel/trunk/camel-spring/src/main/java/org/apache/camel/spring/spi/SpringTransactionInterceptor.java
(original)
+++ activemq/camel/trunk/camel-spring/src/main/java/org/apache/camel/spring/spi/SpringTransactionInterceptor.java
Thu Apr 19 11:46:46 2007
@@ -18,7 +18,7 @@
 package org.apache.camel.spring.spi;
 
 import org.apache.camel.Processor;
-import org.apache.camel.processor.DelegateProcess;
+import org.apache.camel.processor.DelegateProcessor;
 import org.apache.camel.spi.Interceptor;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -50,7 +50,7 @@
             return processor;
         }
 
-        return new DelegateProcess<E>(processor) {
+        return new DelegateProcessor<E>(processor) {
 
             public void process(final E exchange) {
                 transactionTemplate.execute(new TransactionCallbackWithoutResult() {

Modified: activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/xml/XmlRouteBuilderTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/xml/XmlRouteBuilderTest.java?view=diff&rev=530514&r1=530513&r2=530514
==============================================================================
--- activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/xml/XmlRouteBuilderTest.java
(original)
+++ activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/xml/XmlRouteBuilderTest.java
Thu Apr 19 11:46:46 2007
@@ -20,7 +20,7 @@
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.builder.RouteBuilderTest;
-import org.apache.camel.processor.DelegateProcess;
+import org.apache.camel.processor.DelegateProcessor;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 /**
@@ -70,8 +70,8 @@
 	
 	@Override
 	protected RouteBuilder<Exchange> buildRouteWithInterceptor() {
-		interceptor1 = (DelegateProcess<Exchange>) ctx.getBean("interceptor1");
-		interceptor2 = (DelegateProcess<Exchange>) ctx.getBean("interceptor2");
+		interceptor1 = (DelegateProcessor<Exchange>) ctx.getBean("interceptor1");
+		interceptor2 = (DelegateProcessor<Exchange>) ctx.getBean("interceptor2");
 		RouteBuilder<Exchange> builder = (RouteBuilder<Exchange>) ctx.getBean("buildRouteWithInterceptor");
 		assertNotNull(builder);
 		return builder;



Mime
View raw message