org.apache.camel.component.file.remote
Class RemoteFilePollingConsumerPollStrategy

java.lang.Object
  extended by org.apache.camel.impl.DefaultPollingConsumerPollStrategy
      extended by org.apache.camel.component.file.remote.RemoteFilePollingConsumerPollStrategy
All Implemented Interfaces:
PollingConsumerPollStrategy

public class RemoteFilePollingConsumerPollStrategy
extends DefaultPollingConsumerPollStrategy

Remote file consumer polling strategy that attempts to help recovering from lost connections.

Version:

Field Summary
 
Fields inherited from class org.apache.camel.impl.DefaultPollingConsumerPollStrategy
log
 
Constructor Summary
RemoteFilePollingConsumerPollStrategy()
           
 
Method Summary
 boolean rollback(Consumer consumer, Endpoint endpoint, int retryCounter, Exception e)
          Called when poll failed
 
Methods inherited from class org.apache.camel.impl.DefaultPollingConsumerPollStrategy
begin, commit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteFilePollingConsumerPollStrategy

public RemoteFilePollingConsumerPollStrategy()
Method Detail

rollback

public boolean rollback(Consumer consumer,
                        Endpoint endpoint,
                        int retryCounter,
                        Exception e)
                 throws Exception
Description copied from interface: PollingConsumerPollStrategy
Called when poll failed

Specified by:
rollback in interface PollingConsumerPollStrategy
Overrides:
rollback in class DefaultPollingConsumerPollStrategy
Parameters:
consumer - the consumer
endpoint - the endpoint being consumed
retryCounter - current retry attempt, starting from 0.
e - the caused exception
Returns:
whether to retry immediately or not. Return false to ignore the problem, true to try immediately again
Throws:
Exception - can be used to rethrow the caused exception. Notice that thrown an exception will terminate the scheduler and thus Camel will not trigger again. So if you want to let the scheduler to continue to run then do not throw any exception from this method.


Apache CAMEL