activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r533753 - in /activemq/camel/trunk/camel-file/src/main/java/org/apache/camel/component/file: FileComponent.java FileEndpoint.java
Date Mon, 30 Apr 2007 14:07:45 GMT
Author: rajdavies
Date: Mon Apr 30 07:07:44 2007
New Revision: 533753

URL: http://svn.apache.org/viewvc?view=rev&rev=533753
Log:
update properties

Modified:
    activemq/camel/trunk/camel-file/src/main/java/org/apache/camel/component/file/FileComponent.java
    activemq/camel/trunk/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java

Modified: activemq/camel/trunk/camel-file/src/main/java/org/apache/camel/component/file/FileComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-file/src/main/java/org/apache/camel/component/file/FileComponent.java?view=diff&rev=533753&r1=533752&r2=533753
==============================================================================
--- activemq/camel/trunk/camel-file/src/main/java/org/apache/camel/component/file/FileComponent.java
(original)
+++ activemq/camel/trunk/camel-file/src/main/java/org/apache/camel/component/file/FileComponent.java
Mon Apr 30 07:07:44 2007
@@ -37,8 +37,7 @@
 
     protected Endpoint<FileExchange> createEndpoint(String uri, String remaining, Map
parameters) throws Exception {
         File file = new File(remaining);
-        FileEndpoint result =  new FileEndpoint(file, remaining, this);
-        IntrospectionSupport.setProperties(result, parameters);
+        FileEndpoint result =  new FileEndpoint(file, remaining, this,parameters);
         return result;
     }
     

Modified: activemq/camel/trunk/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java?view=diff&rev=533753&r1=533752&r2=533753
==============================================================================
--- activemq/camel/trunk/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java
(original)
+++ activemq/camel/trunk/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java
Mon Apr 30 07:07:44 2007
@@ -18,6 +18,7 @@
 package org.apache.camel.component.file;
 
 import java.io.File;
+import java.util.Map;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
 import org.apache.camel.Component;
@@ -25,15 +26,19 @@
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultEndpoint;
+import org.apache.camel.util.IntrospectionSupport;
 
 /**
  * @version $Revision: 523016 $
  */
 public class FileEndpoint extends DefaultEndpoint<FileExchange> {
     private File file;
-    protected FileEndpoint(File file,String endpointUri, Component component){
+    private Map parameters;
+    protected FileEndpoint(File file,String endpointUri, Component component,Map parameters){
         super(endpointUri,component);
         this.file = file;
+        this.parameters=parameters;
+        IntrospectionSupport.setProperties(this, parameters);
     }
 
    
@@ -46,7 +51,9 @@
      * @see org.apache.camel.Endpoint#createConsumer(org.apache.camel.Processor)
      */
     public Consumer<FileExchange> createConsumer(Processor<FileExchange> file)
throws Exception{
-        return new FileConsumer(this, file, getExecutor());
+        Consumer<FileExchange> result =  new FileConsumer(this, file, getExecutor());
+        IntrospectionSupport.setProperties(result, parameters);
+        return result;
     }
 
     /**
@@ -73,7 +80,9 @@
      * @see org.apache.camel.Endpoint#createProducer()
      */
     public Producer<FileExchange> createProducer() throws Exception{
-        return new FileProducer(this);
+        Producer<FileExchange> result =  new FileProducer(this);
+        IntrospectionSupport.setProperties(result, parameters);
+        return result;
     }
 
     



Mime
View raw message