activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r520320 - in /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel: SendProcessor.java builder/DestinationBuilder.java impl/DefaultEndpoint.java
Date Tue, 20 Mar 2007 08:28:25 GMT
Author: chirino
Date: Tue Mar 20 01:28:24 2007
New Revision: 520320

URL: http://svn.apache.org/viewvc?view=rev&rev=520320
Log:
Small enhancements

Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/SendProcessor.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DestinationBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/SendProcessor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/SendProcessor.java?view=diff&rev=520320&r1=520319&r2=520320
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/SendProcessor.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/SendProcessor.java Tue
Mar 20 01:28:24 2007
@@ -28,7 +28,7 @@
     }
 
     public void onExchange(E exchange) {
-        destination.send(exchange);
+        destination.onExchange(exchange);
     }
 
     public Endpoint<E> getDestination() {

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DestinationBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DestinationBuilder.java?view=diff&rev=520320&r1=520319&r2=520320
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DestinationBuilder.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DestinationBuilder.java
Tue Mar 20 01:28:24 2007
@@ -19,6 +19,7 @@
 import org.apache.camel.CompositeProcessor;
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
+import org.apache.camel.InterceptorProcessor;
 import org.apache.camel.Predicate;
 import org.apache.camel.Processor;
 
@@ -169,6 +170,13 @@
 
 	public InterceptorBuilder<E> intercept() {
 		InterceptorBuilder<E> answer = new InterceptorBuilder<E>(this);
+        addProcessBuilder(answer);
+        return answer;
+	}
+	
+	public InterceptorBuilder<E> intercept(InterceptorProcessor<E> interceptor)
{
+		InterceptorBuilder<E> answer = new InterceptorBuilder<E>(this);
+		answer.add(interceptor);
         addProcessBuilder(answer);
         return answer;
 	}

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java?view=diff&rev=520320&r1=520319&r2=520320
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
Tue Mar 20 01:28:24 2007
@@ -31,8 +31,8 @@
     private String endpointUri;
     private CamelContainer container;
     private Processor<E> inboundProcessor;
-    private AtomicBoolean activated = new AtomicBoolean(false);
-    private AtomicBoolean deactivated = new AtomicBoolean(false);
+    protected AtomicBoolean activated = new AtomicBoolean(false);
+    protected AtomicBoolean deactivated = new AtomicBoolean(false);
 
     protected DefaultEndpoint(String endpointUri, CamelContainer container) {
         this.endpointUri = endpointUri;
@@ -79,6 +79,7 @@
 
     public void activate(Processor<E> inboundProcessor) {
         if (activated.compareAndSet(false, true)) {
+            deactivated.set(false);
         	this.inboundProcessor = inboundProcessor;
             doActivate();
         } else {
@@ -87,6 +88,7 @@
     }
     public void deactivate() {
         if (deactivated.compareAndSet(false, true)) {
+            activated.set(false);
             doDeactivate();
         }
     }



Mime
View raw message