org.apache.camel.component.file
Class FileConsumer

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<File>
                  extended by org.apache.camel.component.file.FileConsumer
All Implemented Interfaces:
Runnable, BatchConsumer, Consumer, Service, ShutdownAware, SuspendableService

public class FileConsumer
extends GenericFileConsumer<File>

File consumer.


Field Summary
 
Fields inherited from class org.apache.camel.component.file.GenericFileConsumer
endpoint, fileExpressionResult, log, loggedIn, maxMessagesPerPoll, operations, pendingExchanges, shutdownRunningTask
 
Constructor Summary
FileConsumer(GenericFileEndpoint<File> endpoint, Processor processor, GenericFileOperations<File> operations)
           
 
Method Summary
static GenericFile<File> asGenericFile(String endpointPath, File file)
          Creates a new GenericFile based on the given file.
protected  void pollDirectory(String fileName, List<GenericFile<File>> fileList)
          Polls the given directory for files to process
 
Methods inherited from class org.apache.camel.component.file.GenericFileConsumer
deferShutdown, doStart, getPendingExchangesSize, isBatchAllowed, isInProgress, isMatched, isValidFile, poll, postPollCheck, prePollCheck, processBatch, processExchange, setMaxMessagesPerPoll
 
Methods inherited from class org.apache.camel.impl.ScheduledPollConsumer
doStop, getDelay, getInitialDelay, getPollStrategy, getTimeUnit, isPollAllowed, isSuspended, isUseFixedDelay, resume, run, setDelay, setInitialDelay, setPollStrategy, setTimeUnit, setUseFixedDelay, suspend
 
Methods inherited from class org.apache.camel.impl.DefaultConsumer
getEndpoint, 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.Consumer
getEndpoint
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Constructor Detail

FileConsumer

public FileConsumer(GenericFileEndpoint<File> endpoint,
                    Processor processor,
                    GenericFileOperations<File> operations)
Method Detail

pollDirectory

protected void pollDirectory(String fileName,
                             List<GenericFile<File>> fileList)
Description copied from class: GenericFileConsumer
Polls the given directory for files to process

Specified by:
pollDirectory in class GenericFileConsumer<File>
Parameters:
fileName - current directory or file
fileList - current list of files gathered

asGenericFile

public static GenericFile<File> asGenericFile(String endpointPath,
                                              File file)
Creates a new GenericFile based on the given file.

Parameters:
endpointPath - the starting directory the endpoint was configured with
file - the source file
Returns:
wrapped as a GenericFile


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