camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r541335 - in /activemq/camel/trunk: camel-core/src/main/java/org/apache/camel/ camel-core/src/main/java/org/apache/camel/component/file/ camel-core/src/main/java/org/apache/camel/impl/ components/camel-jms/src/main/java/org/apache/camel/com...
Date Thu, 24 May 2007 15:45:52 GMT
Author: jstrachan
Date: Thu May 24 08:45:50 2007
New Revision: 541335

URL: http://svn.apache.org/viewvc?view=rev&rev=541335
Log:
some minor refactoring; the previous PollingConsumer wasn't really an accurate implementation
of the EIP PollingConsumer, so I've renamed this ScheduledPollConsumer, then PollingConsumer
is the correct name for the 'synchonous request*() methods' type consumer (rather like the
sync API in JMS)

Added:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/PollingConsumer.java  
(contents, props changed)
      - copied, changed from r541323, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/PullConsumer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPollingConsumer.java
  (contents, props changed)
      - copied, changed from r541323, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPullConsumer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingConsumerSupport.java
  (contents, props changed)
      - copied, changed from r541323, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PullConsumerSupport.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
  (contents, props changed)
      - copied, changed from r540935, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingConsumer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
  (contents, props changed)
      - copied, changed from r540935, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingEndpoint.java
    activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPollingConsumer.java
  (contents, props changed)
      - copied, changed from r541323, activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPullConsumer.java
Removed:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/PullConsumer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPullConsumer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingConsumer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingEndpoint.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PullConsumerSupport.java
    activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPullConsumer.java
Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Endpoint.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
    activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
    activemq/camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
    activemq/camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaEndpoint.java
    activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
    activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java

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=541335&r1=541334&r2=541335
==============================================================================
--- 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 May 24
08:45:50 2007
@@ -78,12 +78,12 @@
     Consumer<E> createConsumer(Processor processor) throws Exception;
 
     /**
-     * Creates a new <a href="http://activemq.apache.org/camel/polling-consumer.html">Pull
Consumer</a>
-     * so that the caller can pull message exchanges from the consumer
+     * Creates a new <a href="http://activemq.apache.org/camel/polling-consumer.html">Polling
Consumer</a>
+     * so that the caller can poll message exchanges from the consumer
      * when it wishes (rather than using the event driven consumer returned by {@link #createConsumer(Processor)}
      *
      * @return a newly created pull consumer
      * @throws Exception if the pull consumer could not be created
      */
-    PullConsumer<E> createPullConsumer() throws Exception;
+    PollingConsumer<E> createPollingConsumer() throws Exception;
 }

