activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r532790 [1/2] - 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/component/direct/ camel-core/src/main/java/org/apache/camel/co...
Date Thu, 26 Apr 2007 16:13:54 GMT
Author: chirino
Date: Thu Apr 26 09:13:49 2007
New Revision: 532790

URL: http://svn.apache.org/viewvc?view=rev&rev=532790
Log:
Some CamelContext and Endpoint interface changes.

 - Endpoints can now say they will be non-singleton
 - change endpoint management methods in CamelContext to make it more clear that some methods only operate on the registered endpoint singletons.


Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.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/builder/BuilderSupport.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ChoiceBuilder.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/RecipientListBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/WhenBuilder.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/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/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/queue/QueueEndpoint.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/util/CamelClient.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.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/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/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-core/src/test/java/org/apache/camel/processor/TransformViaDSLTest.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/CxfInvokeEndpoint.java
    activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java
    activemq/camel/trunk/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java
    activemq/camel/trunk/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
    activemq/camel/trunk/camel-itest/src/main/java/org/apache/camel/itest/jms/JmsIntegrationTest.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/JbiEndpoint.java
    activemq/camel/trunk/camel-jbi/src/test/java/org/apache/camel/component/jbi/JbiTestSupport.java
    activemq/camel/trunk/camel-jbi/src/test/java/org/apache/camel/component/jbi/SendFromCamelToJbiAndBackToCamelTest.java
    activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java
    activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
    activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.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/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-jpa/src/test/java/org/apache/camel/processor/jpa/JpaIdempotentConsumerTest.java
    activemq/camel/trunk/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpoint.java
    activemq/camel/trunk/camel-mina/src/test/java/org/apache/camel/component/mina/MinaVmTest.java
    activemq/camel/trunk/camel-spring/src/main/java/org/apache/camel/spring/SpringRouteBuilder.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/XmppEndpoint.java
    activemq/camel/trunk/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/UriConfigurationTest.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/CamelContext.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java Thu Apr 26 09:13:49 2007
@@ -68,14 +68,36 @@
     //-----------------------------------------------------------------------
 
     /**
-     * Resolves the given URI to an endpoint
+     * Resolves the given URI to an {@see Endpoint}.  If the URI has a singleton endpoint
+     * registered, then the singleton is returned.  Otherwise, a new {@see Endpoint} is created
+     * and auto registered as a singleton if it is a singleton endpoint.
      */
-    Endpoint resolveEndpoint(String uri);
+    Endpoint getEndpoint(String uri);
 
     /**
-     * Returns the collection of all active endpoints currently registered
+     * Returns the collection of all registered singleton endpoints.
      */
-    Collection<Endpoint> getEndpoints();
+    Collection<Endpoint> getSingletonEndpoints();
+
+    /**
+     * Adds the endpoint to the context using the given URI.  The endpoint will be registered as a singleton.
+     *
+     * @param uri the URI to be used to resolve this endpoint
+     * @param endpoint the endpoint to be added to the context
+     * @return the old endpoint that was previously registered to the context if there was
+     * already an endpoint for that URI
+     * @throws Exception if the new endpoint could not be started or the old endpoint could not be stopped
+     */
+    Endpoint addSingletonEndpoint(String uri, Endpoint endpoint) throws Exception;
+
+    /**
+     * Removes the singleton endpoint with the given URI
+     *
+     * @param uri the URI to be used to remove
+     * @return the endpoint that was removed or null if there is no endpoint for this URI
+     * @throws Exception if endpoint could not be stopped
+     */
+    Endpoint removeSingletonEndpoint(String uri) throws Exception;
 
 
     // Route Management Methods
@@ -130,23 +152,4 @@
      */
     Injector getInjector();
 
