activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r534145 [1/3] - in /activemq/camel/trunk: camel-core/src/main/java/org/apache/camel/ camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/builder/xml/ camel-core/src/main/java/org/apache/camel/compone...
Date Tue, 01 May 2007 16:23:54 GMT
Author: jstrachan
Date: Tue May  1 09:23:37 2007
New Revision: 534145

URL: http://svn.apache.org/viewvc?view=rev&rev=534145
Log:
removed the generics from the Process interface so that it must take an Exchange parameter to avoid ClassCastException when sending any old Exchange into an Endpoint<FooExchange>

Added:
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MyExchange.java   (with props)
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/ProducerTest.java   (with props)
Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelClient.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Endpoint.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Processor.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Producer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Route.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ConstantProcessorBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DeadLetterChannelBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ErrorHandlerBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FilterBuilder.java
    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/IdempotentConsumerBuilder.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/builder/LoggingErrorHandlerBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/MulticastBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/NoErrorHandlerBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/PipelineBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/PolicyBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProcessorBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProcessorFactory.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/SplitterBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ToBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/direct/DirectEndpoint.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileProducer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/pojo/PojoEndpoint.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/pojo/timer/TimerConsumer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/pojo/timer/TimerEndpoint.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/processor/ProcessorEndpoint.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/processor/ProcessorEndpointConsumer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/queue/QueueEndpoint.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/queue/QueueEndpointConsumer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultConsumer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/NoPolicy.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingConsumer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ChoiceProcessor.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/CompositeProcessor.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DelegateProcessor.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ErrorHandler.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/FilterProcessor.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Logger.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/LoggingErrorHandler.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Pipeline.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RecipientList.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/SendProcessor.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Splitter.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/idempotent/IdempotentConsumer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/LoadBalancer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/LoadBalancerSupport.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/QueueLoadBalancer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/RandomLoadBalancer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/RoundRobinLoadBalancer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/StickyLoadBalancer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/TopicLoadBalancer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/spi/Policy.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ProducerCache.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.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/MyProcessor.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/direct/DirectRouteTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileRouteTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/queue/QueueRouteTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ChoiceTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/FilterTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/IdempotentConsumerTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/JoinRoutesTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MulticastTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TransformTest.java
    activemq/camel/trunk/camel-cxf/pom.xml
    activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
    activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
    activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfInvokeConsumer.java
    activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfInvokeEndpoint.java
    activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfInvokeProducer.java
    activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
    activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/transport/CamelConduit.java
    activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java
    activemq/camel/trunk/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfInvokeTest.java
    activemq/camel/trunk/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfTest.java
    activemq/camel/trunk/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
    activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/CamelJbiComponent.java
    activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/CamelJbiEndpoint.java
    activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/FromJbiProcessor.java
    activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiEndpoint.java
    activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/ToJbiProcessor.java
    activemq/camel/trunk/camel-jbi/src/test/java/org/apache/camel/component/jbi/JbiTestSupport.java
    activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/EndpointMessageListener.java
    activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
    activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConsumer.java
    activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
    activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java
    activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/MessageListenerProcessor.java
    activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteTest.java
    activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/TransactedJmsRouteTest.java
    activemq/camel/trunk/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
    activemq/camel/trunk/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaEndpoint.java
    activemq/camel/trunk/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaTest.java
    activemq/camel/trunk/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java
    activemq/camel/trunk/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
    activemq/camel/trunk/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
    activemq/camel/trunk/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java
    activemq/camel/trunk/camel-mail/src/main/java/org/apache/camel/component/mail/MailProducer.java
    activemq/camel/trunk/camel-mail/src/test/java/org/apache/camel/component/mail/MailRouteTest.java
    activemq/camel/trunk/camel-mina/src/main/java/org/apache/camel/component/mina/MinaConsumer.java
    activemq/camel/trunk/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpoint.java
    activemq/camel/trunk/camel-mina/src/main/java/org/apache/camel/component/mina/MinaProducer.java
    activemq/camel/trunk/camel-mina/src/test/java/org/apache/camel/component/mina/MinaVmTest.java
    activemq/camel/trunk/camel-rmi/src/main/java/org/apache/camel/component/rmi/RmiConsumer.java
    activemq/camel/trunk/camel-rmi/src/main/java/org/apache/camel/component/rmi/RmiEndpoint.java
    activemq/camel/trunk/camel-rmi/src/main/java/org/apache/camel/component/rmi/RmiProducer.java
    activemq/camel/trunk/camel-script/src/main/java/org/apache/camel/builder/script/ScriptBuilder.java
    activemq/camel/trunk/camel-spring/src/main/java/org/apache/camel/spring/spi/SpringTransactionPolicy.java
    activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/CustomProcessorWithNamespacesTest.java
    activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/RoutingUsingCamelContextFactoryTest.java
    activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/example/MyProcessor.java
    activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/xml/XmlRouteBuilderTest.java
    activemq/camel/trunk/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppBinding.java
    activemq/camel/trunk/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConsumer.java
    activemq/camel/trunk/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java
    activemq/camel/trunk/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppGroupChatProducer.java
    activemq/camel/trunk/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppPrivateChatProducer.java
    activemq/camel/trunk/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRouteTest.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelClient.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelClient.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelClient.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelClient.java Tue May  1 09:23:37 2007
@@ -58,7 +58,7 @@
      * @param endpointUri the endpoint URI to send the exchange to
      * @param processor the transformer used to populate the new exchange
      */
