activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r521193 - 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/queue/ camel-core/src/main/java/org/apache/camel/impl/ cam...
Date Thu, 22 Mar 2007 10:32:17 GMT
Author: jstrachan
Date: Thu Mar 22 03:32:03 2007
New Revision: 521193

URL: http://svn.apache.org/viewvc?view=rev&rev=521193
Log:
removed the generics on CamelContext

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/Exchange.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/component/queue/QueueEndpointResolver.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/queue/QueueRouteTest.java
    activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpointResolver.java
    activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteTest.java
    activemq/camel/trunk/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpointResolver.java
    activemq/camel/trunk/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTest.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=521193&r1=521192&r2=521193
==============================================================================
--- 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 Mar
22 03:32:03 2007
@@ -28,7 +28,7 @@
  *
  * @version $Revision$
  */
-public interface CamelContext<E extends Exchange> {
+public interface CamelContext {
     
 	// Component Management Methods
     //-----------------------------------------------------------------------
@@ -36,7 +36,7 @@
     /**
      * Adds a component to the container.
      */
-    public void addComponent(String componentName, final Component<E> component);
+    public void addComponent(String componentName, Component component);
 
     public Component getComponent(String componentName);
     
@@ -55,7 +55,7 @@
      * @param factory used to create a new component instance if the component was not previously
added.
      * @return
      */
-    public Component getOrCreateComponent(String componentName, Callable<Component<E>>
factory);
+    public Component getOrCreateComponent(String componentName, Callable<Component>
factory);
     
     // Endpoint Management Methods
     //-----------------------------------------------------------------------
@@ -63,7 +63,7 @@
     /**
      * Resolves the given URI to an endpoint
      */
-    public Endpoint<E> resolveEndpoint(String uri);
+    public Endpoint resolveEndpoint(String uri);
     
     /**
      * Activates all the starting endpoints in that were added as routes.
@@ -77,17 +77,17 @@
 
     // Route Management Methods
     //-----------------------------------------------------------------------
-	public Map<Endpoint<E>, Processor<E>> getRoutes() ;
+	public Map<Endpoint, Processor> getRoutes() ;
 	
-	public void setRoutes(Map<Endpoint<E>, Processor<E>> routes);
+	public void setRoutes(Map<Endpoint, Processor> routes);
 	
-    public void setRoutes(RouteBuilder<E> builder);
+    public void setRoutes(RouteBuilder builder);
 
     public void setRoutes(final RouteFactory factory);
 
     // Properties
     //-----------------------------------------------------------------------
-    public EndpointResolver<E> getEndpointResolver();
+    public EndpointResolver getEndpointResolver();
     
     public ExchangeConverter getExchangeConverter();
 

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java?view=diff&rev=521193&r1=521192&r2=521193
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java Thu Mar 22
03:32:03 2007
@@ -97,7 +97,7 @@
      *
      * @return the container which owns this exchange
      */
-    CamelContext<Exchange> getContext();
+    CamelContext getContext();
 
     /**
      * Creates a copy of the current message exchange so that it can be forwarded to another

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=521193&r1=521192&r2=521193
==============================================================================
--- 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 Mar 22 03:32:03 2007
@@ -42,7 +42,7 @@
         this(null);
     }
 
-    protected RouteBuilder(CamelContext<E> context) {
+    protected RouteBuilder(CamelContext context) {
         super(context);
     }
 
@@ -87,8 +87,8 @@
 
     // Properties
     //-----------------------------------------------------------------------
-    public CamelContext<E> getContext() {
-        CamelContext<E> context = super.getContext();
+    public CamelContext getContext() {
+        CamelContext context = super.getContext();
         if (context == null) {
             context = createContainer();
             setContext(context);
@@ -144,7 +144,7 @@
         return builder.createProcessor();
     }
 
-    protected CamelContext<E> createContainer() {
-        return new DefaultCamelContext<E>();
+    protected CamelContext createContainer() {
+        return new DefaultCamelContext();
     }
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/queue/QueueEndpointResolver.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/queue/QueueEndpointResolver.java?view=diff&rev=521193&r1=521192&r2=521193
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/queue/QueueEndpointResolver.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/queue/QueueEndpointResolver.java
Thu Mar 22 03:32:03 2007
@@ -83,7 +83,7 @@
 	
 	@SuppressWarnings("unchecked")
 	private QueueComponent<E> resolveQueueComponent(CamelContext container, String componentName)
{
-    	Component rc = container.getOrCreateComponent(componentName, new Callable<Component<E>>(){
+    	Component rc = container.getOrCreateComponent(componentName, new Callable<Component>(){
 			public Component<E> call() throws Exception {
 				return new QueueComponent<E>();
 			}});

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=521193&r1=521192&r2=521193
==============================================================================
--- 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 Mar 22 03:32:03 2007
@@ -30,17 +30,17 @@
  * @version $Revision: 520517 $
  * @org.apache.xbean.XBean element="container" rootElement="true"
  */
-public class DefaultCamelContext<E extends Exchange> implements CamelContext<E>
{
-    private EndpointResolver<E> endpointResolver;
+public class DefaultCamelContext implements CamelContext {
+    private EndpointResolver endpointResolver;
     private ExchangeConverter exchangeConverter;
     private Map<String, Component> components = new HashMap<String, Component>();
-    private Map<Endpoint<E>, Processor<E>> routes;
+    private Map<Endpoint, Processor> routes;
     private TypeConverter typeConverter;
 
     /**
      * Adds a component to the container.
      */
-    public void addComponent(String componentName, final Component<E> component) {
+    public void addComponent(String componentName, final Component component) {
         synchronized (components) {
             if (components.containsKey(componentName)) {
                 throw new IllegalArgumentException("Component previously added: " + componentName);
@@ -76,7 +76,7 @@
      * @param factory       used to create a new component instance if the component was
not previously added.
      * @return
      */
-    public Component getOrCreateComponent(String componentName, Callable<Component<E>>
factory) {
+    public Component getOrCreateComponent(String componentName, Callable<Component>
factory) {
         synchronized (components) {
             Component component = components.get(componentName);
             if (component == null) {
@@ -102,8 +102,8 @@
     /**
      * Resolves the given URI to an endpoint
      */
-    public Endpoint<E> resolveEndpoint(String uri) {
-        EndpointResolver<E> er = getEndpointResolver();
+    public Endpoint resolveEndpoint(String uri) {
+        EndpointResolver er = getEndpointResolver();
         try {
             return er.resolveEndpoint(this, uri);
         }
@@ -116,9 +116,9 @@
      * Activates all the starting endpoints in that were added as routes.
      */
     public void activateEndpoints() {
-        for (Map.Entry<Endpoint<E>, Processor<E>> entry : routes.entrySet())
{
-            Endpoint<E> endpoint = entry.getKey();
-            Processor<E> processor = entry.getValue();
+        for (Map.Entry<Endpoint, Processor> entry : routes.entrySet()) {
+            Endpoint endpoint = entry.getKey();
+            Processor processor = entry.getValue();
             endpoint.activate(processor);
         }
     }
@@ -127,29 +127,29 @@
      * Deactivates all the starting endpoints in that were added as routes.
      */
     public void deactivateEndpoints() {
-        for (Endpoint<E> endpoint : routes.keySet()) {
+        for (Endpoint endpoint : routes.keySet()) {
             endpoint.deactivate();
         }
     }
 
     // Route Management Methods
     //-----------------------------------------------------------------------
-    public Map<Endpoint<E>, Processor<E>> getRoutes() {
+    public Map<Endpoint, Processor> getRoutes() {
         return routes;
     }
 
-    public void setRoutes(Map<Endpoint<E>, Processor<E>> routes) {
+    public void setRoutes(Map<Endpoint, Processor> routes) {
         this.routes = routes;
     }
 
-    public void setRoutes(RouteBuilder<E> builder) {
+    public void setRoutes(RouteBuilder builder) {
         // lets now add the routes from the builder
         builder.setContext(this);
         setRoutes(builder.getRouteMap());
     }
 
     public void setRoutes(final RouteFactory factory) {
-        RouteBuilder<E> builder = new RouteBuilder<E>(this) {
+        RouteBuilder builder = new RouteBuilder(this) {
             public void configure() {
                 factory.build(this);
             }
@@ -159,14 +159,14 @@
 
     // Properties
     //-----------------------------------------------------------------------
-    public EndpointResolver<E> getEndpointResolver() {
+    public EndpointResolver getEndpointResolver() {
         if (endpointResolver == null) {
             endpointResolver = createEndpointResolver();
         }
         return endpointResolver;
     }
 
-    public void setEndpointResolver(EndpointResolver<E> endpointResolver) {
+    public void setEndpointResolver(EndpointResolver endpointResolver) {
         this.endpointResolver = endpointResolver;
     }
 
@@ -198,8 +198,8 @@
     /**
      * Lazily create a default implementation
      */
-    protected EndpointResolver<E> createEndpointResolver() {
-        return new DefaultEndpointResolver<E>();
+    protected EndpointResolver createEndpointResolver() {
+        return new DefaultEndpointResolver();
     }
 
     /**

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java?view=diff&rev=521193&r1=521192&r2=521193
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java
Thu Mar 22 03:32:03 2007
@@ -33,7 +33,7 @@
 	
     public void testJmsRoute() throws Exception {
 
-        CamelContext container = new DefaultCamelContext<Exchange>();
+        CamelContext container = new DefaultCamelContext();
         
         PojoComponent component = new PojoComponent();
         component.registerPojo("hello", new SayService("Hello!"));

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=521193&r1=521192&r2=521193
==============================================================================
--- 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 Mar 22 03:32:03 2007
@@ -37,7 +37,7 @@
     public void testJmsRoute() throws Exception {
         final CountDownLatch latch = new CountDownLatch(1);
 
-        CamelContext container = new DefaultCamelContext<Exchange>();
+        CamelContext container = new DefaultCamelContext();
 
         // lets add some routes
         container.setRoutes(new RouteBuilder() {

Modified: activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpointResolver.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpointResolver.java?view=diff&rev=521193&r1=521192&r2=521193
==============================================================================
--- activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpointResolver.java
(original)
+++ activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpointResolver.java
Thu Mar 22 03:32:03 2007
@@ -78,7 +78,7 @@
 	
 	@SuppressWarnings("unchecked")
 	private JmsComponent resolveJmsComponent(final CamelContext container, final String componentName)
{
-    	Component rc = container.getOrCreateComponent(componentName, new Callable<JmsComponent>(){
+    	Component rc = container.getOrCreateComponent(componentName, new Callable(){
 			public JmsComponent call() throws Exception {
                 return new JmsComponent(container);
 			}});

Modified: activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteTest.java?view=diff&rev=521193&r1=521192&r2=521193
==============================================================================
--- activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteTest.java
(original)
+++ activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteTest.java
Thu Mar 22 03:32:03 2007
@@ -42,7 +42,7 @@
     public void testJmsRoute() throws Exception {
         final CountDownLatch latch = new CountDownLatch(1);
 
-        CamelContext container = new DefaultCamelContext<Exchange>();
+        CamelContext container = new DefaultCamelContext();
 
         // lets configure some componnets
         ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");

Modified: activemq/camel/trunk/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpointResolver.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpointResolver.java?view=diff&rev=521193&r1=521192&r2=521193
==============================================================================
--- activemq/camel/trunk/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpointResolver.java
(original)
+++ activemq/camel/trunk/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpointResolver.java
Thu Mar 22 03:32:03 2007
@@ -76,7 +76,7 @@
 
 	@SuppressWarnings("unchecked")
 	private MinaComponent resolveMinaComponent(final CamelContext context, final String componentName)
{
-    	Component rc = context.getOrCreateComponent(componentName, new Callable<MinaComponent>(){
+    	Component rc = context.getOrCreateComponent(componentName, new Callable(){
 			public MinaComponent call() throws Exception {
                 return new MinaComponent(context);
 			}});

Modified: activemq/camel/trunk/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTest.java?view=diff&rev=521193&r1=521192&r2=521193
==============================================================================
--- activemq/camel/trunk/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTest.java
(original)
+++ activemq/camel/trunk/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTest.java
Thu Mar 22 03:32:03 2007
@@ -37,7 +37,7 @@
     public void testMinaRoute() throws Exception {
         final CountDownLatch latch = new CountDownLatch(1);
 
-        CamelContext container = new DefaultCamelContext<Exchange>();
+        CamelContext container = new DefaultCamelContext();
 
         // lets add some routes
         container.setRoutes(new RouteBuilder() {



Mime
View raw message