-    /**
-     * Adds the endpoint to the context using the given URI
-     *
-     * @param uri the URI to be used to resolve this endpoint
-     * @param endpoint the endpoint to be added to the context
-     * @return the old endpoint that was previously registered to the context if there was
-     * already an endpoint for that URI
-     * @throws Exception if the new endpoint could not be started or the old endpoint could not be stopped
-     */
-    Endpoint addEndpoint(String uri, Endpoint endpoint) throws Exception;
-
-    /**
-     * Removes the endpoint with the given URI
-     *
-     * @param uri the URI to be used to remove
-     * @return the endpoint that was removed or null if there is no endpoint for this URI
-     * @throws Exception if endpoint could not be stopped
-     */
-    Endpoint removeEndpoint(String uri) throws Exception;
 }

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=532790&r1=532789&r2=532790
==============================================================================
--- 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 Thu Apr 26 09:13:49 2007
@@ -28,9 +28,16 @@
 public interface Endpoint<E extends Exchange> {
 
     /**
+     * Returns if the endpoint should be a CamelContext singleton.  If the endpoint is a Singleton,
+     * then a single Endpoint instance will be shared by all routes with the same URI.  Because the endpoint
+     * is shared, it should be treated as an immutable.
+     */
+    boolean isSingleton();
+
+    /**
      * Returns the string representation of the endpoint URI
      */
-    public String getEndpointUri();
+    String getEndpointUri();
     
     /**
      * Create a new exchange for communicating with this endpoint

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java Thu Apr 26 09:13:49 2007
@@ -16,33 +16,32 @@
  */
 package org.apache.camel.builder;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
 import org.apache.camel.processor.LoggingLevel;
 import org.apache.camel.processor.SendProcessor;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * Base class for implementation inheritance for different clauses in the 
  * <a href="http://activemq.apache.org/camel/dsl.html">Java DSL</a>
  *
  * @version $Revision: $
  */
-public abstract class BuilderSupport<E extends Exchange> {
+public abstract class BuilderSupport {
     private CamelContext context;
-    private ErrorHandlerBuilder<E> errorHandlerBuilder;
+    private ErrorHandlerBuilder errorHandlerBuilder;
     private boolean inheritErrorHandler = true;
 
     protected BuilderSupport(CamelContext context) {
         this.context = context;
     }
 
-    protected BuilderSupport(BuilderSupport<E> parent) {
+    protected BuilderSupport(BuilderSupport parent) {
         this.context = parent.getContext();
         this.inheritErrorHandler = parent.inheritErrorHandler;
         if (inheritErrorHandler && parent.errorHandlerBuilder != null) {
@@ -57,73 +56,73 @@
      * Returns a value builder for the given header
      */
     @Fluent
-    public ValueBuilder<E> header(@FluentArg("name")String name) {
-        return Builder.<E>header(name);
+    public ValueBuilder header(@FluentArg("name")String name) {
+        return Builder.header(name);
     }
 
     /**
      * Returns a predicate and value builder for the inbound body on an exchange
      */
     @Fluent
-    public ValueBuilder<E> body() {
-        return Builder.<E>body();
+    public ValueBuilder body() {
+        return Builder.body();
     }
 
     /**
      * Returns a predicate and value builder for the inbound message body as a specific type
      */
     @Fluent
-    public <T> ValueBuilder<E> bodyAs(@FluentArg("class")Class<T> type) {
-        return Builder.<E, T>bodyAs(type);
+    public <T> ValueBuilder bodyAs(@FluentArg("class")Class<T> type) {
+        return Builder.bodyAs(type);
     }
 
     /**
      * Returns a predicate and value builder for the outbound body on an exchange
      */
     @Fluent
-    public ValueBuilder<E> outBody() {
-        return Builder.<E>outBody();
+    public ValueBuilder outBody() {
+        return Builder.outBody();
     }
 
     /**
      * Returns a predicate and value builder for the outbound message body as a specific type
      */
     @Fluent
-    public <T> ValueBuilder<E> outBody(@FluentArg("class")Class<T> type) {
-        return Builder.<E, T>outBody(type);
+    public <T> ValueBuilder outBody(@FluentArg("class")Class<T> type) {
+        return Builder.outBody(type);
     }
 
     /**
      * Returns a value builder for the given system property
      */
     @Fluent
-    public ValueBuilder<E> systemProperty(@FluentArg("name")String name) {
-        return Builder.<E>systemProperty(name);
+    public ValueBuilder systemProperty(@FluentArg("name")String name) {
+        return Builder.systemProperty(name);
     }
 
     /**
      * Returns a value builder for the given system property
      */
     @Fluent
-    public ValueBuilder<E> systemProperty(
+    public ValueBuilder systemProperty(
             @FluentArg("name")String name, @FluentArg("defaultValue")String defaultValue) {
-        return Builder.<E>systemProperty(name, defaultValue);
+        return Builder.systemProperty(name, defaultValue);
     }
 
     /**
      * Resolves the given URI to an endpoint
      */
     @Fluent
-    public Endpoint<E> endpoint(@FluentArg("uri")String uri) {
-        return getContext().resolveEndpoint(uri);
+    public Endpoint endpoint(@FluentArg("uri")String uri) {
+        return getContext().getEndpoint(uri);
     }
 
     /**
      * Resolves the list of URIs into a list of {@link Endpoint} instances
      */
     @Fluent
-    public List<Endpoint<E>> endpoints(@FluentArg("uris")String... uris) {
-        List<Endpoint<E>> endpoints = new ArrayList<Endpoint<E>>();
+    public List<Endpoint> endpoints(@FluentArg("uris")String... uris) {
+        List<Endpoint> endpoints = new ArrayList<Endpoint>();
         for (String uri : uris) {
             endpoints.add(endpoint(uri));
         }
@@ -134,9 +133,9 @@
      * Helper method to create a list of {@link Endpoint} instances
      */
     @Fluent
-    public List<Endpoint<E>> endpoints(@FluentArg("endpoints")Endpoint<E>... endpoints) {
-        List<Endpoint<E>> answer = new ArrayList<Endpoint<E>>();
-        for (Endpoint<E> endpoint : endpoints) {
+    public List<Endpoint> endpoints(@FluentArg("endpoints")Endpoint... endpoints) {
+        List<Endpoint> answer = new ArrayList<Endpoint>();
+        for (Endpoint endpoint : endpoints) {
             answer.add(endpoint);
         }
         return answer;
@@ -146,23 +145,23 @@
      * Creates a disabled error handler for removing the default error handler
      */
     @Fluent
-    public NoErrorHandlerBuilder<E> noErrorHandler() {
-        return new NoErrorHandlerBuilder<E>();
+    public NoErrorHandlerBuilder noErrorHandler() {
+        return new NoErrorHandlerBuilder();
     }
 
     /**
      * Creates an error handler which just logs errors
      */
     @Fluent
-    public LoggingErrorHandlerBuilder<E> loggingErrorHandler() {
-        return new LoggingErrorHandlerBuilder<E>();
+    public LoggingErrorHandlerBuilder loggingErrorHandler() {
+        return new LoggingErrorHandlerBuilder();
     }
 
     /**
      * Creates an error handler which just logs errors
      */
     @Fluent
-    public LoggingErrorHandlerBuilder<E> loggingErrorHandler(@FluentArg("log")String log) {
+    public LoggingErrorHandlerBuilder loggingErrorHandler(@FluentArg("log")String log) {
         return loggingErrorHandler(LogFactory.getLog(log));
     }
 
@@ -170,32 +169,32 @@
      * Creates an error handler which just logs errors
      */
     @Fluent
-    public LoggingErrorHandlerBuilder<E> loggingErrorHandler(@FluentArg("log")Log log) {
-        return new LoggingErrorHandlerBuilder<E>(log);
+    public LoggingErrorHandlerBuilder loggingErrorHandler(@FluentArg("log")Log log) {
+        return new LoggingErrorHandlerBuilder(log);
     }
 
     /**
      * Creates an error handler which just logs errors
      */
     @Fluent
-    public LoggingErrorHandlerBuilder<E> loggingErrorHandler(
+    public LoggingErrorHandlerBuilder loggingErrorHandler(
             @FluentArg("log")Log log, @FluentArg("level")LoggingLevel level) {
-        return new LoggingErrorHandlerBuilder<E>(log, level);
+        return new LoggingErrorHandlerBuilder(log, level);
     }
 
     @Fluent
-    public DeadLetterChannelBuilder<E> deadLetterChannel() {
-        return new DeadLetterChannelBuilder<E>();
+    public DeadLetterChannelBuilder deadLetterChannel() {
+        return new DeadLetterChannelBuilder();
     }
 
     @Fluent
-    public DeadLetterChannelBuilder<E> deadLetterChannel(@FluentArg("uri")String deadLetterUri) {
+    public DeadLetterChannelBuilder deadLetterChannel(@FluentArg("uri")String deadLetterUri) {
         return deadLetterChannel(endpoint(deadLetterUri));
     }
 
     @Fluent
-    public DeadLetterChannelBuilder<E> deadLetterChannel(@FluentArg("endpoint")Endpoint<E> deadLetterEndpoint) {
-        return new DeadLetterChannelBuilder<E>(new SendProcessor<E>(deadLetterEndpoint));
+    public DeadLetterChannelBuilder deadLetterChannel(@FluentArg("endpoint")Endpoint deadLetterEndpoint) {
+        return new DeadLetterChannelBuilder(new SendProcessor(deadLetterEndpoint));
     }
 
     // Properties
@@ -208,26 +207,26 @@
         this.context = context;
     }
 
-    public ErrorHandlerBuilder<E> getErrorHandlerBuilder() {
+    public ErrorHandlerBuilder getErrorHandlerBuilder() {
         if (errorHandlerBuilder == null) {
             errorHandlerBuilder = createErrorHandlerBuilder();
         }
         return errorHandlerBuilder;
     }
 
-    protected ErrorHandlerBuilder<E> createErrorHandlerBuilder() {
+    protected ErrorHandlerBuilder createErrorHandlerBuilder() {
         if (isInheritErrorHandler()) {
-            return new DeadLetterChannelBuilder<E>();
+            return new DeadLetterChannelBuilder();
         }
         else {
-            return new NoErrorHandlerBuilder<E>();
+            return new NoErrorHandlerBuilder();
         }
     }
 
     /**
      * Sets the error handler to use with processors created by this builder
      */
-    public void setErrorHandlerBuilder(ErrorHandlerBuilder<E> errorHandlerBuilder) {
+    public void setErrorHandlerBuilder(ErrorHandlerBuilder errorHandlerBuilder) {
         this.errorHandlerBuilder = errorHandlerBuilder;
     }
 

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ChoiceBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ChoiceBuilder.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ChoiceBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ChoiceBuilder.java Thu Apr 26 09:13:49 2007
@@ -16,25 +16,24 @@
  */
 package org.apache.camel.builder;
 
-import org.apache.camel.Exchange;
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.camel.Predicate;
 import org.apache.camel.Processor;
 import org.apache.camel.processor.ChoiceProcessor;
 import org.apache.camel.processor.FilterProcessor;
 
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * @version $Revision$
  */
-public class ChoiceBuilder<E extends Exchange> extends FromBuilder<E> {
+public class ChoiceBuilder extends FromBuilder {
 
-    private final FromBuilder<E> parent;
-    private List<WhenBuilder<E>> predicateBuilders = new ArrayList<WhenBuilder<E>>();
-    private FromBuilder<E> otherwise;
+    private final FromBuilder parent;
+    private List<WhenBuilder> predicateBuilders = new ArrayList<WhenBuilder>();
+    private FromBuilder otherwise;
 
-    public ChoiceBuilder(FromBuilder<E> parent) {
+    public ChoiceBuilder(FromBuilder parent) {
         super(parent);
         this.parent = parent;
     }
@@ -45,38 +44,38 @@
      * @return a builder for creating a when predicate clause and action
      */
     @Fluent(nestedActions=true)
-    public WhenBuilder<E> when(
+    public WhenBuilder when(
     		@FluentArg(value="predicate",element=true) 
-    		Predicate<E> predicate) {
-        WhenBuilder<E> answer = new WhenBuilder<E>(this, predicate);
+    		Predicate predicate) {
+        WhenBuilder answer = new WhenBuilder(this, predicate);
         predicateBuilders.add(answer);
         return answer;
     }
 
     @Fluent(nestedActions=true)
-    public FromBuilder<E> otherwise() {
-        this.otherwise = new FromBuilder<E>(parent);
+    public FromBuilder otherwise() {
+        this.otherwise = new FromBuilder(parent);
         return otherwise;
     }
 
-    public List<WhenBuilder<E>> getPredicateBuilders() {
+    public List<WhenBuilder> getPredicateBuilders() {
         return predicateBuilders;
     }
 
-    public FromBuilder<E> getOtherwise() {
+    public FromBuilder getOtherwise() {
         return otherwise;
     }
 
     @Override
-    public Processor<E> createProcessor() throws Exception {
-        List<FilterProcessor<E>> filters = new ArrayList<FilterProcessor<E>>();
-        for (WhenBuilder<E> predicateBuilder : predicateBuilders) {
+    public Processor createProcessor() throws Exception {
+        List<FilterProcessor> filters = new ArrayList<FilterProcessor>();
+        for (WhenBuilder predicateBuilder : predicateBuilders) {
             filters.add(predicateBuilder.createProcessor());
         }
-        Processor<E> otherwiseProcessor = null;
+        Processor otherwiseProcessor = null;
         if (otherwise != null) {
             otherwiseProcessor = otherwise.createProcessor();
         }
-        return new ChoiceProcessor<E>(filters, otherwiseProcessor);
+        return new ChoiceProcessor(filters, otherwiseProcessor);
     }
 }

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=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FromBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FromBuilder.java Thu Apr 26 09:13:49 2007
@@ -39,22 +39,22 @@
 /**
  * @version $Revision$
  */
-public class FromBuilder<E extends Exchange> extends BuilderSupport<E> implements ProcessorFactory<E> {
+public class FromBuilder<E extends Exchange> extends BuilderSupport implements ProcessorFactory<E> {
 	
 	public static final String DEFAULT_TRACE_CATEGORY = "org.apache.camel.TRACE";
 
-    private RouteBuilder<E> builder;
-    private Endpoint<E> from;
-    private List<Processor<E>> processors = new ArrayList<Processor<E>>();
-    private List<ProcessorFactory<E>> processFactories = new ArrayList<ProcessorFactory<E>>();
+    private RouteBuilder builder;
+    private Endpoint from;
+    private List<Processor> processors = new ArrayList<Processor>();
+    private List<ProcessorFactory> processFactories = new ArrayList<ProcessorFactory>();
 
-    public FromBuilder(RouteBuilder<E> builder, Endpoint<E> from) {
+    public FromBuilder(RouteBuilder builder, Endpoint from) {
         super(builder);
         this.builder = builder;
         this.from = from;
     }
 
-    public FromBuilder(FromBuilder<E> parent) {
+    public FromBuilder(FromBuilder parent) {
         super(parent);
         this.builder = parent.getBuilder();
         this.from = parent.getFrom();
@@ -64,7 +64,7 @@
      * Sends the exchange to the given endpoint URI
      */
     @Fluent
-    public ProcessorFactory<E> to(@FluentArg("uri")String uri) {
+    public ProcessorFactory to(@FluentArg("uri")String uri) {
         return to(endpoint(uri));
     }
 
@@ -72,8 +72,8 @@
      * Sends the exchange to the given endpoint
      */
     @Fluent
-    public ProcessorFactory<E> to(@FluentArg("endpoint")Endpoint<E> endpoint) {
-        ToBuilder<E> answer = new ToBuilder<E>(this, endpoint);
+    public ProcessorFactory to(@FluentArg("endpoint")Endpoint endpoint) {
+        ToBuilder answer = new ToBuilder(this, endpoint);
         addProcessBuilder(answer);
         return answer;
     }
@@ -82,7 +82,7 @@
      * Sends the exchange to a list of endpoints using the {@link MulticastProcessor} pattern
      */
     @Fluent
-    public ProcessorFactory<E> to(
+    public ProcessorFactory to(
             @FluentArg(value = "uri", attribute = false, element = true)
             String... uris) {
         return to(endpoints(uris));
@@ -92,9 +92,9 @@
      * Sends the exchange to a list of endpoints using the {@link MulticastProcessor} pattern
      */
     @Fluent
-    public ProcessorFactory<E> to(
+    public ProcessorFactory to(
             @FluentArg(value = "endpoint", attribute = false, element = true)
-            Endpoint<E>... endpoints) {
+            Endpoint... endpoints) {
         return to(endpoints(endpoints));
     }
 
@@ -102,8 +102,8 @@
      * Sends the exchange to a list of endpoint using the {@link MulticastProcessor} pattern
      */
     @Fluent
-    public ProcessorFactory<E> to(@FluentArg("endpoints")Collection<Endpoint<E>> endpoints) {
-        return addProcessBuilder(new MulticastBuilder<E>(this, endpoints));
+    public ProcessorFactory to(@FluentArg("endpoints")Collection<Endpoint> endpoints) {
+        return addProcessBuilder(new MulticastBuilder(this, endpoints));
     }
 
     /**
@@ -111,7 +111,7 @@
      * and for request/response the output of one endpoint will be the input of the next endpoint
      */
     @Fluent
-    public ProcessorFactory<E> pipeline(@FluentArg("uris")String... uris) {
+    public ProcessorFactory pipeline(@FluentArg("uris")String... uris) {
         return pipeline(endpoints(uris));
     }
 
@@ -120,7 +120,7 @@
      * and for request/response the output of one endpoint will be the input of the next endpoint
      */
     @Fluent
-    public ProcessorFactory<E> pipeline(@FluentArg("endpoints")Endpoint<E>... endpoints) {
+    public ProcessorFactory pipeline(@FluentArg("endpoints")Endpoint... endpoints) {
         return pipeline(endpoints(endpoints));
     }
 
@@ -129,18 +129,18 @@
      * and for request/response the output of one endpoint will be the input of the next endpoint
      */
     @Fluent
-    public ProcessorFactory<E> pipeline(@FluentArg("endpoints")Collection<Endpoint<E>> endpoints) {
-        return addProcessBuilder(new PipelineBuilder<E>(this, endpoints));
+    public ProcessorFactory pipeline(@FluentArg("endpoints")Collection<Endpoint> endpoints) {
+        return addProcessBuilder(new PipelineBuilder(this, endpoints));
     }
 
     /**
      * Creates an {@link IdempotentConsumer} to avoid duplicate messages
      */
     @Fluent
-    public IdempotentConsumerBuilder<E> idempotentConsumer(
-            @FluentArg("messageIdExpression")Expression<E> messageIdExpression,
+    public IdempotentConsumerBuilder idempotentConsumer(
+            @FluentArg("messageIdExpression")Expression messageIdExpression,
             @FluentArg("MessageIdRepository")MessageIdRepository messageIdRepository) {
-        return (IdempotentConsumerBuilder<E>) addProcessBuilder(new IdempotentConsumerBuilder<E>(this, messageIdExpression, messageIdRepository));
+        return (IdempotentConsumerBuilder) addProcessBuilder(new IdempotentConsumerBuilder(this, messageIdExpression, messageIdRepository));
     }
 
     /**
@@ -150,10 +150,10 @@
      * @return the builder for a predicate
      */
     @Fluent
-    public FilterBuilder<E> filter(
+    public FilterBuilder filter(
             @FluentArg(value = "predicate", element = true)
-            Predicate<E> predicate) {
-        FilterBuilder<E> answer = new FilterBuilder<E>(this, predicate);
+            Predicate predicate) {
+        FilterBuilder answer = new FilterBuilder(this, predicate);
         addProcessBuilder(answer);
         return answer;
     }
@@ -164,8 +164,8 @@
      * @return the builder for a choice expression
      */
     @Fluent(nestedActions = true)
-    public ChoiceBuilder<E> choice() {
-        ChoiceBuilder<E> answer = new ChoiceBuilder<E>(this);
+    public ChoiceBuilder choice() {
+        ChoiceBuilder answer = new ChoiceBuilder(this);
         addProcessBuilder(answer);
         return answer;
     }
@@ -176,10 +176,10 @@
      * @param receipients is the builder of the expression used in the {@link RecipientList} to decide the destinations
      */
     @Fluent
-    public RecipientListBuilder<E> recipientList(
+    public RecipientListBuilder recipientList(
             @FluentArg(value = "recipients", element = true)
-            ValueBuilder<E> receipients) {
-        RecipientListBuilder<E> answer = new RecipientListBuilder<E>(this, receipients);
+            ValueBuilder receipients) {
+        RecipientListBuilder answer = new RecipientListBuilder(this, receipients);
         addProcessBuilder(answer);
         return answer;
     }
@@ -192,8 +192,8 @@
      * @return the builder
      */
     @Fluent
-    public SplitterBuilder<E> splitter(@FluentArg(value = "recipients", element = true)ValueBuilder<E> receipients) {
-        SplitterBuilder<E> answer = new SplitterBuilder<E>(this, receipients.getExpression());
+    public SplitterBuilder splitter(@FluentArg(value = "recipients", element = true)ValueBuilder receipients) {
+        SplitterBuilder answer = new SplitterBuilder(this, receipients.getExpression());
         addProcessBuilder(answer);
         return answer;
     }
@@ -206,8 +206,8 @@
      * @return the builder
      */
     @Fluent
-    public SplitterBuilder<E> splitter(@FluentArg(value = "recipients", element = true) Expression<E> receipients) {
-        SplitterBuilder<E> answer = new SplitterBuilder<E>(this, receipients);
+    public SplitterBuilder splitter(@FluentArg(value = "recipients", element = true) Expression receipients) {
+        SplitterBuilder answer = new SplitterBuilder(this, receipients);
         addProcessBuilder(answer);
         return answer;
     }
@@ -219,7 +219,7 @@
      * @return the current builder with the error handler configured
      */
     @Fluent
-    public FromBuilder<E> errorHandler(@FluentArg("handler")ErrorHandlerBuilder errorHandlerBuilder) {
+    public FromBuilder errorHandler(@FluentArg("handler")ErrorHandlerBuilder errorHandlerBuilder) {
         setErrorHandlerBuilder(errorHandlerBuilder);
         return this;
     }
@@ -231,14 +231,14 @@
      * @return the current builder
      */
     @Fluent
-    public FromBuilder<E> inheritErrorHandler(@FluentArg("condition")boolean condition) {
+    public FromBuilder inheritErrorHandler(@FluentArg("condition")boolean condition) {
         setInheritErrorHandler(condition);
         return this;
     }
 
     @Fluent(nestedActions = true)
-    public InterceptorBuilder<E> intercept() {
-        InterceptorBuilder<E> answer = new InterceptorBuilder<E>(this);
+    public InterceptorBuilder intercept() {
+        InterceptorBuilder answer = new InterceptorBuilder(this);
         addProcessBuilder(answer);
         return answer;
     }
@@ -250,7 +250,7 @@
      * @return
      */
     @Fluent
-	public FromBuilder<E> trace() {
+	public FromBuilder trace() {
 		return trace(DEFAULT_TRACE_CATEGORY);
 	}
 	
@@ -262,11 +262,11 @@
      * @return
      */
     @Fluent
-	public FromBuilder<E> trace(@FluentArg("category")String category) {
+	public FromBuilder trace(@FluentArg("category")String category) {
 		final Log log = LogFactory.getLog(category);
-		return intercept(new DelegateProcessor<E>(){
+		return intercept(new DelegateProcessor<Exchange>(){
 			@Override
-			public void process(E exchange) {
+			public void process(Exchange exchange) {
 				log.trace(exchange);
 				processNext(exchange);
 			}
@@ -274,23 +274,23 @@
 	}    
 
     @Fluent
-    public FromBuilder<E> intercept(@FluentArg("interceptor")DelegateProcessor<E> interceptor) {
-        InterceptorBuilder<E> answer = new InterceptorBuilder<E>(this);
+    public FromBuilder intercept(@FluentArg("interceptor")DelegateProcessor interceptor) {
+        InterceptorBuilder answer = new InterceptorBuilder(this);
         answer.add(interceptor);
         addProcessBuilder(answer);
         return answer.target();
     }
 
     @Fluent(nestedActions = true)
-    public PolicyBuilder<E> policies() {
-    	PolicyBuilder<E> answer = new PolicyBuilder<E>(this);
+    public PolicyBuilder policies() {
+    	PolicyBuilder answer = new PolicyBuilder(this);
         addProcessBuilder(answer);
         return answer;
     }
 
     @Fluent
-    public FromBuilder<E> policy(@FluentArg("policy")Policy<E> policy) {
-        PolicyBuilder<E> answer = new PolicyBuilder<E>(this);
+    public FromBuilder policy(@FluentArg("policy")Policy policy) {
+        PolicyBuilder answer = new PolicyBuilder(this);
         answer.add(policy);
         addProcessBuilder(answer);
         return answer.target();
@@ -303,7 +303,7 @@
      * Adds the custom processor to this destination which could be a final destination, or could be a transformation in a pipeline
      */
     @Fluent
-    public FromBuilder<E> process(@FluentArg("ref")Processor<E> processor) {
+    public FromBuilder process(@FluentArg("ref")Processor processor) {
         addProcessorBuilder(processor);
         return this;
     }
@@ -312,7 +312,7 @@
      * Adds a processor which sets the body on the IN message
      */
     @Fluent
-    public FromBuilder<E> setBody(Expression<E> expression) {
+    public FromBuilder setBody(Expression expression) {
         addProcessorBuilder(ProcessorBuilder.setBody(expression));
         return this;
     }
@@ -321,7 +321,7 @@
      * Adds a processor which sets the body on the OUT message
      */
     @Fluent
-    public FromBuilder<E> setOutBody(Expression<E> expression) {
+    public FromBuilder setOutBody(Expression expression) {
         addProcessorBuilder(ProcessorBuilder.setOutBody(expression));
         return this;
     }
@@ -330,7 +330,7 @@
      * Adds a processor which sets the header on the IN message
      */
     @Fluent
-    public FromBuilder<E> setHeader(String name, Expression<E> expression) {
+    public FromBuilder setHeader(String name, Expression expression) {
         addProcessorBuilder(ProcessorBuilder.setHeader(name, expression));
         return this;
     }
@@ -339,7 +339,7 @@
      * Adds a processor which sets the header on the OUT message
      */
     @Fluent
-    public FromBuilder<E> setOutHeader(String name, Expression<E> expression) {
+    public FromBuilder setOutHeader(String name, Expression expression) {
         addProcessorBuilder(ProcessorBuilder.setOutHeader(name, expression));
         return this;
     }
@@ -349,7 +349,7 @@
      * Adds a processor which sets the exchange property
      */
     @Fluent
-    public FromBuilder<E> setProperty(String name, Expression<E> expression) {
+    public FromBuilder setProperty(String name, Expression expression) {
         addProcessorBuilder(ProcessorBuilder.setProperty(name, expression));
         return this;
     }
@@ -359,8 +359,8 @@
      * Converts the IN message body to the specified type
      */
     @Fluent
-    public FromBuilder<E> convertBodyTo(Class type) {
-        addProcessorBuilder(ProcessorBuilder.<E>setBody(Builder.<E>body().convertTo(type)));
+    public FromBuilder convertBodyTo(Class type) {
+        addProcessorBuilder(ProcessorBuilder.setBody(Builder.body().convertTo(type)));
         return this;
     }
 
@@ -368,39 +368,39 @@
      * Converts the OUT message body to the specified type
      */
     @Fluent
-    public FromBuilder<E> convertOutBodyTo(Class type) {
-        addProcessorBuilder(ProcessorBuilder.<E>setOutBody(Builder.<E>outBody().convertTo(type)));
+    public FromBuilder convertOutBodyTo(Class type) {
+        addProcessorBuilder(ProcessorBuilder.setOutBody(Builder.outBody().convertTo(type)));
         return this;
     }
 
     // Properties
     //-------------------------------------------------------------------------
-    public RouteBuilder<E> getBuilder() {
+    public RouteBuilder getBuilder() {
         return builder;
     }
 
-    public Endpoint<E> getFrom() {
+    public Endpoint getFrom() {
         return from;
     }
 
-    public ProcessorFactory<E> addProcessBuilder(ProcessorFactory<E> processFactory) {
+    public ProcessorFactory addProcessBuilder(ProcessorFactory processFactory) {
         processFactories.add(processFactory);
         return processFactory;
     }
 
-    protected void addProcessorBuilder(Processor<E> processor) {
-        addProcessBuilder(new ConstantProcessorBuilder<E>(processor));
+    protected void addProcessorBuilder(Processor processor) {
+        addProcessBuilder(new ConstantProcessorBuilder(processor));
     }
 
-    public void addProcessor(Processor<E> processor) {
+    public void addProcessor(Processor processor) {
         processors.add(processor);
     }
 
-    public Processor<E> createProcessor() throws Exception {
-        List<Processor<E>> answer = new ArrayList<Processor<E>>();
+    public Processor createProcessor() throws Exception {
+        List<Processor> answer = new ArrayList<Processor>();
 
-        for (ProcessorFactory<E> processFactory : processFactories) {
-            Processor<E> processor = makeProcessor(processFactory);
+        for (ProcessorFactory processFactory : processFactories) {
+            Processor processor = makeProcessor(processFactory);
             if (processor == null) {
                 throw new IllegalArgumentException("No processor created for processBuilder: " + processFactory);
             }
@@ -409,12 +409,12 @@
         if (answer.size() == 0) {
             return null;
         }
-        Processor<E> processor = null;
+        Processor processor = null;
         if (answer.size() == 1) {
             processor = answer.get(0);
         }
         else {
-            processor = new CompositeProcessor<E>(answer);
+            processor = new CompositeProcessor(answer);
         }
         return processor;
     }
@@ -422,8 +422,8 @@
     /**
      * Creates the processor and wraps it in any necessary interceptors and error handlers
      */
-    protected Processor<E> makeProcessor(ProcessorFactory<E> processFactory) throws Exception {
-        Processor<E> processor = processFactory.createProcessor();
+    protected Processor makeProcessor(ProcessorFactory processFactory) throws Exception {
+        Processor processor = processFactory.createProcessor();
         processor = wrapProcessor(processor);
         return wrapInErrorHandler(processor);
     }
@@ -433,7 +433,7 @@
      * could be disabled for child builders such as {@link IdempotentConsumerBuilder} which will rely on the
      * {@link FromBuilder} to perform the error handling to avoid doubly-wrapped processors with 2 nested error handlers
      */
-    protected Processor<E> wrapInErrorHandler(Processor<E> processor) throws Exception {
+    protected Processor wrapInErrorHandler(Processor processor) throws Exception {
         return getErrorHandlerBuilder().createErrorHandler(processor);
     }
 
@@ -444,11 +444,11 @@
      * @param processor the processor which can be wrapped
      * @return the original processor or a new wrapped interceptor
      */
-    protected Processor<E> wrapProcessor(Processor<E> processor) {
+    protected Processor wrapProcessor(Processor processor) {
         return processor;
     }
 
-    public List<Processor<E>> getProcessors() {
+    public List<Processor> getProcessors() {
         return processors;
     }
 

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=532790&r1=532789&r2=532790
==============================================================================
--- 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 Thu Apr 26 09:13:49 2007
@@ -32,7 +32,7 @@
     private final Expression<E> messageIdExpression;
     private final MessageIdRepository messageIdRegistry;
 
-    public IdempotentConsumerBuilder(FromBuilder<E> fromBuilder, Expression<E> messageIdExpression, MessageIdRepository messageIdRegistry) {
+    public IdempotentConsumerBuilder(FromBuilder fromBuilder, Expression messageIdExpression, MessageIdRepository messageIdRegistry) {
         super(fromBuilder);
         this.messageIdRegistry = messageIdRegistry;
         this.messageIdExpression = messageIdExpression;
@@ -47,13 +47,13 @@
     // Implementation methods
     //-------------------------------------------------------------------------
     @Override
-    protected Processor<E> wrapInErrorHandler(Processor<E> processor) throws Exception {
+    protected Processor wrapInErrorHandler(Processor processor) throws Exception {
         // lets do no wrapping in error handlers as the parent FromBuilder will do that
         return processor;
     }
 
     @Override
-    protected Processor<E> wrapProcessor(Processor<E> processor) {
-        return new IdempotentConsumer<E>(messageIdExpression, messageIdRegistry, processor);
+    protected Processor wrapProcessor(Processor processor) {
+        return new IdempotentConsumer(messageIdExpression, messageIdRegistry, processor);
     }
 }

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

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java Thu Apr 26 09:13:49 2007
@@ -33,10 +33,10 @@
  *
  * @version $Revision$
  */
-public abstract class RouteBuilder<E extends Exchange> extends BuilderSupport<E> {
-    private List<FromBuilder<E>> fromBuilders = new ArrayList<FromBuilder<E>>();
+public abstract class RouteBuilder extends BuilderSupport {
+    private List<FromBuilder> fromBuilders = new ArrayList<FromBuilder>();
     private AtomicBoolean initalized = new AtomicBoolean(false);
-    private List<Route<E>> routes = new ArrayList<Route<E>>();
+    private List<Route> routes = new ArrayList<Route>();
 
     protected RouteBuilder() {
         this(null);
@@ -52,13 +52,13 @@
     public abstract void configure();
 
     @Fluent
-    public FromBuilder<E> from( @FluentArg("uri") String uri) {
+    public FromBuilder from( @FluentArg("uri") String uri) {
         return from(endpoint(uri));
     }
 
     @Fluent
-    public FromBuilder<E> from( @FluentArg("endpoint") Endpoint<E> endpoint) {
-        FromBuilder<E> answer = new FromBuilder<E>(this, endpoint);
+    public FromBuilder from( @FluentArg("endpoint") Endpoint endpoint) {
+        FromBuilder answer = new FromBuilder(this, endpoint);
         fromBuilders.add(answer);
         return answer;
     }
@@ -69,7 +69,7 @@
      * @param errorHandlerBuilder the error handler to be used by default for all child routes
      * @return the current builder with the error handler configured
      */
-    public RouteBuilder<E> errorHandler(ErrorHandlerBuilder errorHandlerBuilder) {
+    public RouteBuilder errorHandler(ErrorHandlerBuilder errorHandlerBuilder) {
         setErrorHandlerBuilder(errorHandlerBuilder);
         return this;
     }
@@ -80,7 +80,7 @@
      * @param value the flag as to whether error handlers should be inherited or not
      * @return the current builder
      */
-    public RouteBuilder<E> inheritErrorHandler(boolean value) {
+    public RouteBuilder inheritErrorHandler(boolean value) {
         setInheritErrorHandler(value);
         return this;
     }
@@ -99,7 +99,7 @@
     /**
      * Returns the routing map from inbound endpoints to processors
      */
-    public List<Route<E>> getRouteList() throws Exception {
+    public List<Route> getRouteList() throws Exception {
         checkInitialized();
         return routes;
     }
@@ -107,7 +107,7 @@
     /**
      * Returns the builders which have been created
      */
-    public List<FromBuilder<E>> getFromBuilders() throws Exception {
+    public List<FromBuilder> getFromBuilders() throws Exception {
         checkInitialized();
         return fromBuilders;
     }
@@ -121,14 +121,14 @@
         }
     }
 
-    protected void populateRoutes(List<Route<E>> routes) throws Exception {
-        for (FromBuilder<E> builder : fromBuilders) {
-            Endpoint<E> from = builder.getFrom();
-            Processor<E> processor = makeProcessor(from, builder);
+    protected void populateRoutes(List<Route> routes) throws Exception {
+        for (FromBuilder builder : fromBuilders) {
+            Endpoint from = builder.getFrom();
+            Processor processor = makeProcessor(from, builder);
             if (processor == null) {
                 throw new IllegalArgumentException("No processor created for DestinationBuilder: " + builder);
             }
-            routes.add(new Route<E>(from, processor));
+            routes.add(new Route(from, processor));
         }
     }
 
@@ -140,7 +140,7 @@
      * @param builder the builder which is the factory of the processor
      * @return
      */
-    protected Processor<E> makeProcessor(Endpoint<E> from, FromBuilder<E> builder) throws Exception {
+    protected Processor makeProcessor(Endpoint from, FromBuilder builder) throws Exception {
         return builder.createProcessor();
     }
 

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/WhenBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/WhenBuilder.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/WhenBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/WhenBuilder.java Thu Apr 26 09:13:49 2007
@@ -18,30 +18,29 @@
 package org.apache.camel.builder;
 
 import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
 import org.apache.camel.Predicate;
 
 /**
  * @version $Revision$
  */
-public class WhenBuilder<E extends Exchange> extends FilterBuilder<E> {
-    private final ChoiceBuilder<E> parent;
+public class WhenBuilder extends FilterBuilder {
+    private final ChoiceBuilder parent;
 
-    public WhenBuilder(ChoiceBuilder<E> parent, Predicate<E> predicate) {
+    public WhenBuilder(ChoiceBuilder parent, Predicate predicate) {
         super(parent, predicate);
         this.parent = parent;
     }
 
     @Override
     @Fluent
-    public ChoiceBuilder<E> to(@FluentArg("endpoint") Endpoint<E> endpoint) {
+    public ChoiceBuilder to(@FluentArg("endpoint") Endpoint endpoint) {
         super.to(endpoint);
         return parent;
     }
 
     @Override
     @Fluent
-    public ChoiceBuilder<E> to(@FluentArg("uri")  String uri) {
+    public ChoiceBuilder to(@FluentArg("uri")  String uri) {
         super.to(uri);
         return parent;
     }

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=532790&r1=532789&r2=532790
==============================================================================
--- 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 Thu Apr 26 09:13:49 2007
@@ -92,5 +92,8 @@
 		this.allowMultipleConsumers = allowMutlipleConsumers;
 	}
 
+	public boolean isSingleton() {
+		return true;
+	}
 
 }

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=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java Thu Apr 26 09:13:49 2007
@@ -355,4 +355,9 @@
 		}
 		return true;
 	}
+	
+	public boolean isSingleton() {
+		return true;
+	}
+	
 }

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=532790&r1=532789&r2=532790
==============================================================================
--- 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 Thu Apr 26 09:13:49 2007
@@ -91,4 +91,8 @@
 		return pojoId;
 	}
 
+	public boolean isSingleton() {
+		return true;
+	}
+
 }

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=532790&r1=532789&r2=532790
==============================================================================
--- 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 Thu Apr 26 09:13:49 2007
@@ -119,4 +119,8 @@
 		this.time = time;
 	}
 
+	public boolean isSingleton() {
+		return true;
+	}
+
 }

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=532790&r1=532789&r2=532790
==============================================================================
--- 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 Thu Apr 26 09:13:49 2007
@@ -73,4 +73,8 @@
         // now lets output to the load balancer
         loadBalancer.process(exchange);
     }
+
+	public boolean isSingleton() {
+		return true;
+	}
 }

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=532790&r1=532789&r2=532790
==============================================================================
--- 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 Thu Apr 26 09:13:49 2007
@@ -16,16 +16,16 @@
  */
 package org.apache.camel.component.queue;
 
+import java.util.concurrent.BlockingQueue;
+
+import org.apache.camel.Consumer;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
-import org.apache.camel.Consumer;
 import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.impl.DefaultExchange;
 import org.apache.camel.impl.DefaultProducer;
 
-import java.util.concurrent.BlockingQueue;
-
 /**
  * Represents a queue endpoint that uses a {@link BlockingQueue}
  * object to process inbound exchanges.
@@ -62,5 +62,10 @@
     public BlockingQueue<E> getQueue() {
         return queue;
     }
+    
+	public boolean isSingleton() {
+		return true;
+	}
+
 
 }

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=532790&r1=532789&r2=532790
==============================================================================
--- 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 Thu Apr 26 09:13:49 2007
@@ -17,18 +17,8 @@
  */
 package org.apache.camel.impl;
 
-import static org.apache.camel.util.ServiceHelper.stopServices;
 import static org.apache.camel.util.ServiceHelper.startServices;
-import org.apache.camel.*;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.impl.converter.DefaultTypeConverter;
-import org.apache.camel.spi.ComponentResolver;
-import org.apache.camel.spi.ExchangeConverter;
-import org.apache.camel.spi.Injector;
-import org.apache.camel.util.FactoryFinder;
-import org.apache.camel.util.NoFactoryAvailableException;
-import org.apache.camel.util.ObjectHelper;
-import org.apache.camel.util.ServiceHelper;
+import static org.apache.camel.util.ServiceHelper.stopServices;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -38,6 +28,26 @@
 import java.util.Map;
 import java.util.concurrent.Callable;
 
+import org.apache.camel.CamelContext;
+import org.apache.camel.Component;
+import org.apache.camel.Consumer;
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.ResolveEndpointFailedException;
+import org.apache.camel.Route;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.Service;
+import org.apache.camel.TypeConverter;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.impl.converter.DefaultTypeConverter;
+import org.apache.camel.spi.ComponentResolver;
+import org.apache.camel.spi.ExchangeConverter;
+import org.apache.camel.spi.Injector;
+import org.apache.camel.util.FactoryFinder;
+import org.apache.camel.util.NoFactoryAvailableException;
+import org.apache.camel.util.ObjectHelper;
+
 /**
  * Represents the context used to configure routes and the policies to use.
  *
@@ -133,13 +143,13 @@
     // Endpoint Management Methods
     //-----------------------------------------------------------------------
 
-    public Collection<Endpoint> getEndpoints() {
+    public Collection<Endpoint> getSingletonEndpoints() {
         synchronized (endpoints) {
             return new ArrayList<Endpoint>(endpoints.values());
         }
     }
 
-    public Endpoint addEndpoint(String uri, Endpoint endpoint) throws Exception {
+    public Endpoint addSingletonEndpoint(String uri, Endpoint endpoint) throws Exception {
         Endpoint oldEndpoint;
         synchronized (endpoints) {
             startServices(endpoint);
@@ -150,7 +160,7 @@
         return oldEndpoint;
     }
 
-    public Endpoint removeEndpoint(String uri) throws Exception {
+    public Endpoint removeSingletonEndpoint(String uri) throws Exception {
         Endpoint oldEndpoint;
         synchronized (endpoints) {
             oldEndpoint = endpoints.remove(uri);
@@ -162,7 +172,7 @@
     /**
      * Resolves the given URI to an endpoint
      */
-    public Endpoint resolveEndpoint(String uri) {
+    public Endpoint getEndpoint(String uri) {
         Endpoint answer;
         synchronized (endpoints) {
             answer = endpoints.get(uri);
@@ -194,17 +204,6 @@
                     throw new ResolveEndpointFailedException(uri, e);
                 }
             }
-        }
-        return answer;
-    }
-
-    /**
-     * Looks up the current active endpoint by URI without auto-creating it.
-     */
-    public Endpoint getEndpoint(String uri) {
-        Endpoint answer;
-        synchronized (endpoints) {
-            answer = endpoints.get(uri);
         }
         return answer;
     }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/CamelClient.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/CamelClient.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/CamelClient.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/CamelClient.java Thu Apr 26 09:13:49 2007
@@ -92,7 +92,7 @@
     }
 
     protected Endpoint resolveMandatoryEndpoint(String endpointUri) {
-        Endpoint endpoint = context.resolveEndpoint(endpointUri);
+        Endpoint endpoint = context.getEndpoint(endpointUri);
         if (endpoint == null) {
             throw new NoSuchEndpointException(endpointUri);
         }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java Thu Apr 26 09:13:49 2007
@@ -46,7 +46,7 @@
         }
         else {
             String uri = value.toString();
-            endpoint = (Endpoint<E>) exchange.getContext().resolveEndpoint(uri);
+            endpoint = (Endpoint<E>) exchange.getContext().getEndpoint(uri);
             if (endpoint == null) {
                 throw new NoSuchEndpointException(uri);
             }

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java Thu Apr 26 09:13:49 2007
@@ -112,7 +112,7 @@
      * Resolves an endpoint and asserts that it is found
      */
     protected Endpoint<Exchange> resolveMandatoryEndpoint(CamelContext context, String uri) {
-        Endpoint endpoint = context.resolveEndpoint(uri);
+        Endpoint endpoint = context.getEndpoint(uri);
 
         assertNotNull("No endpoint found for URI: " + uri, endpoint);
 

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java Thu Apr 26 09:13:49 2007
@@ -154,7 +154,7 @@
     public void testDisablingInheritenceOfErrorHandlers() throws Exception {
 
         // START SNIPPET: e5
-        RouteBuilder<Exchange> builder = new RouteBuilder<Exchange>() {
+        RouteBuilder builder = new RouteBuilder() {
             public void configure() {
                 inheritErrorHandler(false);
 
@@ -163,7 +163,7 @@
         };
         // END SNIPPET: e5
 
-        List<Route<Exchange>> routes = builder.getRouteList();
+        List<Route> routes = builder.getRouteList();
         assertEquals("Number routes created", 1, routes.size());
         for (Route<Exchange> route : routes) {
             Endpoint<Exchange> key = route.getEndpoint();

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/InterceptorBuilderTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/InterceptorBuilderTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/InterceptorBuilderTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/InterceptorBuilderTest.java Thu Apr 26 09:13:49 2007
@@ -58,7 +58,7 @@
         	}
         };
 
-        RouteBuilder<Exchange> builder = new RouteBuilder<Exchange>() {
+        RouteBuilder builder = new RouteBuilder() {
             public void configure() {
                 from("direct:a")
                         .intercept()
@@ -70,7 +70,7 @@
         container.addRoutes(builder);
         container.start();
         
-        Endpoint<Exchange> endpoint = container.resolveEndpoint("direct:a");
+        Endpoint<Exchange> endpoint = container.getEndpoint("direct:a");
         Exchange exchange = endpoint.createExchange();
         Producer<Exchange> producer = endpoint.createProducer();
         producer.process(exchange);

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java Thu Apr 26 09:13:49 2007
@@ -16,6 +16,11 @@
  */
 package org.apache.camel.builder;
 
+import static org.apache.camel.processor.idempotent.MemoryMessageIdRepository.memoryMessageIdRepository;
+
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
@@ -23,18 +28,14 @@
 import org.apache.camel.TestSupport;
 import org.apache.camel.processor.ChoiceProcessor;
 import org.apache.camel.processor.DeadLetterChannel;
-import org.apache.camel.processor.FilterProcessor;
 import org.apache.camel.processor.DelegateProcessor;
+import org.apache.camel.processor.FilterProcessor;
 import org.apache.camel.processor.MulticastProcessor;
 import org.apache.camel.processor.RecipientList;
 import org.apache.camel.processor.SendProcessor;
 import org.apache.camel.processor.Splitter;
 import org.apache.camel.processor.idempotent.IdempotentConsumer;
 import org.apache.camel.processor.idempotent.MemoryMessageIdRepository;
-import static org.apache.camel.processor.idempotent.MemoryMessageIdRepository.memoryMessageIdRepository;
-
-import java.util.ArrayList;
-import java.util.List;
 
 /**
  * @version $Revision$
@@ -44,9 +45,9 @@
     protected DelegateProcessor<Exchange> interceptor1;
     protected DelegateProcessor<Exchange> interceptor2;
 
-    protected RouteBuilder<Exchange> buildSimpleRoute() {
+    protected RouteBuilder buildSimpleRoute() {
         // START SNIPPET: e1
-        RouteBuilder<Exchange> builder = new RouteBuilder<Exchange>() {
+        RouteBuilder builder = new RouteBuilder() {
             public void configure() {
                 from("queue:a").to("queue:b");
             }
@@ -56,9 +57,9 @@
     }
 
     public void testSimpleRoute() throws Exception {
-        RouteBuilder<Exchange> builder = buildSimpleRoute();
+        RouteBuilder builder = buildSimpleRoute();
 
-        List<Route<Exchange>> routes = builder.getRouteList();
+        List<Route> routes = builder.getRouteList();
         assertEquals("Number routes created", 1, routes.size());
         for (Route<Exchange> route : routes) {
             Endpoint<Exchange> key = route.getEndpoint();
@@ -70,9 +71,9 @@
         }
     }
 
-    protected RouteBuilder<Exchange> buildSimpleRouteWithHeaderPredicate() {
+    protected RouteBuilder buildSimpleRouteWithHeaderPredicate() {
         // START SNIPPET: e2
-        RouteBuilder<Exchange> builder = new RouteBuilder<Exchange>() {
+        RouteBuilder builder = new RouteBuilder() {
             public void configure() {
                 from("queue:a").filter(header("foo").isEqualTo("bar")).to("queue:b");
             }
@@ -82,14 +83,14 @@
     }
 
     public void testSimpleRouteWithHeaderPredicate() throws Exception {
-        RouteBuilder<Exchange> builder = buildSimpleRouteWithHeaderPredicate();
+        RouteBuilder builder = buildSimpleRouteWithHeaderPredicate();
 
-        List<Route<Exchange>> routes = builder.getRouteList();
+        List<Route> routes = builder.getRouteList();
         System.out.println("Created routes: " + routes);
 
         assertEquals("Number routes created", 1, routes.size());
-        for (Route<Exchange> route : routes) {
-            Endpoint<Exchange> key = route.getEndpoint();
+        for (Route route : routes) {
+            Endpoint key = route.getEndpoint();
             assertEquals("From endpoint", "queue:a", key.getEndpointUri());
             Processor processor = getProcessorWithoutErrorHandler(route);
 
@@ -99,9 +100,9 @@
         }
     }
 
-    protected RouteBuilder<Exchange> buildSimpleRouteWithChoice() {
+    protected RouteBuilder buildSimpleRouteWithChoice() {
         // START SNIPPET: e3
-        RouteBuilder<Exchange> builder = new RouteBuilder<Exchange>() {
+        RouteBuilder builder = new RouteBuilder() {
             public void configure() {
                 from("queue:a").choice()
                         .when(header("foo").isEqualTo("bar")).to("queue:b")
@@ -114,32 +115,32 @@
     }
 
     public void testSimpleRouteWithChoice() throws Exception {
-        RouteBuilder<Exchange> builder = buildSimpleRouteWithChoice();
+        RouteBuilder builder = buildSimpleRouteWithChoice();
 
-        List<Route<Exchange>> routes = builder.getRouteList();
+        List<Route> routes = builder.getRouteList();
         System.out.println("Created routes: " + routes);
 
         assertEquals("Number routes created", 1, routes.size());
-        for (Route<Exchange> route : routes) {
-            Endpoint<Exchange> key = route.getEndpoint();
+        for (Route route : routes) {
+            Endpoint key = route.getEndpoint();
             assertEquals("From endpoint", "queue:a", key.getEndpointUri());
             Processor processor = getProcessorWithoutErrorHandler(route);
 
-            ChoiceProcessor<Exchange> choiceProcessor = assertIsInstanceOf(ChoiceProcessor.class, processor);
-            List<FilterProcessor<Exchange>> filters = choiceProcessor.getFilters();
+            ChoiceProcessor choiceProcessor = assertIsInstanceOf(ChoiceProcessor.class, processor);
+            List<FilterProcessor> filters = choiceProcessor.getFilters();
             assertEquals("Should be two when clauses", 2, filters.size());
 
-            FilterProcessor<Exchange> filter1 = filters.get(0);
+            FilterProcessor filter1 = filters.get(0);
             assertSendTo(filter1.getProcessor(), "queue:b");
 
-            FilterProcessor<Exchange> filter2 = filters.get(1);
+            FilterProcessor filter2 = filters.get(1);
             assertSendTo(filter2.getProcessor(), "queue:c");
 
             assertSendTo(choiceProcessor.getOtherwise(), "queue:d");
         }
     }
 
-    protected RouteBuilder<Exchange> buildCustomProcessor() {
+    protected RouteBuilder buildCustomProcessor() {
         // START SNIPPET: e4
         myProcessor = new Processor<Exchange>() {
             public void process(Exchange exchange) {
@@ -147,7 +148,7 @@
             }
         };
 
-        RouteBuilder<Exchange> builder = new RouteBuilder<Exchange>() {
+        RouteBuilder builder = new RouteBuilder() {
             public void configure() {
                 from("queue:a").process(myProcessor);
             }
@@ -157,13 +158,13 @@
     }
 
     public void testCustomProcessor() throws Exception {
-        RouteBuilder<Exchange> builder = buildCustomProcessor();
+        RouteBuilder builder = buildCustomProcessor();
 
-        List<Route<Exchange>> routes = builder.getRouteList();
+        List<Route> routes = builder.getRouteList();
 
         assertEquals("Number routes created", 1, routes.size());
-        for (Route<Exchange> route : routes) {
-            Endpoint<Exchange> key = route.getEndpoint();
+        for (Route route : routes) {
+            Endpoint key = route.getEndpoint();
             assertEquals("From endpoint", "queue:a", key.getEndpointUri());
             Processor processor = getProcessorWithoutErrorHandler(route);
 
@@ -171,9 +172,9 @@
         }
     }
 
-    protected RouteBuilder<Exchange> buildCustomProcessorWithFilter() {
+    protected RouteBuilder buildCustomProcessorWithFilter() {
         // START SNIPPET: e5
-        RouteBuilder<Exchange> builder = new RouteBuilder<Exchange>() {
+        RouteBuilder builder = new RouteBuilder() {
             public void configure() {
                 from("queue:a").filter(header("foo").isEqualTo("bar")).process(myProcessor);
             }
@@ -183,14 +184,14 @@
     }
 
     public void testCustomProcessorWithFilter() throws Exception {
-        RouteBuilder<Exchange> builder = buildCustomProcessorWithFilter();
+        RouteBuilder builder = buildCustomProcessorWithFilter();
 
-        List<Route<Exchange>> routes = builder.getRouteList();
+        List<Route> routes = builder.getRouteList();
         System.out.println("Created routes: " + routes);
 
         assertEquals("Number routes created", 1, routes.size());
-        for (Route<Exchange> route : routes) {
-            Endpoint<Exchange> key = route.getEndpoint();
+        for (Route route : routes) {
+            Endpoint key = route.getEndpoint();
             assertEquals("From endpoint", "queue:a", key.getEndpointUri());
             Processor processor = getProcessorWithoutErrorHandler(route);
 
@@ -199,9 +200,9 @@
         }
     }
 
-    protected RouteBuilder<Exchange> buildWireTap() {
+    protected RouteBuilder buildWireTap() {
         // START SNIPPET: e6
-        RouteBuilder<Exchange> builder = new RouteBuilder<Exchange>() {
+        RouteBuilder builder = new RouteBuilder() {
             public void configure() {
                 from("queue:a").to("queue:tap", "queue:b");
             }
@@ -211,19 +212,19 @@
     }
 
     public void testWireTap() throws Exception {
-        RouteBuilder<Exchange> builder = buildWireTap();
+        RouteBuilder builder = buildWireTap();
 
-        List<Route<Exchange>> routes = builder.getRouteList();
+        List<Route> routes = builder.getRouteList();
         System.out.println("Created routes: " + routes);
 
         assertEquals("Number routes created", 1, routes.size());
-        for (Route<Exchange> route : routes) {
-            Endpoint<Exchange> key = route.getEndpoint();
+        for (Route route : routes) {
+            Endpoint key = route.getEndpoint();
             assertEquals("From endpoint", "queue:a", key.getEndpointUri());
             Processor processor = getProcessorWithoutErrorHandler(route);
 
-            MulticastProcessor<Exchange> multicastProcessor = assertIsInstanceOf(MulticastProcessor.class, processor);
-            List<Endpoint<Exchange>> endpoints = new ArrayList<Endpoint<Exchange>>(multicastProcessor.getEndpoints());
+            MulticastProcessor multicastProcessor = assertIsInstanceOf(MulticastProcessor.class, processor);
+            List<Endpoint> endpoints = new ArrayList<Endpoint>(multicastProcessor.getEndpoints());
             assertEquals("Should have 2 endpoints", 2, endpoints.size());
 
             assertEndpointUri(endpoints.get(0), "queue:tap");
@@ -231,14 +232,14 @@
         }
     }
 
-    protected RouteBuilder<Exchange> buildRouteWithInterceptor() {
-        interceptor1 = new DelegateProcessor<Exchange>() {
+    protected RouteBuilder buildRouteWithInterceptor() {
+        interceptor1 = new DelegateProcessor() {
         };
 
         // START SNIPPET: e7        
         interceptor2 = new MyInterceptorProcessor();
 
-        RouteBuilder<Exchange> builder = new RouteBuilder<Exchange>() {
+        RouteBuilder builder = new RouteBuilder() {
             public void configure() {
                 from("queue:a")
                         .intercept()
@@ -253,21 +254,21 @@
 
     public void testRouteWithInterceptor() throws Exception {
 
-        RouteBuilder<Exchange> builder = buildRouteWithInterceptor();
+        RouteBuilder builder = buildRouteWithInterceptor();
 
-        List<Route<Exchange>> routes = builder.getRouteList();
+        List<Route> routes = builder.getRouteList();
         System.out.println("Created routes: " + routes);
 
         assertEquals("Number routes created", 1, routes.size());
-        for (Route<Exchange> route : routes) {
-            Endpoint<Exchange> key = route.getEndpoint();
+        for (Route route : routes) {
+            Endpoint key = route.getEndpoint();
             assertEquals("From endpoint", "queue:a", key.getEndpointUri());
             Processor processor = getProcessorWithoutErrorHandler(route);
 
-            DelegateProcessor<Exchange> p1 = assertIsInstanceOf(DelegateProcessor.class, processor);
+            DelegateProcessor p1 = assertIsInstanceOf(DelegateProcessor.class, processor);
             processor = p1.getNext();
 
-            DelegateProcessor<Exchange> p2 = assertIsInstanceOf(DelegateProcessor.class, processor);
+            DelegateProcessor p2 = assertIsInstanceOf(DelegateProcessor.class, processor);
 
             assertSendTo(p2.getNext(), "queue:d");
         }
@@ -275,7 +276,7 @@
 
     public void testComplexExpressions() throws Exception {
         // START SNIPPET: e7
-        RouteBuilder<Exchange> builder = new RouteBuilder<Exchange>() {
+        RouteBuilder builder = new RouteBuilder() {
             public void configure() {
                 from("queue:a").filter(header("foo").isEqualTo(123)).to("queue:b");
                 from("queue:a").filter(header("bar").isGreaterThan(45)).to("queue:b");
@@ -283,12 +284,12 @@
         };
         // END SNIPPET: e7
 
-        List<Route<Exchange>> routes = builder.getRouteList();
+        List<Route> routes = builder.getRouteList();
         System.out.println("Created routes: " + routes);
 
         assertEquals("Number routes created", 2, routes.size());
-        for (Route<Exchange> route : routes) {
-            Endpoint<Exchange> key = route.getEndpoint();
+        for (Route route : routes) {
+            Endpoint key = route.getEndpoint();
             assertEquals("From endpoint", "queue:a", key.getEndpointUri());
             Processor processor = getProcessorWithoutErrorHandler(route);
 
@@ -302,9 +303,9 @@
         }
     }
 
-    protected RouteBuilder<Exchange> buildStaticRecipientList() {
+    protected RouteBuilder buildStaticRecipientList() {
         // START SNIPPET: e8
-        RouteBuilder<Exchange> builder = new RouteBuilder<Exchange>() {
+        RouteBuilder builder = new RouteBuilder() {
             public void configure() {
                 from("queue:a").to("queue:b", "queue:c", "queue:d");
             }
@@ -313,9 +314,9 @@
         return builder;
     }
 
-    protected RouteBuilder<Exchange> buildDynamicRecipientList() {
+    protected RouteBuilder buildDynamicRecipientList() {
         // START SNIPPET: e9
-        RouteBuilder<Exchange> builder = new RouteBuilder<Exchange>() {
+        RouteBuilder builder = new RouteBuilder() {
             public void configure() {
                 from("queue:a").recipientList(header("foo"));
             }
@@ -326,24 +327,24 @@
 
     public void testRouteDynamicReceipentList() throws Exception {
 
-        RouteBuilder<Exchange> builder = buildDynamicRecipientList();
+        RouteBuilder builder = buildDynamicRecipientList();
 
-        List<Route<Exchange>> routes = builder.getRouteList();
+        List<Route> routes = builder.getRouteList();
         System.out.println("Created routes: " + routes);
 
         assertEquals("Number routes created", 1, routes.size());
-        for (Route<Exchange> route : routes) {
-            Endpoint<Exchange> key = route.getEndpoint();
+        for (Route route : routes) {
+            Endpoint key = route.getEndpoint();
             assertEquals("From endpoint", "queue:a", key.getEndpointUri());
             Processor processor = getProcessorWithoutErrorHandler(route);
 
-            RecipientList<Exchange> p1 = assertIsInstanceOf(RecipientList.class, processor);
+            RecipientList p1 = assertIsInstanceOf(RecipientList.class, processor);
         }
     }
 
-    protected RouteBuilder<Exchange> buildSplitter() {
+    protected RouteBuilder buildSplitter() {
         // START SNIPPET: splitter
-        RouteBuilder<Exchange> builder = new RouteBuilder<Exchange>() {
+        RouteBuilder builder = new RouteBuilder() {
             public void configure() {
                 from("queue:a").splitter(bodyAs(String.class).tokenize("\n")).to("queue:b");
             }
@@ -354,24 +355,24 @@
 
     public void testSplitter() throws Exception {
 
-        RouteBuilder<Exchange> builder = buildSplitter();
+        RouteBuilder builder = buildSplitter();
 
-        List<Route<Exchange>> routes = builder.getRouteList();
+        List<Route> routes = builder.getRouteList();
         System.out.println("Created routes: " + routes);
 
         assertEquals("Number routes created", 1, routes.size());
-        for (Route<Exchange> route : routes) {
-            Endpoint<Exchange> key = route.getEndpoint();
+        for (Route route : routes) {
+            Endpoint key = route.getEndpoint();
             assertEquals("From endpoint", "queue:a", key.getEndpointUri());
             Processor processor = getProcessorWithoutErrorHandler(route);
 
-            Splitter<Exchange> p1 = assertIsInstanceOf(Splitter.class, processor);
+            Splitter p1 = assertIsInstanceOf(Splitter.class, processor);
         }
     }
 
-    protected RouteBuilder<Exchange> buildIdempotentConsumer() {
+    protected RouteBuilder buildIdempotentConsumer() {
         // START SNIPPET: idempotent
-        RouteBuilder<Exchange> builder = new RouteBuilder<Exchange>() {
+        RouteBuilder builder = new RouteBuilder() {
             public void configure() {
                 from("queue:a").idempotentConsumer(
                         header("myMessageId"), memoryMessageIdRepository(200)
@@ -384,18 +385,18 @@
 
     public void testIdempotentConsumer() throws Exception {
 
-        RouteBuilder<Exchange> builder = buildIdempotentConsumer();
+        RouteBuilder builder = buildIdempotentConsumer();
 
-        List<Route<Exchange>> routes = builder.getRouteList();
+        List<Route> routes = builder.getRouteList();
         System.out.println("Created routes: " + routes);
 
         assertEquals("Number routes created", 1, routes.size());
-        for (Route<Exchange> route : routes) {
-            Endpoint<Exchange> key = route.getEndpoint();
+        for (Route route : routes) {
+            Endpoint key = route.getEndpoint();
             assertEquals("From endpoint", "queue:a", key.getEndpointUri());
             Processor processor = getProcessorWithoutErrorHandler(route);
 
-            IdempotentConsumer<Exchange> idempotentConsumer = assertIsInstanceOf(IdempotentConsumer.class, processor);
+            IdempotentConsumer idempotentConsumer = assertIsInstanceOf(IdempotentConsumer.class, processor);
 
             assertEquals("messageIdExpression", "header(myMessageId)", idempotentConsumer.getMessageIdExpression().toString());
 
@@ -416,12 +417,12 @@
     /**
      * By default routes should be wrapped in the {@link DeadLetterChannel} so lets unwrap that and return the actual processor
      */
-    protected Processor<Exchange> getProcessorWithoutErrorHandler(Route route) {
-        Processor<Exchange> processor = route.getProcessor();
+    protected Processor getProcessorWithoutErrorHandler(Route route) {
+        Processor processor = route.getProcessor();
         return unwrapErrorHandler(processor);
     }
 
-    protected Processor<Exchange> unwrapErrorHandler(Processor<Exchange> processor) {
+    protected Processor unwrapErrorHandler(Processor processor) {
         assertTrue("Processor should be a DeadLetterChannel but was: " + processor + " with type: " + processor.getClass().getName(), processor instanceof DeadLetterChannel);
         DeadLetterChannel deadLetter = (DeadLetterChannel) processor;
         return deadLetter.getOutput();

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/direct/DirectRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/direct/DirectRouteTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/direct/DirectRouteTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/direct/DirectRouteTest.java Thu Apr 26 09:13:49 2007
@@ -56,7 +56,7 @@
         container.start();
         
         // now lets fire in a message
-        Endpoint<Exchange> endpoint = container.resolveEndpoint("direct:test.a");
+        Endpoint<Exchange> endpoint = container.getEndpoint("direct:test.a");
         Exchange exchange = endpoint.createExchange();
         exchange.getIn().setHeader("cheese", 123);
 

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/queue/QueueRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/queue/QueueRouteTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/queue/QueueRouteTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/queue/QueueRouteTest.java Thu Apr 26 09:13:49 2007
@@ -58,7 +58,7 @@
         container.start();
         
         // now lets fire in a message
-        Endpoint<Exchange> endpoint = container.resolveEndpoint("queue:test.a");
+        Endpoint<Exchange> endpoint = container.getEndpoint("queue:test.a");
         Exchange exchange = endpoint.createExchange();
         exchange.getIn().setHeader("cheese", 123);
 

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ChoiceTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ChoiceTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ChoiceTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ChoiceTest.java Thu Apr 26 09:13:49 2007
@@ -18,22 +18,14 @@
 
 import static org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied;
 import static org.apache.camel.component.mock.MockEndpoint.expectsMessageCount;
-import org.apache.camel.CamelContext;
+
+import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.Processor;
-import org.apache.camel.TestSupport;
-import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.component.queue.QueueEndpoint;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.apache.camel.util.ProducerCache;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import java.util.concurrent.BlockingQueue;
 
 /**
  * @version $Revision: 1.1 $
@@ -92,7 +84,7 @@
     }
 
     protected RouteBuilder createRouteBuilder() {
-        return new RouteBuilder<Exchange>() {
+        return new RouteBuilder() {
             public void configure() {
                 from("direct:a").choice()
                         .when(header("foo").isEqualTo("bar")).to("mock:x")

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelTest.java Thu Apr 26 09:13:49 2007
@@ -83,7 +83,7 @@
             }
         };
 
-        return new RouteBuilder<Exchange>() {
+        return new RouteBuilder() {
             public void configure() {
                 from("direct:start").errorHandler(deadLetterChannel("mock:failed")
                         .maximumRedeliveries(2).initialRedeliveryDelay(1).loggingLevel(LoggingLevel.DEBUG)



Mime
View raw message