Copied: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/PollingConsumer.java
(from r541323, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/PullConsumer.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/PollingConsumer.java?view=diff&rev=541335&p1=activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/PullConsumer.java&r1=541323&p2=activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/PollingConsumer.java&r2=541335
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/PullConsumer.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/PollingConsumer.java Thu
May 24 08:45:50 2007
@@ -19,22 +19,37 @@
 
 /**
  * Represents a <a href="http://activemq.apache.org/camel/polling-consumer.html">Polling
Consumer</a> where the caller
- * pulls messages when it is ready.
+ * polls for messages when it is ready.
  * 
  * @version $Revision: 1.1 $
  */
-public interface PullConsumer<E extends Exchange> extends Consumer<E> {
+public interface PollingConsumer<E extends Exchange> extends Consumer<E> {
     
     /**
+     * Waits until a message is available and then returns it. Warning that this method
+     * could block indefinitely if no messages are available.
+     *
+     * @return the message exchange received.
+     */
+    E receive();
+
+    /**
      * Attempts to receive a message exchange immediately without waiting
-     * or returning null if a message exchange is not available yet.
+     * and returning null if a message exchange is not available yet.
      *
-     * @return
+     * @return the message exchange if one is immediately available otherwise null
      */
     E receiveNoWait();
 
-    E receive();
-
+    /**
+     * Attempts to receive a message exchange, waiting up to the given timeout to expire
+     * if a message is not yet available
+     *
+     * @param timeout the amount of time in milliseconds to wait for a message before timing
out and
+     * returning null
+     *
+     * @return the message exchange if one iwas available within the timeout period, or null
if the timeout expired
+     */
     E receive(long timeout);
 
 }

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/PollingConsumer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java?view=diff&rev=541335&r1=541334&r2=541335
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java
Thu May 24 08:45:50 2007
@@ -18,7 +18,7 @@
 package org.apache.camel.component.file;
 
 import org.apache.camel.Processor;
-import org.apache.camel.impl.PollingConsumer;
+import org.apache.camel.impl.ScheduledPollConsumer;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -30,7 +30,7 @@
 /**
  * @version $Revision: 523016 $
  */
-public class FileConsumer extends PollingConsumer<FileExchange> {
+public class FileConsumer extends ScheduledPollConsumer<FileExchange> {
     private static final transient Log log = LogFactory.getLog(FileConsumer.class);
     private final FileEndpoint endpoint;
     private boolean recursive = true;

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java?view=diff&rev=541335&r1=541334&r2=541335
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
Thu May 24 08:45:50 2007
@@ -20,7 +20,7 @@
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
-import org.apache.camel.impl.PollingEndpoint;
+import org.apache.camel.impl.ScheduledPollEndpoint;
 
 import java.io.File;
 
@@ -29,7 +29,7 @@
  *
  * @version $Revision: 523016 $
  */
-public class FileEndpoint extends PollingEndpoint<FileExchange> {
+public class FileEndpoint extends ScheduledPollEndpoint<FileExchange> {
     private File file;
     private boolean autoCreate=true;
 

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java?view=diff&rev=541335&r1=541334&r2=541335
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
Thu May 24 08:45:50 2007
@@ -62,9 +62,9 @@
             return null;
         }
         if (parameters != null) {
-            if (endpoint instanceof PollingEndpoint) {
-                PollingEndpoint pollingEndpoint = (PollingEndpoint) endpoint;
-                pollingEndpoint.configureProperties(parameters);
+            if (endpoint instanceof ScheduledPollEndpoint) {
+                ScheduledPollEndpoint scheduledPollEndpoint = (ScheduledPollEndpoint) endpoint;
+                scheduledPollEndpoint.configureProperties(parameters);
             }
             IntrospectionSupport.setProperties(endpoint, parameters);
         }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java?view=diff&rev=541335&r1=541334&r2=541335
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
Thu May 24 08:45:50 2007
@@ -20,7 +20,7 @@
 import org.apache.camel.Component;
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
-import org.apache.camel.PullConsumer;
+import org.apache.camel.PollingConsumer;
 import org.apache.camel.util.ObjectHelper;
 
 import java.lang.reflect.ParameterizedType;
@@ -99,8 +99,8 @@
         this.executorService = executorService;
     }
 
-    public PullConsumer<E> createPullConsumer() throws Exception {
-        return new DefaultPullConsumer<E>(this);
+    public PollingConsumer<E> createPollingConsumer() throws Exception {
+        return new DefaultPollingConsumer<E>(this);
     }
 
     /**

Copied: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPollingConsumer.java
(from r541323, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPullConsumer.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPollingConsumer.java?view=diff&rev=541335&p1=activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPullConsumer.java&r1=541323&p2=activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPollingConsumer.java&r2=541335
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPullConsumer.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPollingConsumer.java
Thu May 24 08:45:50 2007
@@ -21,7 +21,7 @@
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
-import org.apache.camel.PullConsumer;
+import org.apache.camel.PollingConsumer;
 import org.apache.camel.processor.Logger;
 import org.apache.camel.spi.ExceptionHandler;
 import org.apache.commons.logging.Log;
@@ -32,22 +32,22 @@
 import java.util.concurrent.TimeUnit;
 
 /**
- * A default implementation of the {@link PullConsumer} which uses the normal asynchronous
consumer mechanism
+ * A default implementation of the {@link PollingConsumer} which uses the normal asynchronous
consumer mechanism
  * along with a {@link BlockingQueue} to allow the caller to pull messages on demand.
  * 
  * @version $Revision: 1.1 $
  */
-public class DefaultPullConsumer<E extends Exchange> extends PullConsumerSupport<E>
implements Processor {
-    private static final transient Log log = LogFactory.getLog(DefaultPullConsumer.class);
+public class DefaultPollingConsumer<E extends Exchange> extends PollingConsumerSupport<E>
implements Processor {
+    private static final transient Log log = LogFactory.getLog(DefaultPollingConsumer.class);
     private BlockingQueue<E> queue;
     private ExceptionHandler interuptedExceptionHandler = new LoggingExceptionHandler(new
Logger(log));
     private Consumer<E> consumer;
 
-    public DefaultPullConsumer(Endpoint<E> endpoint) {
+    public DefaultPollingConsumer(Endpoint<E> endpoint) {
         this(endpoint, new ArrayBlockingQueue<E>(1000));
     }
 
-    public DefaultPullConsumer(Endpoint<E> endpoint, BlockingQueue<E> queue)
{
+    public DefaultPollingConsumer(Endpoint<E> endpoint, BlockingQueue<E> queue)
{
         super(endpoint);
         this.queue = queue;
     }

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPollingConsumer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingConsumerSupport.java
(from r541323, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PullConsumerSupport.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingConsumerSupport.java?view=diff&rev=541335&p1=activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PullConsumerSupport.java&r1=541323&p2=activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingConsumerSupport.java&r2=541335
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PullConsumerSupport.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingConsumerSupport.java
Thu May 24 08:45:50 2007
@@ -19,19 +19,19 @@
 
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
-import org.apache.camel.PullConsumer;
+import org.apache.camel.PollingConsumer;
 import org.apache.camel.spi.ExceptionHandler;
 
 /**
- * A useful base class for implementations of {@link PullConsumer}
+ * A useful base class for implementations of {@link PollingConsumer}
  *
  * @version $Revision: 1.1 $
  */
-public abstract class PullConsumerSupport<E extends Exchange> extends ServiceSupport
implements PullConsumer<E> {
+public abstract class PollingConsumerSupport<E extends Exchange> extends ServiceSupport
implements PollingConsumer<E> {
     private final Endpoint<E> endpoint;
     private ExceptionHandler exceptionHandler;
 
-    public PullConsumerSupport(Endpoint<E> endpoint) {
+    public PollingConsumerSupport(Endpoint<E> endpoint) {
         this.endpoint = endpoint;
     }
 

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingConsumerSupport.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
(from r540935, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingConsumer.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java?view=diff&rev=541335&p1=activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingConsumer.java&r1=540935&p2=activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java&r2=541335
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingConsumer.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
Thu May 24 08:45:50 2007
@@ -32,8 +32,8 @@
  *
  * @version $Revision$
  */
-public abstract class PollingConsumer<E extends Exchange> extends DefaultConsumer<E>
implements Runnable {
-    private static final transient Log log = LogFactory.getLog(PollingConsumer.class);
+public abstract class ScheduledPollConsumer<E extends Exchange> extends DefaultConsumer<E>
implements Runnable {
+    private static final transient Log log = LogFactory.getLog(ScheduledPollConsumer.class);
     
     private final ScheduledExecutorService executor;
     private long initialDelay = 1000;
@@ -42,11 +42,11 @@
     private boolean useFixedDelay;
     private ScheduledFuture<?> future;
 
-    public PollingConsumer(DefaultEndpoint<E> endpoint, Processor processor) {
+    public ScheduledPollConsumer(DefaultEndpoint<E> endpoint, Processor processor)
{
         this(endpoint, processor, endpoint.getExecutorService());
     }
 
-    public PollingConsumer(Endpoint<E> endpoint, Processor processor, ScheduledExecutorService
executor) {
+    public ScheduledPollConsumer(Endpoint<E> endpoint, Processor processor, ScheduledExecutorService
executor) {
         super(endpoint, processor);
         this.executor = executor;
         if (executor == null) {

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
(from r540935, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingEndpoint.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java?view=diff&rev=541335&p1=activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingEndpoint.java&r1=540935&p2=activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java&r2=541335
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/PollingEndpoint.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
Thu May 24 08:45:50 2007
@@ -24,18 +24,16 @@
 import org.apache.camel.util.IntrospectionSupport;
 
 import java.util.Map;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledThreadPoolExecutor;
 
 /**
- * A base class for {@link Endpoint} which creates a {@link PollingConsumer}
+ * A base class for {@link Endpoint} which creates a {@link ScheduledPollConsumer}
  *
  * @version $Revision: 1.1 $
  */
-public abstract class PollingEndpoint<E extends Exchange> extends DefaultEndpoint<E>
{
+public abstract class ScheduledPollEndpoint<E extends Exchange> extends DefaultEndpoint<E>
{
     private Map consumerProperties;
 
-    protected PollingEndpoint(String endpointUri, Component component) {
+    protected ScheduledPollEndpoint(String endpointUri, Component component) {
         super(endpointUri, component);
     }
 

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java?view=diff&rev=541335&r1=541334&r2=541335
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
(original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
Thu May 24 08:45:50 2007
@@ -18,10 +18,8 @@
 
 import javax.jms.Message;
 
-import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
-import org.apache.camel.Producer;
-import org.apache.camel.PullConsumer;
+import org.apache.camel.PollingConsumer;
 import org.apache.camel.impl.DefaultEndpoint;
 import org.springframework.jms.core.JmsOperations;
 import org.springframework.jms.core.JmsTemplate;
@@ -86,9 +84,9 @@
     }
 
     @Override
-    public PullConsumer<JmsExchange> createPullConsumer() throws Exception {
+    public PollingConsumer<JmsExchange> createPollingConsumer() throws Exception {
         JmsOperations template = createJmsOperations();
-        return new JmsPullConsumer(this, template);
+        return new JmsPollingConsumer(this, template);
     }
 
     public JmsExchange createExchange() {

Copied: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPollingConsumer.java
(from r541323, activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPullConsumer.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPollingConsumer.java?view=diff&rev=541335&p1=activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPullConsumer.java&r1=541323&p2=activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPollingConsumer.java&r2=541335
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPullConsumer.java
(original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPollingConsumer.java
Thu May 24 08:45:50 2007
@@ -17,7 +17,7 @@
  */
 package org.apache.camel.component.jms;
 
-import org.apache.camel.impl.PullConsumerSupport;
+import org.apache.camel.impl.PollingConsumerSupport;
 import org.springframework.jms.core.JmsOperations;
 import org.springframework.jms.core.JmsTemplate;
 import org.springframework.jms.core.JmsTemplate102;
@@ -27,10 +27,10 @@
 /**
  * @version $Revision: 1.1 $
  */
-public class JmsPullConsumer extends PullConsumerSupport<JmsExchange> {
+public class JmsPollingConsumer extends PollingConsumerSupport<JmsExchange> {
     private JmsOperations template;
 
-    public JmsPullConsumer(JmsEndpoint endpoint, JmsOperations template) {
+    public JmsPollingConsumer(JmsEndpoint endpoint, JmsOperations template) {
         super(endpoint);
         this.template = template;
     }

Propchange: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsPollingConsumer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java?view=diff&rev=541335&r1=541334&r2=541335
==============================================================================
--- activemq/camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
(original)
+++ activemq/camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
Thu May 24 08:45:50 2007
@@ -19,8 +19,6 @@
 
 import java.lang.reflect.Method;
 import java.util.List;
-import java.util.concurrent.ScheduledExecutorService;
-
 import javax.persistence.EntityManager;
 import javax.persistence.LockModeType;
 import javax.persistence.PersistenceException;
@@ -28,7 +26,7 @@
 
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
-import org.apache.camel.impl.PollingConsumer;
+import org.apache.camel.impl.ScheduledPollConsumer;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -37,7 +35,7 @@
 /**
  * @version $Revision$
  */
-public class JpaConsumer extends PollingConsumer<Exchange> {
+public class JpaConsumer extends ScheduledPollConsumer<Exchange> {
     private static final transient Log log = LogFactory.getLog(JpaConsumer.class);
     private final JpaEndpoint endpoint;
     private final TransactionStrategy template;

Modified: activemq/camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaEndpoint.java?view=diff&rev=541335&r1=541334&r2=541335
==============================================================================
--- activemq/camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaEndpoint.java
(original)
+++ activemq/camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaEndpoint.java
Thu May 24 08:45:50 2007
@@ -24,9 +24,8 @@
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.builder.ExpressionBuilder;
-import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.impl.DefaultExchange;
-import org.apache.camel.impl.PollingEndpoint;
+import org.apache.camel.impl.ScheduledPollEndpoint;
 import org.apache.camel.util.IntrospectionSupport;
 import org.springframework.orm.jpa.JpaTemplate;
 
@@ -38,7 +37,7 @@
 /**
  * @version $Revision$
  */
-public class JpaEndpoint extends PollingEndpoint<Exchange> {
+public class JpaEndpoint extends ScheduledPollEndpoint<Exchange> {
     private EntityManagerFactory entityManagerFactory;
     private String persistenceUnit = "camel";
     private JpaTemplate template;

Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java?view=diff&rev=541335&r1=541334&r2=541335
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
(original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
Thu May 24 08:45:50 2007
@@ -19,7 +19,7 @@
 
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
-import org.apache.camel.impl.PollingConsumer;
+import org.apache.camel.impl.ScheduledPollConsumer;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -37,7 +37,7 @@
  *
  * @version $Revision: 523430 $
  */
-public class MailConsumer extends PollingConsumer<MailExchange> implements MessageCountListener
{
+public class MailConsumer extends ScheduledPollConsumer<MailExchange> implements MessageCountListener
{
     private static final transient Log log = LogFactory.getLog(MailConsumer.class);
     private final MailEndpoint endpoint;
     private final Folder folder;

Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java?view=diff&rev=541335&r1=541334&r2=541335
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java
(original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java
Thu May 24 08:45:50 2007
@@ -20,8 +20,7 @@
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
-import org.apache.camel.impl.DefaultEndpoint;
-import org.apache.camel.impl.PollingEndpoint;
+import org.apache.camel.impl.ScheduledPollEndpoint;
 import org.springframework.mail.javamail.JavaMailSender;
 
 import javax.mail.Message;
@@ -30,7 +29,7 @@
 /**
  * @version $Revision:520964 $
  */
-public class MailEndpoint extends PollingEndpoint<MailExchange> {
+public class MailEndpoint extends ScheduledPollEndpoint<MailExchange> {
     private MailBinding binding;
     private MailConfiguration configuration;
 



Mime
View raw message