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

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

public abstract class RemoteFileConsumer<T>
extends GenericFileConsumer<T>

Base class for remote file consumers.


Field Summary
protected  boolean loggedIn
           
 
Fields inherited from class org.apache.camel.component.file.GenericFileConsumer
endpoint, fileExpressionResult, log, maxMessagesPerPoll, operations, pendingExchanges, shutdownRunningTask
 
Constructor Summary
RemoteFileConsumer(RemoteFileEndpoint<T> endpoint, Processor processor, RemoteFileOperations<T> operations)
           
 
Method Summary
protected  void connectIfNecessary()
           
protected  void disconnect()
           
protected  void doStop()
           
 RemoteFileEndpoint<T> getEndpoint()
           
protected  RemoteFileOperations getOperations()
           
protected  void postPollCheck()
           
protected  boolean prePollCheck()
           
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, deferShutdown, doStart, getPendingExchangesSize, isBatchAllowed, isInProgress, isMatched, isValidFile, poll, pollDirectory, prepareShutdown, processBatch, processExchange, setMaxMessagesPerPoll, setOperations
 
Methods inherited from class org.apache.camel.impl.ScheduledPollConsumer
doSuspend, getDelay, getInitialDelay, getPollStrategy, getTimeUnit, isPollAllowed, isUseFixedDelay, run, setDelay, setInitialDelay, setPollStrategy, setTimeUnit, setUseFixedDelay
 
Methods inherited from class org.apache.camel.impl.DefaultConsumer
getAsyncProcessor, getExceptionHandler, getProcessor, handleException, setExceptionHandler, toString
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, doResume, doShutdown, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, 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
Constructor Detail

RemoteFileConsumer

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

getEndpoint

public RemoteFileEndpoint<T> getEndpoint()
Specified by:
getEndpoint in interface Consumer
Overrides:
getEndpoint in class DefaultConsumer

getOperations

protected RemoteFileOperations getOperations()

prePollCheck

protected boolean prePollCheck()
                        throws Exception
Overrides:
prePollCheck in class GenericFileConsumer<T>
Throws:
Exception

postPollCheck

protected void postPollCheck()
Overrides:
postPollCheck in class GenericFileConsumer<T>

doStop

protected void doStop()
               throws Exception
Overrides:
doStop in class ScheduledPollConsumer
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