org.apache.camel.component.file.remote
Class RemoteFileConsumer<T>

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.impl.DefaultConsumer
          extended by org.apache.camel.impl.ScheduledPollConsumer
              extended by org.apache.camel.impl.ScheduledBatchPollingConsumer
                  extended by org.apache.camel.component.file.GenericFileConsumer<T>
                      extended by org.apache.camel.component.file.remote.RemoteFileConsumer<T>
All Implemented Interfaces:
Runnable, org.apache.camel.BatchConsumer, org.apache.camel.Consumer, org.apache.camel.PollingConsumerPollingStrategy, org.apache.camel.RouteAware, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.ShutdownAware, org.apache.camel.spi.ShutdownPrepared, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
Direct Known Subclasses:
FtpConsumer, SftpConsumer

public abstract class RemoteFileConsumer<T>
extends org.apache.camel.component.file.GenericFileConsumer<T>

Base class for remote file consumers.


Field Summary
protected  boolean loggedIn
           
protected  boolean loggedInWarning
           
 
Fields inherited from class org.apache.camel.component.file.GenericFileConsumer
customProcessor, eagerLimitMaxMessagesPerPoll, endpoint, fileExpressionResult, log, operations, pendingExchanges, prepareOnStartup, shutdownRunningTask
 
Fields inherited from class org.apache.camel.impl.ScheduledBatchPollingConsumer
maxMessagesPerPoll
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
RemoteFileConsumer(RemoteFileEndpoint<T> endpoint, org.apache.camel.Processor processor, RemoteFileOperations<T> operations)
           
 
Method Summary
protected  void connectIfNecessary()
           
protected  void disconnect()
           
protected  void doStop()
           
 RemoteFileEndpoint<T> getEndpoint()
           
protected  RemoteFileOperations<T> getOperations()
           
protected  boolean isRetrieveFile()
           
protected  void postPollCheck()
           
protected  boolean prePollCheck()
           
protected  boolean processExchange(org.apache.camel.Exchange exchange)
           
protected  void recoverableConnectIfNecessary()
           
protected  String remoteServer()
          Returns human readable server information for logging purpose
 
Methods inherited from class org.apache.camel.component.file.GenericFileConsumer
canPollMoreFiles, customProcessExchange, doStart, evaluateFileExpression, getCustomProcessor, ignoreCannotRetrieveFile, isEagerLimitMaxMessagesPerPoll, isInProgress, isMatched, isMatched, isValidFile, poll, pollDirectory, processBatch, removeExcessiveInProgressFiles, setCustomProcessor, setEagerLimitMaxMessagesPerPoll, setOperations
 
Methods inherited from class org.apache.camel.impl.ScheduledBatchPollingConsumer
deferShutdown, getMaxMessagesPerPoll, getPendingExchangesSize, isBatchAllowed, prepareShutdown, processEmptyMessage, setMaxMessagesPerPoll
 
Methods inherited from class org.apache.camel.impl.ScheduledPollConsumer
afterPoll, beforePoll, doShutdown, doSuspend, getBackoffCounter, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDelay, getInitialDelay, getPollStrategy, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isPollAllowed, isPolling, isSchedulerStarted, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, onInit, run, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay, startScheduler
 
Methods inherited from class org.apache.camel.impl.DefaultConsumer
createUoW, doneUoW, getAsyncProcessor, getExceptionHandler, getProcessor, getRoute, handleException, handleException, setExceptionHandler, setRoute, toString
 
Methods inherited from class org.apache.camel.support.ServiceSupport
doResume, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
 

Field Detail

loggedIn

protected boolean loggedIn

loggedInWarning

protected boolean loggedInWarning
Constructor Detail

RemoteFileConsumer

public RemoteFileConsumer(RemoteFileEndpoint<T> endpoint,
                          org.apache.camel.Processor processor,
                          RemoteFileOperations<T> operations)
Method Detail

getEndpoint

public RemoteFileEndpoint<T> getEndpoint()
Specified by:
getEndpoint in interface org.apache.camel.Consumer
Overrides:
getEndpoint in class org.apache.camel.impl.DefaultConsumer

getOperations

protected RemoteFileOperations<T> getOperations()

prePollCheck

protected boolean prePollCheck()
                        throws Exception
Overrides:
prePollCheck in class org.apache.camel.component.file.GenericFileConsumer<T>
Throws:
Exception

postPollCheck

protected void postPollCheck()
Overrides:
postPollCheck in class org.apache.camel.component.file.GenericFileConsumer<T>

processExchange

protected boolean processExchange(org.apache.camel.Exchange exchange)
Overrides:
processExchange in class org.apache.camel.component.file.GenericFileConsumer<T>

isRetrieveFile

protected boolean isRetrieveFile()
Overrides:
isRetrieveFile in class org.apache.camel.component.file.GenericFileConsumer<T>

doStop

protected void doStop()
               throws Exception
Overrides:
doStop in class org.apache.camel.component.file.GenericFileConsumer<T>
Throws:
Exception

disconnect

protected void disconnect()

recoverableConnectIfNecessary

protected void recoverableConnectIfNecessary()
                                      throws Exception
Throws:
Exception

connectIfNecessary

protected void connectIfNecessary()
                           throws IOException
Throws:
IOException

remoteServer

protected String remoteServer()
Returns human readable server information for logging purpose



Apache Camel