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, 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  String remoteServer()
          Returns human readable server information for logging purpose
 
Methods inherited from class org.apache.camel.component.file.GenericFileConsumer
deferShutdown, doStart, getPendingExchangesSize, isBatchAllowed, isInProgress, isMatched, isValidFile, poll, pollDirectory, processBatch, processExchange, setMaxMessagesPerPoll
 
Methods inherited from class org.apache.camel.impl.ScheduledPollConsumer
getDelay, getInitialDelay, getPollStrategy, getTimeUnit, isPollAllowed, isSuspended, isUseFixedDelay, resume, run, setDelay, setInitialDelay, setPollStrategy, setTimeUnit, setUseFixedDelay, suspend
 
Methods inherited from class org.apache.camel.impl.DefaultConsumer
getExceptionHandler, getProcessor, handleException, setExceptionHandler, toString
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, removeChildService, start, stop
 
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
 

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()

connectIfNecessary

protected void connectIfNecessary()
                           throws IOException
Throws:
IOException

remoteServer

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



Copyright © 2007-2010 The Apache Software Foundation. All Rights Reserved.