-    public E send(String endpointUri, Processor<E> processor) {
+    public E send(String endpointUri, Processor processor) {
         Endpoint endpoint = resolveMandatoryEndpoint(endpointUri);
         return send(endpoint,  processor);
     }
@@ -70,7 +70,8 @@
      * @param exchange the exchange to send
      */
     public E send(Endpoint<E> endpoint, E exchange) {
-        producerCache.send(endpoint, exchange);
+        E convertedExchange = endpoint.toExchangeType(exchange);
+        producerCache.send(endpoint, convertedExchange);
         return exchange;
     }
 
@@ -80,7 +81,7 @@
      * @param endpoint the endpoint to send the exchange to
      * @param processor the transformer used to populate the new exchange
      */
-    public E send(Endpoint<E> endpoint, Processor<E> processor) {
+    public E send(Endpoint<E> endpoint, Processor processor) {
         return producerCache.send(endpoint, processor);
     }
 

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Endpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Endpoint.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Endpoint.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Endpoint.java Tue May  1 09:23:37 2007
@@ -48,7 +48,12 @@
      * Creates a new exchange for communicating with this exchange using the given exchange to pre-populate the values
      * of the headers and messages
      */
-    E createExchange(E exchange);
+    E createExchange(Exchange exchange);
+
+    /**
+     * Converts the given exchange to this endpoints required type
+     */
+    E toExchangeType(Exchange exchange);
 
     /**
      * Returns the context which created the endpoint
@@ -69,6 +74,5 @@
      *
      * @return a newly created consumer
      */
-    Consumer<E> createConsumer(Processor<E> processor) throws Exception;
-
+    Consumer<E> createConsumer(Processor processor) throws Exception;
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Processor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Processor.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Processor.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Processor.java Tue May  1 09:23:37 2007
@@ -25,12 +25,12 @@
  *
  * @version $Revision$
  */
-public interface Processor<E> {
+public interface Processor {
 
     /**
      * Processes the message exchange
      * 
      * @throws Exception if an internal processing error has occurred. 
      */
-    void process(E exchange) throws Exception;
+    void process(Exchange exchange) throws Exception;
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Producer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Producer.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Producer.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Producer.java Tue May  1 09:23:37 2007
@@ -22,7 +22,8 @@
  *
  * @version $Revision$
  */
-public interface Producer<E extends Exchange> extends Processor<E>, Service {
+public interface Producer<E extends Exchange> extends Processor, Service {
+
     Endpoint<E> getEndpoint();
 
     /**

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Route.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Route.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Route.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Route.java Tue May  1 09:23:37 2007
@@ -31,9 +31,9 @@
 
 	private final Map<String, Object> properties = new HashMap<String, Object>(16);
 	private Endpoint<E> endpoint;
-	private Processor<E> processor;
+	private Processor processor;
 
-	public Route(Endpoint<E> endpoint, Processor<E> processor) {
+	public Route(Endpoint<E> endpoint, Processor processor) {
 		this.endpoint = endpoint;
 		this.processor = processor;
 	}
@@ -51,11 +51,11 @@
 		this.endpoint = endpoint;
 	}
 
-	public Processor<E> getProcessor() {
+	public Processor getProcessor() {
 		return processor;
 	}
 
-	public void setProcessor(Processor<E> processor) {
+	public void setProcessor(Processor processor) {
 		this.processor = processor;
 	}
 

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ConstantProcessorBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ConstantProcessorBuilder.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ConstantProcessorBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ConstantProcessorBuilder.java Tue May  1 09:23:37 2007
@@ -23,14 +23,14 @@
 /**
  * @version $Revision$
  */
-public class ConstantProcessorBuilder<E extends Exchange> implements ProcessorFactory<E> {
-    private Processor<E> processor;
+public class ConstantProcessorBuilder implements ProcessorFactory {
+    private Processor processor;
 
-    public ConstantProcessorBuilder(Processor<E> processor) {
+    public ConstantProcessorBuilder(Processor processor) {
         this.processor = processor;
     }
 
-    public Processor<E> createProcessor() {
+    public Processor createProcessor() {
         return processor;
     }
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DeadLetterChannelBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DeadLetterChannelBuilder.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DeadLetterChannelBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DeadLetterChannelBuilder.java Tue May  1 09:23:37 2007
@@ -33,64 +33,64 @@
  *
  * @version $Revision$
  */
-public class DeadLetterChannelBuilder<E extends Exchange> implements ErrorHandlerBuilder<E> {
+public class DeadLetterChannelBuilder implements ErrorHandlerBuilder {
     private RedeliveryPolicy redeliveryPolicy = new RedeliveryPolicy();
-    private ProcessorFactory<E> deadLetterFactory;
-    private Processor<E> defaultDeadLetterEndpoint;
-    private Expression<E> defaultDeadLetterEndpointExpression;
+    private ProcessorFactory deadLetterFactory;
+    private Processor defaultDeadLetterEndpoint;
+    private Expression defaultDeadLetterEndpointExpression;
     private String defaultDeadLetterEndpointUri = "log:org.apache.camel.DeadLetterChannel:error";
-    private Logger<E> logger = DeadLetterChannel.createDefaultLogger();
+    private Logger logger = DeadLetterChannel.createDefaultLogger();
 
     public DeadLetterChannelBuilder() {
     }
 
-    public DeadLetterChannelBuilder(Processor<E> processor) {
-        this(new ConstantProcessorBuilder<E>(processor));
+    public DeadLetterChannelBuilder(Processor processor) {
+        this(new ConstantProcessorBuilder(processor));
     }
 
-    public DeadLetterChannelBuilder(ProcessorFactory<E> deadLetterFactory) {
+    public DeadLetterChannelBuilder(ProcessorFactory deadLetterFactory) {
         this.deadLetterFactory = deadLetterFactory;
     }
 
-    public ErrorHandlerBuilder<E> copy() {
-        DeadLetterChannelBuilder<E> answer = new DeadLetterChannelBuilder<E>(deadLetterFactory);
+    public ErrorHandlerBuilder copy() {
+        DeadLetterChannelBuilder answer = new DeadLetterChannelBuilder(deadLetterFactory);
         answer.setRedeliveryPolicy(getRedeliveryPolicy().copy());
         return answer;
     }
 
-    public Processor<E> createErrorHandler(Processor<E> processor) throws Exception {
-        Processor<E> deadLetter = getDeadLetterFactory().createProcessor();
-        return new DeadLetterChannel<E>(processor, deadLetter, getRedeliveryPolicy(), getLogger());
+    public Processor createErrorHandler(Processor processor) throws Exception {
+        Processor deadLetter = getDeadLetterFactory().createProcessor();
+        return new DeadLetterChannel(processor, deadLetter, getRedeliveryPolicy(), getLogger());
     }
 
     // Builder methods
     //-------------------------------------------------------------------------
-    public DeadLetterChannelBuilder<E> backOffMultiplier(double backOffMultiplier) {
+    public DeadLetterChannelBuilder backOffMultiplier(double backOffMultiplier) {
         getRedeliveryPolicy().backOffMultiplier(backOffMultiplier);
         return this;
     }
 
-    public DeadLetterChannelBuilder<E> collisionAvoidancePercent(short collisionAvoidancePercent) {
+    public DeadLetterChannelBuilder collisionAvoidancePercent(short collisionAvoidancePercent) {
         getRedeliveryPolicy().collisionAvoidancePercent(collisionAvoidancePercent);
         return this;
     }
 
-    public DeadLetterChannelBuilder<E> initialRedeliveryDelay(long initialRedeliveryDelay) {
+    public DeadLetterChannelBuilder initialRedeliveryDelay(long initialRedeliveryDelay) {
         getRedeliveryPolicy().initialRedeliveryDelay(initialRedeliveryDelay);
         return this;
     }
 
-    public DeadLetterChannelBuilder<E> maximumRedeliveries(int maximumRedeliveries) {
+    public DeadLetterChannelBuilder maximumRedeliveries(int maximumRedeliveries) {
         getRedeliveryPolicy().maximumRedeliveries(maximumRedeliveries);
         return this;
     }
 
-    public DeadLetterChannelBuilder<E> useCollisionAvoidance() {
+    public DeadLetterChannelBuilder useCollisionAvoidance() {
         getRedeliveryPolicy().useCollisionAvoidance();
         return this;
     }
 
-    public DeadLetterChannelBuilder<E> useExponentialBackOff() {
+    public DeadLetterChannelBuilder useExponentialBackOff() {
         getRedeliveryPolicy().useExponentialBackOff();
         return this;
     }
@@ -98,7 +98,7 @@
     /**
      * Sets the logger used for caught exceptions
      */
-    public DeadLetterChannelBuilder<E> logger(Logger<E> logger) {
+    public DeadLetterChannelBuilder logger(Logger logger) {
         setLogger(logger);
         return this;
     }
@@ -106,7 +106,7 @@
     /**
      * Sets the logging level of exceptions caught
      */
-    public DeadLetterChannelBuilder<E> loggingLevel(LoggingLevel level) {
+    public DeadLetterChannelBuilder loggingLevel(LoggingLevel level) {
         getLogger().setLevel(level);
         return this;
     }
@@ -114,7 +114,7 @@
     /**
      * Sets the log used for caught exceptions
      */
-    public DeadLetterChannelBuilder<E> log(Log log) {
+    public DeadLetterChannelBuilder log(Log log) {
         getLogger().setLog(log);
         return this;
     }
@@ -122,14 +122,14 @@
     /**
      * Sets the log used for caught exceptions
      */
-    public DeadLetterChannelBuilder<E> log(String log) {
+    public DeadLetterChannelBuilder log(String log) {
         return log(LogFactory.getLog(log));
     }
 
     /**
      * Sets the log used for caught exceptions
      */
-    public DeadLetterChannelBuilder<E> log(Class log) {
+    public DeadLetterChannelBuilder log(Class log) {
         return log(LogFactory.getLog(log));
     }
 
@@ -146,10 +146,10 @@
         this.redeliveryPolicy = redeliveryPolicy;
     }
 
-    public ProcessorFactory<E> getDeadLetterFactory() {
+    public ProcessorFactory getDeadLetterFactory() {
         if (deadLetterFactory == null) {
-            deadLetterFactory = new ProcessorFactory<E>() {
-                public Processor<E> createProcessor() {
+            deadLetterFactory = new ProcessorFactory() {
+                public Processor createProcessor() {
                     return getDefaultDeadLetterEndpoint();
                 }
             };
@@ -160,13 +160,13 @@
     /**
      * Sets the default dead letter queue factory
      */
-    public void setDeadLetterFactory(ProcessorFactory<E> deadLetterFactory) {
+    public void setDeadLetterFactory(ProcessorFactory deadLetterFactory) {
         this.deadLetterFactory = deadLetterFactory;
     }
 
-    public Processor<E> getDefaultDeadLetterEndpoint() {
+    public Processor getDefaultDeadLetterEndpoint() {
         if (defaultDeadLetterEndpoint == null) {
-            defaultDeadLetterEndpoint = new RecipientList<E>(getDefaultDeadLetterEndpointExpression());
+            defaultDeadLetterEndpoint = new RecipientList(getDefaultDeadLetterEndpointExpression());
         }
         return defaultDeadLetterEndpoint;
     }
@@ -174,11 +174,11 @@
     /**
      * Sets the default dead letter endpoint used
      */
-    public void setDefaultDeadLetterEndpoint(Processor<E> defaultDeadLetterEndpoint) {
+    public void setDefaultDeadLetterEndpoint(Processor defaultDeadLetterEndpoint) {
         this.defaultDeadLetterEndpoint = defaultDeadLetterEndpoint;
     }
 
-    public Expression<E> getDefaultDeadLetterEndpointExpression() {
+    public Expression getDefaultDeadLetterEndpointExpression() {
         if (defaultDeadLetterEndpointExpression == null) {
             defaultDeadLetterEndpointExpression = ExpressionBuilder.constantExpression(getDefaultDeadLetterEndpointUri());
         }
@@ -189,7 +189,7 @@
      * Sets the expression used to decide the dead letter channel endpoint for an exchange
      * if no factory is provided via {@link #setDeadLetterFactory(ProcessorFactory)}
      */
-    public void setDefaultDeadLetterEndpointExpression(Expression<E> defaultDeadLetterEndpointExpression) {
+    public void setDefaultDeadLetterEndpointExpression(Expression defaultDeadLetterEndpointExpression) {
         this.defaultDeadLetterEndpointExpression = defaultDeadLetterEndpointExpression;
     }
 
@@ -207,11 +207,11 @@
         this.defaultDeadLetterEndpointUri = defaultDeadLetterEndpointUri;
     }
 
-    public Logger<E> getLogger() {
+    public Logger getLogger() {
         return logger;
     }
 
-    public void setLogger(Logger<E> logger) {
+    public void setLogger(Logger logger) {
         this.logger = logger;
     }
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ErrorHandlerBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ErrorHandlerBuilder.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ErrorHandlerBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ErrorHandlerBuilder.java Tue May  1 09:23:37 2007
@@ -32,5 +32,5 @@
     /**
      * Creates the error handler interceptor
      */
-    Processor<E> createErrorHandler(Processor<E> processor) throws Exception;
+    Processor createErrorHandler(Processor processor) throws Exception;
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FilterBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FilterBuilder.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FilterBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FilterBuilder.java Tue May  1 09:23:37 2007
@@ -24,10 +24,10 @@
 /**
  * @version $Revision$
  */
-public class FilterBuilder<E extends Exchange> extends FromBuilder<E> {
-    private Predicate<E> predicate;
+public class FilterBuilder extends FromBuilder {
+    private Predicate predicate;
 
-    public FilterBuilder(FromBuilder<E> builder, Predicate<E> predicate) {
+    public FilterBuilder(FromBuilder builder, Predicate predicate) {
         super(builder);
         this.predicate = predicate;
     }
@@ -35,7 +35,7 @@
     /**
      * Adds another predicate using a logical AND
      */
-    public FilterBuilder<E> and(Predicate<E> predicate) {
+    public FilterBuilder and(Predicate predicate) {
         this.predicate = PredicateBuilder.and(this.predicate, predicate);
         return this;
     }
@@ -43,19 +43,19 @@
     /**
      * Adds another predicate using a logical OR
      */
-    public FilterBuilder<E> or(Predicate<E> predicate) {
+    public FilterBuilder or(Predicate predicate) {
         this.predicate = PredicateBuilder.or(this.predicate, predicate);
         return this;
     }
 
-    public Predicate<E> getPredicate() {
+    public Predicate getPredicate() {
         return predicate;
     }
 
-    public FilterProcessor<E> createProcessor() throws Exception {
+    public FilterProcessor createProcessor() throws Exception {
         // lets create a single processor for all child predicates
-        Processor<E> childProcessor = super.createProcessor();
-        return new FilterProcessor<E>(predicate, childProcessor);
+        Processor childProcessor = super.createProcessor();
+        return new FilterProcessor(predicate, childProcessor);
     }
 
 }

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=534145&r1=534144&r2=534145
==============================================================================
--- 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 May  1 09:23:37 2007
@@ -39,7 +39,7 @@
 /**
  * @version $Revision$
  */
-public class FromBuilder<E extends Exchange> extends BuilderSupport implements ProcessorFactory<E> {
+public class FromBuilder extends BuilderSupport implements ProcessorFactory {
 	
 	public static final String DEFAULT_TRACE_CATEGORY = "org.apache.camel.TRACE";
 
@@ -264,7 +264,7 @@
     @Fluent
 	public FromBuilder trace(@FluentArg("category")String category) {
 		final Log log = LogFactory.getLog(category);
-		return intercept(new DelegateProcessor<Exchange>(){
+		return intercept(new DelegateProcessor(){
 			@Override
 			public void process(Exchange exchange) throws Exception {
 				log.trace(exchange);

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/IdempotentConsumerBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/IdempotentConsumerBuilder.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/IdempotentConsumerBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/IdempotentConsumerBuilder.java Tue May  1 09:23:37 2007
@@ -28,8 +28,8 @@
  *
  * @version $Revision: 1.1 $
  */
-public class IdempotentConsumerBuilder<E extends Exchange> extends FromBuilder<E> implements ProcessorFactory<E> {
-    private final Expression<E> messageIdExpression;
+public class IdempotentConsumerBuilder extends FromBuilder implements ProcessorFactory {
+    private final Expression messageIdExpression;
     private final MessageIdRepository messageIdRegistry;
 
     public IdempotentConsumerBuilder(FromBuilder fromBuilder, Expression messageIdExpression, MessageIdRepository messageIdRegistry) {

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=534145&r1=534144&r2=534145
==============================================================================
--- 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 Tue May  1 09:23:37 2007
@@ -28,37 +28,37 @@
 /**
  * @version $Revision: 519943 $
  */
-public class InterceptorBuilder<E extends Exchange> implements ProcessorFactory<E> {
-    private final List<DelegateProcessor<E>> intercepts = new ArrayList<DelegateProcessor<E>>();
-	private final FromBuilder<E> parent;
-	private FromBuilder<E> target;
+public class InterceptorBuilder implements ProcessorFactory {
+    private final List<DelegateProcessor> intercepts = new ArrayList<DelegateProcessor>();
+	private final FromBuilder parent;
+	private FromBuilder target;
 
-	public InterceptorBuilder(FromBuilder<E> parent) {
+	public InterceptorBuilder(FromBuilder parent) {
         this.parent = parent;
 	}
 	
 	@Fluent("interceptor")
-	public InterceptorBuilder<E> add(@FluentArg("ref") DelegateProcessor<E> interceptor) {
+	public InterceptorBuilder add(@FluentArg("ref") DelegateProcessor interceptor) {
 		intercepts.add(interceptor);
 		return this;
 	}
 	
 	@Fluent(callOnElementEnd=true)
-    public FromBuilder<E> target() {
-        this.target = new FromBuilder<E>(parent);
+    public FromBuilder target() {
+        this.target = new FromBuilder(parent);
         return target;
     }
 
-    public Processor<E> createProcessor() throws Exception {
+    public Processor createProcessor() throws Exception {
     	
     	// The target is required.
     	if( target == null ) 
     		throw new RuntimeCamelException("target provided.");
     	
     	// Interceptors are optional
-    	DelegateProcessor<E> first=null;
-    	DelegateProcessor<E> last=null;
-        for (DelegateProcessor<E> p : intercepts) {
+    	DelegateProcessor first=null;
+    	DelegateProcessor last=null;
+        for (DelegateProcessor p : intercepts) {
             if( first == null ) {
             	first = p;
             }
@@ -68,7 +68,7 @@
             last = p;
         }
         
-        Processor<E> p = target.createProcessor();
+        Processor p = target.createProcessor();
         if( last != null ) {
         	last.setNext(p);
         }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/LoggingErrorHandlerBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/LoggingErrorHandlerBuilder.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/LoggingErrorHandlerBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/LoggingErrorHandlerBuilder.java Tue May  1 09:23:37 2007
@@ -30,7 +30,7 @@
  * 
  * @version $Revision$
  */
-public class LoggingErrorHandlerBuilder<E extends Exchange> implements ErrorHandlerBuilder<E> {
+public class LoggingErrorHandlerBuilder implements ErrorHandlerBuilder {
     private Log log = LogFactory.getLog(Logger.class);
     private LoggingLevel level = LoggingLevel.INFO;
 
@@ -46,15 +46,15 @@
         this.level = level;
     }
 
-    public ErrorHandlerBuilder<E> copy() {
-        LoggingErrorHandlerBuilder<E> answer = new LoggingErrorHandlerBuilder<E>();
+    public ErrorHandlerBuilder copy() {
+        LoggingErrorHandlerBuilder answer = new LoggingErrorHandlerBuilder();
         answer.setLog(getLog());
         answer.setLevel(getLevel());
         return answer;
     }
 
-    public Processor<E> createErrorHandler(Processor<E> processor) {
-        return new LoggingErrorHandler<E>(processor, log, level);
+    public Processor createErrorHandler(Processor processor) {
+        return new LoggingErrorHandler(processor, log, level);
     }
 
     public LoggingLevel getLevel() {

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/MulticastBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/MulticastBuilder.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/MulticastBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/MulticastBuilder.java Tue May  1 09:23:37 2007
@@ -29,16 +29,16 @@
  *
  * @version $Revision$
  */
-public class MulticastBuilder<E extends Exchange> extends FromBuilder<E> {
-    private final Collection<Endpoint<E>> endpoints;
+public class MulticastBuilder extends FromBuilder {
+    private final Collection<Endpoint> endpoints;
 
-    public MulticastBuilder(FromBuilder<E> parent, Collection<Endpoint<E>> endpoints) {
+    public MulticastBuilder(FromBuilder parent, Collection<Endpoint> endpoints) {
         super(parent);
         this.endpoints = endpoints;
     }
 
     @Override
-    public Processor<E> createProcessor() throws Exception {
-        return new MulticastProcessor<E>(endpoints);
+    public Processor createProcessor() throws Exception {
+        return new MulticastProcessor(endpoints);
     }
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/NoErrorHandlerBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/NoErrorHandlerBuilder.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/NoErrorHandlerBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/NoErrorHandlerBuilder.java Tue May  1 09:23:37 2007
@@ -34,7 +34,7 @@
         return this;
     }
 
-    public Processor<E> createErrorHandler(Processor<E> processor) {
+    public Processor createErrorHandler(Processor processor) {
         return processor;
     }
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/PipelineBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/PipelineBuilder.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/PipelineBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/PipelineBuilder.java Tue May  1 09:23:37 2007
@@ -29,16 +29,16 @@
  *
  * @version $Revision$
  */
-public class PipelineBuilder<E extends Exchange> extends FromBuilder<E> {
-    private final Collection<Endpoint<E>> endpoints;
+public class PipelineBuilder extends FromBuilder {
+    private final Collection<Endpoint> endpoints;
 
-    public PipelineBuilder(FromBuilder<E> parent, Collection<Endpoint<E>> endpoints) {
+    public PipelineBuilder(FromBuilder parent, Collection<Endpoint> endpoints) {
         super(parent);
         this.endpoints = endpoints;
     }
 
     @Override
-    public Processor<E> createProcessor() throws Exception {
-        return new Pipeline<E>(endpoints);
+    public Processor createProcessor() throws Exception {
+        return new Pipeline(endpoints);
     }
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/PolicyBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/PolicyBuilder.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/PolicyBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/PolicyBuilder.java Tue May  1 09:23:37 2007
@@ -28,36 +28,36 @@
 /**
  * @version $Revision: 519943 $
  */
-public class PolicyBuilder<E extends Exchange> implements ProcessorFactory<E> {
-    private final ArrayList<Policy<E>> policies = new ArrayList<Policy<E>>();
-	private final FromBuilder<E> parent;
-	private FromBuilder<E> target;
+public class PolicyBuilder implements ProcessorFactory {
+    private final ArrayList<Policy> policies = new ArrayList<Policy>();
+	private final FromBuilder parent;
+	private FromBuilder target;
 
-	public PolicyBuilder(FromBuilder<E> parent) {
+	public PolicyBuilder(FromBuilder parent) {
         this.parent = parent;
 	}
 	
 	@Fluent("policy")
-	public PolicyBuilder<E> add(@FluentArg("ref") Policy<E> interceptor) {
+	public PolicyBuilder add(@FluentArg("ref") Policy interceptor) {
 		policies.add(interceptor);
 		return this;
 	}
 	
 	@Fluent(callOnElementEnd=true)
-    public FromBuilder<E> target() {
-        this.target = new FromBuilder<E>(parent);
+    public FromBuilder target() {
+        this.target = new FromBuilder(parent);
         return target;
     }
 
-    public Processor<E> createProcessor() throws Exception {
+    public Processor createProcessor() throws Exception {
     	
     	// The target is required.
     	if( target == null ) 
     		throw new RuntimeCamelException("target not provided.");
     	
-        Processor<E> last = target.createProcessor();
+        Processor last = target.createProcessor();
     	Collections.reverse(policies);
-        for (Policy<E> p : policies) {
+        for (Policy p : policies) {
             last = p.wrap(last);
         }
         

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProcessorBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProcessorBuilder.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProcessorBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProcessorBuilder.java Tue May  1 09:23:37 2007
@@ -31,9 +31,9 @@
     /**
      * Creates a processor which sets the body of the IN message to the value of the expression
      */
-    public static <E extends Exchange> Processor<E> setBody(final Expression<E> expression) {
-        return new Processor<E>() {
-            public void process(E exchange) {
+    public static Processor setBody(final Expression expression) {
+        return new Processor() {
+            public void process(Exchange exchange) {
                 Object newBody = expression.evaluate(exchange);
                 exchange.getIn().setBody(newBody);
             }
@@ -48,9 +48,9 @@
     /**
      * Creates a processor which sets the body of the IN message to the value of the expression
      */
-    public static <E extends Exchange> Processor<E> setOutBody(final Expression<E> expression) {
-        return new Processor<E>() {
-            public void process(E exchange) {
+    public static Processor setOutBody(final Expression expression) {
+        return new Processor() {
+            public void process(Exchange exchange) {
                 Object newBody = expression.evaluate(exchange);
                 exchange.getOut().setBody(newBody);
             }
@@ -65,9 +65,9 @@
     /**
      * Sets the header on the IN message
      */
-    public static <E extends Exchange> Processor<E> setHeader(final String name, final Expression<E> expression) {
-        return new Processor<E>() {
-            public void process(E exchange) {
+    public static Processor setHeader(final String name, final Expression expression) {
+        return new Processor() {
+            public void process(Exchange exchange) {
                 Object value = expression.evaluate(exchange);
                 exchange.getIn().setHeader(name, value);
             }
@@ -82,9 +82,9 @@
     /**
      * Sets the header on the OUT message
      */
-    public static <E extends Exchange> Processor<E> setOutHeader(final String name, final Expression<E> expression) {
-        return new Processor<E>() {
-            public void process(E exchange) {
+    public static Processor setOutHeader(final String name, final Expression expression) {
+        return new Processor() {
+            public void process(Exchange exchange) {
                 Object value = expression.evaluate(exchange);
                 exchange.getOut().setHeader(name, value);
             }
@@ -99,9 +99,9 @@
     /**
      * Sets the property on the exchange
      */
-    public static <E extends Exchange> Processor<E> setProperty(final String name, final Expression<E> expression) {
-        return new Processor<E>() {
-            public void process(E exchange) {
+    public static Processor setProperty(final String name, final Expression expression) {
+        return new Processor() {
+            public void process(Exchange exchange) {
                 Object value = expression.evaluate(exchange);
                 exchange.setProperty(name, value);
             }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProcessorFactory.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProcessorFactory.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProcessorFactory.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProcessorFactory.java Tue May  1 09:23:37 2007
@@ -24,8 +24,8 @@
  * 
  * @version $Revision$
  */
-public interface ProcessorFactory<E extends Exchange> {
+public interface ProcessorFactory {
 
-    public Processor<E> createProcessor() throws Exception;
+    public Processor createProcessor() throws Exception;
 
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/SplitterBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/SplitterBuilder.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/SplitterBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/SplitterBuilder.java Tue May  1 09:23:37 2007
@@ -28,17 +28,17 @@
 
  * @version $Revision$
  */
-public class SplitterBuilder<E extends Exchange> extends FromBuilder<E> {
-    private final Expression<E> expression;
+public class SplitterBuilder extends FromBuilder {
+    private final Expression expression;
 
-    public SplitterBuilder(FromBuilder<E> parent, Expression<E> expression) {
+    public SplitterBuilder(FromBuilder parent, Expression expression) {
         super(parent);
         this.expression = expression;
     }
 
-    public Processor<E> createProcessor() throws Exception {
+    public Processor createProcessor() throws Exception {
         // lets create a single processor for all child predicates
-        Processor<E> destination = super.createProcessor();
-        return new Splitter<E>(destination, expression);
+        Processor destination = super.createProcessor();
+        return new Splitter(destination, expression);
     }
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ToBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ToBuilder.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ToBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ToBuilder.java Tue May  1 09:23:37 2007
@@ -25,16 +25,16 @@
 /**
  * @version $Revision$
  */
-public class ToBuilder<E extends Exchange> extends FromBuilder<E> {
-    private Endpoint<E> destination;
+public class ToBuilder<E extends Exchange> extends FromBuilder {
+    private Endpoint destination;
 
-    public ToBuilder(FromBuilder<E> parent, Endpoint<E> endpoint) {
+    public ToBuilder(FromBuilder parent, Endpoint endpoint) {
         super(parent);
         this.destination = endpoint;
     }
 
     @Override
-    public Processor<E> createProcessor() {
-        return new SendProcessor<E>(destination);
+    public Processor createProcessor() {
+        return new SendProcessor(destination);
     }
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java Tue May  1 09:23:37 2007
@@ -45,7 +45,7 @@
  *
  * @version $Revision: 531854 $
  */
-public class XsltBuilder<E extends Exchange> implements Processor<E> {
+public class XsltBuilder implements Processor {
     private Map<String, Object> parameters = new HashMap<String, Object>();
     private XmlConverter converter = new XmlConverter();
     private Transformer transformer;
@@ -64,7 +64,7 @@
         return "XSLT[" + transformer + "]";
     }
 
-    public synchronized void process(E exchange) throws Exception {
+    public synchronized void process(Exchange exchange) throws Exception {
         Transformer transformer = getTransformer();
         if (transformer == null) {
             throw new IllegalArgumentException("No transformer configured!");
@@ -82,16 +82,16 @@
     /**
      * Creates an XSLT processor using the given transformer instance
      */
-    public static <E extends Exchange> XsltBuilder<E> xslt(Transformer transformer) {
-        return new XsltBuilder<E>(transformer);
+    public static XsltBuilder xslt(Transformer transformer) {
+        return new XsltBuilder(transformer);
     }
 
     /**
      * Creates an XSLT processor using the given XSLT source
      */
-    public static <E extends Exchange> XsltBuilder<E> xslt(Source xslt) throws TransformerConfigurationException {
+    public static XsltBuilder xslt(Source xslt) throws TransformerConfigurationException {
         notNull(xslt, "xslt");
-        XsltBuilder<E> answer = new XsltBuilder<E>();
+        XsltBuilder answer = new XsltBuilder();
         answer.setTransformerSource(xslt);
         return answer;
     }
@@ -99,7 +99,7 @@
     /**
      * Creates an XSLT processor using the given XSLT source
      */
-    public static <E extends Exchange> XsltBuilder<E> xslt(File xslt) throws TransformerConfigurationException {
+    public static XsltBuilder xslt(File xslt) throws TransformerConfigurationException {
         notNull(xslt, "xslt");
         return xslt(new StreamSource(xslt));
     }
@@ -107,7 +107,7 @@
     /**
      * Creates an XSLT processor using the given XSLT source
      */
-    public static <E extends Exchange> XsltBuilder<E> xslt(URL xslt) throws TransformerConfigurationException, IOException {
+    public static XsltBuilder xslt(URL xslt) throws TransformerConfigurationException, IOException {
         notNull(xslt, "xslt");
         return xslt(xslt.openStream());
     }
@@ -115,7 +115,7 @@
     /**
      * Creates an XSLT processor using the given XSLT source
      */
-    public static <E extends Exchange> XsltBuilder<E> xslt(InputStream xslt) throws TransformerConfigurationException, IOException {
+    public static XsltBuilder xslt(InputStream xslt) throws TransformerConfigurationException, IOException {
         notNull(xslt, "xslt");
         return xslt(new StreamSource(xslt));
     }
@@ -123,7 +123,7 @@
     /**
      * Sets the output as being a byte[]
      */
-    public XsltBuilder<E> outputBytes() {
+    public XsltBuilder outputBytes() {
         setResultHandler(new StreamResultHandler());
         return this;
     }
@@ -131,7 +131,7 @@
     /**
      * Sets the output as being a String
      */
-    public XsltBuilder<E> outputString() {
+    public XsltBuilder outputString() {
         setResultHandler(new StringResultHandler());
         return this;
     }
@@ -139,12 +139,12 @@
     /**
      * Sets the output as being a DOM
      */
-    public XsltBuilder<E> outputDOM() {
+    public XsltBuilder outputDOM() {
         setResultHandler(new DomResultHandler());
         return this;
     }
 
-    public XsltBuilder<E> parameter(String name, Object value) {
+    public XsltBuilder parameter(String name, Object value) {
         parameters.put(name, value);
         return this;
     }
@@ -194,7 +194,7 @@
     /**
      * Converts the inbound body to a {@link Source}
      */
-    protected Source getSource(E exchange) {
+    protected Source getSource(Exchange exchange) {
         Message in = exchange.getIn();
         Source source = in.getBody(Source.class);
         if (source == null) {

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/direct/DirectEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/direct/DirectEndpoint.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/direct/DirectEndpoint.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/direct/DirectEndpoint.java Tue May  1 09:23:37 2007
@@ -44,21 +44,21 @@
         super(uri, component);
     }
 
-    public Producer<E> createProducer() throws Exception {
-        return startService(new DefaultProducer<E>(this) {
-            public void process(E exchange) throws Exception {
+    public Producer createProducer() throws Exception {
+        return startService(new DefaultProducer(this) {
+            public void process(Exchange exchange) throws Exception {
             	DirectEndpoint.this.process(exchange);
             }
         });    	
     }
 
-    protected void process(E exchange) throws Exception {
+    protected void process(Exchange exchange) throws Exception {
     	for (DefaultConsumer<E> consumer : consumers) {
 			consumer.getProcessor().process(exchange);
 		}
 	}
 
-	public Consumer<E> createConsumer(Processor<E> processor) throws Exception {
+	public Consumer<E> createConsumer(Processor processor) throws Exception {
 		DefaultConsumer<E> consumer = new DefaultConsumer<E>(this, processor) {
 			@Override
 			public void start() throws Exception {

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java Tue May  1 09:23:37 2007
@@ -38,7 +38,7 @@
     private String regexPattern = "";
     private long lastPollTime = 0l;
 
-    public FileConsumer(final FileEndpoint endpoint, Processor<FileExchange> processor) {
+    public FileConsumer(final FileEndpoint endpoint, Processor processor) {
         super(endpoint, processor);
         this.endpoint = endpoint;
     }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java Tue May  1 09:23:37 2007
@@ -53,7 +53,7 @@
      * @throws Exception
      * @see org.apache.camel.Endpoint#createConsumer(org.apache.camel.Processor)
      */
-    public Consumer<FileExchange> createConsumer(Processor<FileExchange> file) throws Exception {
+    public Consumer<FileExchange> createConsumer(Processor file) throws Exception {
         Consumer<FileExchange> result = new FileConsumer(this, file);
         configureConsumer(result);
         return startService(result);

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileProducer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileProducer.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileProducer.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileProducer.java Tue May  1 09:23:37 2007
@@ -1,63 +1,70 @@
 /**
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
  * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
  * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
  * License. You may obtain a copy of the License at
- * 
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  */
-
 package org.apache.camel.component.file;
 
-import java.io.File;
-import java.io.RandomAccessFile;
-import java.nio.ByteBuffer;
-import java.nio.channels.FileChannel;
+import org.apache.camel.Exchange;
 import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultProducer;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import java.io.File;
+import java.io.RandomAccessFile;
+import java.nio.ByteBuffer;
+import java.nio.channels.FileChannel;
+
 /**
  * A {@link Producer} implementation for File
- * 
+ *
  * @version $Revision: 523016 $
  */
-public class FileProducer extends DefaultProducer<FileExchange>{
-
-    private static final transient Log log=LogFactory.getLog(FileProducer.class);
+public class FileProducer extends DefaultProducer {
+    private static final transient Log log = LogFactory.getLog(FileProducer.class);
     private final FileEndpoint endpoint;
 
-    public FileProducer(FileEndpoint endpoint){
+    public FileProducer(FileEndpoint endpoint) {
         super(endpoint);
-        this.endpoint=endpoint;
+        this.endpoint = endpoint;
     }
 
     /**
      * @param exchange
-     * @see org.apache.camel.Processor#process(java.lang.Object)
+     * @see org.apache.camel.Processor#process(Exchange)
      */
-    public void process(FileExchange exchange){
-        ByteBuffer payload=exchange.getIn().getBody(ByteBuffer.class);
+    public void process(Exchange exchange) {
+        process(endpoint.toExchangeType(exchange));
+    }
+
+    public void process(FileExchange exchange) {
+        ByteBuffer payload = exchange.getIn().getBody(ByteBuffer.class);
         payload.flip();
-        File file=null;
-        if(endpoint.getFile()!=null&&endpoint.getFile().isDirectory()){
-            file=new File(endpoint.getFile(),exchange.getFile().getName());
-        }else{
-            file=exchange.getFile();
+        File file = null;
+
+        if (endpoint.getFile() != null && endpoint.getFile().isDirectory()) {
+            file = new File(endpoint.getFile(), exchange.getFile().getName());
         }
-        try{
-            FileChannel fc=new RandomAccessFile(file,"rw").getChannel();
+        else {
+            file = exchange.getFile();
+        }
+        try {
+            FileChannel fc = new RandomAccessFile(file, "rw").getChannel();
             fc.position(fc.size());
             fc.write(payload);
             fc.close();
-        }catch(Throwable e){
-            log.error("Failed to write to File: "+file,e);
+        }
+        catch (Throwable e) {
+            log.error("Failed to write to File: " + file, e);
         }
     }
 }

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=534145&r1=534144&r2=534145
==============================================================================
--- 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 Tue May  1 09:23:37 2007
@@ -45,7 +45,7 @@
 public class MockEndpoint extends DefaultEndpoint<Exchange> {
     private static final transient Log log = LogFactory.getLog(MockEndpoint.class);
     private int expectedCount = -1;
-    private Map<Integer, Processor<Exchange>> processors = new HashMap<Integer, Processor<Exchange>>();
+    private Map<Integer, Processor> processors = new HashMap<Integer, Processor>();
     private List<Exchange> receivedExchanges = new ArrayList<Exchange>();
     private List<Throwable> failures = new ArrayList<Throwable>();
     private List<Runnable> tests = new ArrayList<Runnable>();
@@ -93,7 +93,7 @@
         return new DefaultExchange(getContext());
     }
 
-    public Consumer<Exchange> createConsumer(Processor<Exchange> processor) throws Exception {
+    public Consumer<Exchange> createConsumer(Processor processor) throws Exception {
         throw new UnsupportedOperationException("You cannot consume from this endpoint");
     }
 
@@ -309,7 +309,7 @@
 
             receivedExchanges.add(exchange);
 
-            Processor<Exchange> processor = processors.get(getReceivedCounter());
+            Processor processor = processors.get(getReceivedCounter());
             if (processor != null) {
                 processor.process(exchange);
             }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/pojo/PojoEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/pojo/PojoEndpoint.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/pojo/PojoEndpoint.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/pojo/PojoEndpoint.java Tue May  1 09:23:37 2007
@@ -22,6 +22,7 @@
 import org.apache.camel.NoSuchEndpointException;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
+import org.apache.camel.Exchange;
 import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.impl.DefaultProducer;
 
@@ -46,14 +47,14 @@
         if( pojo == null )
         	throw new NoSuchEndpointException(getEndpointUri());
         
-        return startService(new DefaultProducer<PojoExchange>(this) {
-            public void process(PojoExchange exchange) {
-                invoke(pojo, exchange);
+        return startService(new DefaultProducer(this) {
+            public void process(Exchange exchange) {
+                invoke(pojo, toExchangeType(exchange));
             }
         });
     }
 
-    public Consumer<PojoExchange> createConsumer(Processor<PojoExchange> processor) throws Exception {    	
+    public Consumer<PojoExchange> createConsumer(Processor processor) throws Exception {
         throw new Exception("You cannot consume from pojo endpoints.");
     }
 

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/pojo/timer/TimerConsumer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/pojo/timer/TimerConsumer.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/pojo/timer/TimerConsumer.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/pojo/timer/TimerConsumer.java Tue May  1 09:23:37 2007
@@ -38,7 +38,7 @@
     private Timer timer;
     
 
-	public TimerConsumer(TimerEndpoint endpoint, Processor<PojoExchange> processor) {
+	public TimerConsumer(TimerEndpoint endpoint, Processor processor) {
         super(endpoint, processor);
 		this.endpoint = endpoint;
     }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/pojo/timer/TimerEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/pojo/timer/TimerEndpoint.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/pojo/timer/TimerEndpoint.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/pojo/timer/TimerEndpoint.java Tue May  1 09:23:37 2007
@@ -62,7 +62,7 @@
     	throw new RuntimeCamelException("Cannot produce to a TimerEndpoint: "+getEndpointUri());
     }
 
-    public Consumer<PojoExchange> createConsumer(Processor<PojoExchange> processor) throws Exception {    	
+    public Consumer<PojoExchange> createConsumer(Processor processor) throws Exception {    	
     	TimerConsumer consumer = new TimerConsumer(this, processor);
         return startService(consumer);
     }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/processor/ProcessorEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/processor/ProcessorEndpoint.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/processor/ProcessorEndpoint.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/processor/ProcessorEndpoint.java Tue May  1 09:23:37 2007
@@ -34,10 +34,10 @@
  * @version $Revision: 1.1 $
  */
 public class ProcessorEndpoint extends DefaultEndpoint<Exchange> {
-    private final Processor<Exchange> processor;
-    private final LoadBalancer<Exchange> loadBalancer;
+    private final Processor processor;
+    private final LoadBalancer loadBalancer;
 
-    protected ProcessorEndpoint(String endpointUri, Component component, Processor<Exchange> processor, LoadBalancer<Exchange> loadBalancer) {
+    protected ProcessorEndpoint(String endpointUri, Component component, Processor processor, LoadBalancer loadBalancer) {
         super(endpointUri, component);
         this.processor = processor;
         this.loadBalancer = loadBalancer;
@@ -55,15 +55,15 @@
         });
     }
 
-    public Consumer<Exchange> createConsumer(Processor<Exchange> processor) throws Exception {
+    public Consumer<Exchange> createConsumer(Processor processor) throws Exception {
         return startService(new ProcessorEndpointConsumer(this, processor));
     }
 
-    public Processor<Exchange> getProcessor() {
+    public Processor getProcessor() {
         return processor;
     }
 
-    public LoadBalancer<Exchange> getLoadBalancer() {
+    public LoadBalancer getLoadBalancer() {
         return loadBalancer;
     }
 

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/processor/ProcessorEndpointConsumer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/processor/ProcessorEndpointConsumer.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/processor/ProcessorEndpointConsumer.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/processor/ProcessorEndpointConsumer.java Tue May  1 09:23:37 2007
@@ -27,7 +27,7 @@
 public class ProcessorEndpointConsumer extends DefaultConsumer<Exchange> {
     private final ProcessorEndpoint endpoint;
 
-    public ProcessorEndpointConsumer(ProcessorEndpoint endpoint, Processor<Exchange> processor) {
+    public ProcessorEndpointConsumer(ProcessorEndpoint endpoint, Processor processor) {
         super(endpoint, processor);
         this.endpoint = endpoint;
     }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/queue/QueueEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/queue/QueueEndpoint.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/queue/QueueEndpoint.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/queue/QueueEndpoint.java Tue May  1 09:23:37 2007
@@ -42,14 +42,14 @@
     }
 
     public Producer<E> createProducer() throws Exception {
-        return startService(new DefaultProducer<E>(this) {
-            public void process(E exchange) {
-                queue.add(exchange);
+        return startService(new DefaultProducer(this) {
+            public void process(Exchange exchange) {
+                queue.add(toExchangeType(exchange));
             }
         });
     }
 
-    public Consumer<E> createConsumer(Processor<E> processor) throws Exception {
+    public Consumer<E> createConsumer(Processor processor) throws Exception {
         return startService(new QueueEndpointConsumer<E>(this, processor));
     }
 

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/queue/QueueEndpointConsumer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/queue/QueueEndpointConsumer.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/queue/QueueEndpointConsumer.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/queue/QueueEndpointConsumer.java Tue May  1 09:23:37 2007
@@ -29,10 +29,10 @@
  */
 public class QueueEndpointConsumer<E extends Exchange> extends ServiceSupport implements Consumer<E>, Runnable {
     private QueueEndpoint<E> endpoint;
-    private Processor<E> processor;
+    private Processor processor;
     private Thread thread;
 
-    public QueueEndpointConsumer(QueueEndpoint<E> endpoint, Processor<E> processor) {
+    public QueueEndpointConsumer(QueueEndpoint<E> endpoint, Processor processor) {
         this.endpoint = endpoint;
         this.processor = processor;
     }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java Tue May  1 09:23:37 2007
@@ -295,7 +295,7 @@
         
         if (routes != null) {
             for (Route<Exchange> route : routes) {
-                Processor<Exchange> processor = route.getProcessor();
+                Processor processor = route.getProcessor();
                 Consumer<Exchange> consumer = route.getEndpoint().createConsumer(processor);
                 if (consumer != null) {
                     consumer.start();

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultConsumer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultConsumer.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultConsumer.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultConsumer.java Tue May  1 09:23:37 2007
@@ -29,10 +29,10 @@
  */
 public class DefaultConsumer<E extends Exchange> extends ServiceSupport implements Consumer<E> {
     private Endpoint<E> endpoint;
-    private Processor<E> processor;
+    private Processor processor;
     private ExceptionHandler exceptionHandler;
 
-    public DefaultConsumer(Endpoint<E> endpoint, Processor<E> processor) {
+    public DefaultConsumer(Endpoint<E> endpoint, Processor processor) {
         this.endpoint = endpoint;
         this.processor = processor;
     }
@@ -41,7 +41,7 @@
         return endpoint;
     }
 
-    public Processor<E> getProcessor() {
+    public Processor getProcessor() {
         return processor;
     }
 

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=534145&r1=534144&r2=534145
==============================================================================
--- 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 May  1 09:23:37 2007
@@ -109,10 +109,15 @@
         return getContext().getExchangeConverter().convertTo(type, exchange);
     }
 
-    public E createExchange(E exchange) {
+    public E createExchange(Exchange exchange) {
         E answer = createExchange();
         answer.copyFrom(exchange);
         return answer;
+    }
+
+    public E toExchangeType(Exchange exchange) {
+        // TODO avoid cloning exchanges if E == Exchange!
+        return createExchange(exchange);
     }
 
     /**

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/NoPolicy.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/NoPolicy.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/NoPolicy.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/NoPolicy.java Tue May  1 09:23:37 2007
@@ -27,7 +27,7 @@
  */
 public class NoPolicy<E> implements Policy<E> {
 
-    public Processor<E> wrap(Processor<E> processor) {
+    public Processor wrap(Processor processor) {
         return processor;
     }
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingConsumer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingConsumer.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingConsumer.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingConsumer.java Tue May  1 09:23:37 2007
@@ -42,11 +42,11 @@
     private boolean useFixedDelay;
     private ScheduledFuture<?> future;
 
-    public PollingConsumer(DefaultEndpoint<E> endpoint, Processor<E> processor) {
+    public PollingConsumer(DefaultEndpoint<E> endpoint, Processor processor) {
         this(endpoint, processor, endpoint.getExecutorService());
     }
 
-    public PollingConsumer(Endpoint<E> endpoint, Processor<E> processor, ScheduledExecutorService executor) {
+    public PollingConsumer(Endpoint<E> endpoint, Processor processor, ScheduledExecutorService executor) {
         super(endpoint, processor);
         this.executor = executor;
         if (executor == null) {

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ChoiceProcessor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ChoiceProcessor.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ChoiceProcessor.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ChoiceProcessor.java Tue May  1 09:23:37 2007
@@ -19,6 +19,7 @@
 
 import org.apache.camel.Predicate;
 import org.apache.camel.Processor;
+import org.apache.camel.Exchange;
 import org.apache.camel.util.ServiceHelper;
 import org.apache.camel.impl.ServiceSupport;
 
@@ -31,18 +32,18 @@
  *
  * @version $Revision$
  */
-public class ChoiceProcessor<E> extends ServiceSupport implements Processor<E> {
-    private List<FilterProcessor<E>> filters = new ArrayList<FilterProcessor<E>>();
-    private Processor<E> otherwise;
+public class ChoiceProcessor extends ServiceSupport implements Processor {
+    private List<FilterProcessor> filters = new ArrayList<FilterProcessor>();
+    private Processor otherwise;
 
-    public ChoiceProcessor(List<FilterProcessor<E>> filters, Processor<E> otherwise) {
+    public ChoiceProcessor(List<FilterProcessor> filters, Processor otherwise) {
         this.filters = filters;
         this.otherwise = otherwise;
     }
 
-    public void process(E exchange) throws Exception {
-        for (FilterProcessor<E> filterProcessor : filters) {
-            Predicate<E> predicate = filterProcessor.getPredicate();
+    public void process(Exchange exchange) throws Exception {
+        for (FilterProcessor filterProcessor : filters) {
+            Predicate<Exchange> predicate = filterProcessor.getPredicate();
             if (predicate != null && predicate.matches(exchange)) {
                 filterProcessor.getProcessor().process(exchange);
                 return;
@@ -57,7 +58,7 @@
     public String toString() {
         StringBuilder builder = new StringBuilder("choice{");
         boolean first = true;
-        for (FilterProcessor<E> processor : filters) {
+        for (FilterProcessor processor : filters) {
             if (first) {
                 first = false;
             }
@@ -77,11 +78,11 @@
         return builder.toString();
     }
 
-    public List<FilterProcessor<E>> getFilters() {
+    public List<FilterProcessor> getFilters() {
         return filters;
     }
 
-    public Processor<E> getOtherwise() {
+    public Processor getOtherwise() {
         return otherwise;
     }
 

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/CompositeProcessor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/CompositeProcessor.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/CompositeProcessor.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/CompositeProcessor.java Tue May  1 09:23:37 2007
@@ -18,6 +18,7 @@
 package org.apache.camel.processor;
 
 import org.apache.camel.Processor;
+import org.apache.camel.Exchange;
 import org.apache.camel.impl.ServiceSupport;
 import org.apache.camel.util.ServiceHelper;
 
@@ -28,15 +29,15 @@
  *
  * @version $Revision$
  */
-public class CompositeProcessor<E> extends ServiceSupport implements Processor<E> {
-    private final Collection<Processor<E>> processors;
+public class CompositeProcessor extends ServiceSupport implements Processor {
+    private final Collection<Processor> processors;
 
-    public CompositeProcessor(Collection<Processor<E>> processors) {
+    public CompositeProcessor(Collection<Processor> processors) {
         this.processors = processors;
     }
 
-    public void process(E exchange) throws Exception {
-        for (Processor<E> processor : processors) {
+    public void process(Exchange exchange) throws Exception {
+        for (Processor processor : processors) {
             processor.process(exchange);
         }
     }
@@ -45,7 +46,7 @@
     public String toString() {
         StringBuilder builder = new StringBuilder("[ ");
         boolean first = true;
-        for (Processor<E> processor : processors) {
+        for (Processor processor : processors) {
             if (first) {
                 first = false;
             }
@@ -58,7 +59,7 @@
         return builder.toString();
     }
 
-    public Collection<Processor<E>> getProcessors() {
+    public Collection<Processor> getProcessors() {
         return processors;
     }
 

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java?view=diff&rev=534145&r1=534144&r2=534145
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java Tue May  1 09:23:37 2007
@@ -32,25 +32,25 @@
  *
  * @version $Revision$
  */
-public class DeadLetterChannel<E extends Exchange> extends ServiceSupport implements ErrorHandler<E> {
+public class DeadLetterChannel extends ServiceSupport implements ErrorHandler {
     public static final String REDELIVERY_COUNTER = "org.apache.camel.RedeliveryCounter";
     public static final String REDELIVERED = "org.apache.camel.Redelivered";
 
     private static final transient Log log = LogFactory.getLog(DeadLetterChannel.class);
-    private Processor<E> output;
-    private Processor<E> deadLetter;
+    private Processor output;
+    private Processor deadLetter;
     private RedeliveryPolicy redeliveryPolicy;
-    private Logger<E> logger;
+    private Logger logger;
 
-    public static <E extends Exchange> Logger<E> createDefaultLogger() {
-        return new Logger<E>(log, LoggingLevel.ERROR);
+    public static <E extends Exchange> Logger createDefaultLogger() {
+        return new Logger(log, LoggingLevel.ERROR);
     }
 
-    public DeadLetterChannel(Processor<E> output, Processor<E> deadLetter) {
-        this(output, deadLetter, new RedeliveryPolicy(), DeadLetterChannel.<E>createDefaultLogger());
+    public DeadLetterChannel(Processor output, Processor deadLetter) {
+        this(output, deadLetter, new RedeliveryPolicy(), DeadLetterChannel.createDefaultLogger());
     }
 
-    public DeadLetterChannel(Processor<E> output, Processor<E> deadLetter, RedeliveryPolicy redeliveryPolicy, Logger<E> logger) {
+    public DeadLetterChannel(Processor output, Processor deadLetter, RedeliveryPolicy redeliveryPolicy, Logger logger) {
         this.deadLetter = deadLetter;
         this.output = output;
         this.redeliveryPolicy = redeliveryPolicy;
@@ -62,7 +62,7 @@
         return "DeadLetterChannel[" + output + ", " + deadLetter + ", " + redeliveryPolicy + "]";
     }
 
-    public void process(E exchange) throws Exception {
+    public void process(Exchange exchange) throws Exception {
         int redeliveryCounter = 0;
         long redeliveryDelay = 0;
 
@@ -94,14 +94,14 @@
     /**
      * Returns the output processor
      */
-    public Processor<E> getOutput() {
+    public Processor getOutput() {
         return output;
     }
 
     /**
      * Returns the dead letter that message exchanges will be sent to if the redelivery attempts fail
      */
-    public Processor<E> getDeadLetter() {
+    public Processor getDeadLetter() {
         return deadLetter;
     }
 
@@ -116,14 +116,14 @@
         this.redeliveryPolicy = redeliveryPolicy;
     }
 
-    public Logger<E> getLogger() {
+    public Logger getLogger() {
         return logger;
     }
 
     /**
      * Sets the logger strategy; which {@link Log} to use and which {@link LoggingLevel} to use
      */
-    public void setLogger(Logger<E> logger) {
+    public void setLogger(Logger logger) {
         this.logger = logger;
     }
 
@@ -133,7 +133,7 @@
     /**
      * Increments the redelivery counter and adds the redelivered flag if the message has been redelivered
      */
-    protected int incrementRedeliveryCounter(E exchange) {
+    protected int incrementRedeliveryCounter(Exchange exchange) {
         Message in = exchange.getIn();
         Integer counter = in.getHeader(REDELIVERY_COUNTER, Integer.class);
         int next = 1;



Mime
View raw message