Author: hadrian
Date: Tue Jun 30 04:04:33 2009
New Revision: 789550

URL: http://svn.apache.org/viewvc?rev=789550&view=rev
Log:
CAMEL-1078.  Simplify things a bit more around GenericFileExchange in 
preparation for removal.

Removed:
    
camel/trunk/camel-core/src/main/java/org/apache/camel/PollingConsumerAware.java
Modified:
    
camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileExchange.java
    
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/EventDrivenPollingConsumer.java

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileExchange.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileExchange.java?rev=789550&r1=789549&r2=789550&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileExchange.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileExchange.java
 Tue Jun 30 04:04:33 2009
@@ -20,11 +20,10 @@
 
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
-import org.apache.camel.PollingConsumerAware;
 import org.apache.camel.RuntimeExchangeException;
 import org.apache.camel.impl.DefaultExchange;
 
-public class GenericFileExchange<T> extends DefaultExchange implements 
PollingConsumerAware {
+public class GenericFileExchange<T> extends DefaultExchange {
 
     public GenericFileExchange(Endpoint fromEndpoint) {
         super(fromEndpoint);
@@ -51,18 +50,4 @@
     public Exchange newInstance() {
         return new GenericFileExchange<T>(this, getGenericFile());
     }
-
-    public void exchangePolled(Exchange exchange) {
-        GenericFile<T> file = getGenericFile();
-        if (file != null) {
-            try {
-                // load content into memory
-                file.getBinding().loadContent(exchange, file);
-            } catch (IOException e) {
-                throw new RuntimeExchangeException("Cannot load content of 
file: "
-                        + file.getAbsoluteFilePath(), exchange, e);
-            }
-        }
-    }
-
 }

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/EventDrivenPollingConsumer.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/EventDrivenPollingConsumer.java?rev=789550&r1=789549&r2=789550&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/EventDrivenPollingConsumer.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/EventDrivenPollingConsumer.java
 Tue Jun 30 04:04:33 2009
@@ -23,7 +23,6 @@
 import org.apache.camel.Consumer;
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
-import org.apache.camel.PollingConsumerAware;
 import org.apache.camel.Processor;
 import org.apache.camel.processor.Logger;
 import org.apache.camel.spi.ExceptionHandler;
@@ -80,10 +79,6 @@
     }
 
     public void process(Exchange exchange) throws Exception {
-        if (exchange instanceof PollingConsumerAware) {
-            // callback that this exchange has been polled
-            ((PollingConsumerAware)exchange).exchangePolled(exchange);
-        }
         queue.offer(exchange);
     }
 


Reply via email to