org.apache.camel.component.file
Class FileConsumer

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.impl.DefaultConsumer<E>
          extended by org.apache.camel.impl.ScheduledPollConsumer<FileExchange>
              extended by org.apache.camel.component.file.FileConsumer
All Implemented Interfaces:
Runnable, Consumer<FileExchange>, Service

public class FileConsumer
extends ScheduledPollConsumer<FileExchange>

Version:
$Revision: 523016 $

Constructor Summary
FileConsumer(FileEndpoint endpoint, Processor processor)
           
 
Method Summary
 String getRegexPattern()
           
 boolean isAttemptFileLock()
           
protected  boolean isMatched(File file)
           
 boolean isRecursive()
           
protected  boolean isValidFile(File file)
           
protected  void poll()
          The polling method which is invoked periodically to poll this consumer
protected  void pollFile(File file)
           
protected  void pollFileOrDirectory(File fileOrDirectory, boolean processDir)
           
protected  void processFile(File file)
           
 void setAttemptFileLock(boolean attemptFileLock)
           
 void setRecursive(boolean recursive)
           
 void setRegexPattern(String regexPattern)
           
 
Methods inherited from class org.apache.camel.impl.ScheduledPollConsumer
doStart, doStop, getDelay, getInitialDelay, getTimeUnit, isUseFixedDelay, run, setDelay, setInitialDelay, setTimeUnit, setUseFixedDelay
 
Methods inherited from class org.apache.camel.impl.DefaultConsumer
getEndpoint, getExceptionHandler, getProcessor, handleException, setExceptionHandler, toString
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
isStarted, isStopped, isStopping, 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
 

Constructor Detail

FileConsumer

public FileConsumer(FileEndpoint endpoint,
                    Processor processor)
Method Detail

poll

protected void poll()
             throws Exception
Description copied from class: ScheduledPollConsumer
The polling method which is invoked periodically to poll this consumer

Specified by:
poll in class ScheduledPollConsumer<FileExchange>
Throws:
Exception

pollFileOrDirectory

protected void pollFileOrDirectory(File fileOrDirectory,
                                   boolean processDir)

pollFile

protected void pollFile(File file)

processFile

protected void processFile(File file)

isValidFile

protected boolean isValidFile(File file)

isMatched

protected boolean isMatched(File file)

isRecursive

public boolean isRecursive()
Returns:
the recursive

setRecursive

public void setRecursive(boolean recursive)
Parameters:
recursive - the recursive to set

isAttemptFileLock

public boolean isAttemptFileLock()
Returns:
the attemptFileLock

setAttemptFileLock

public void setAttemptFileLock(boolean attemptFileLock)
Parameters:
attemptFileLock - the attemptFileLock to set

getRegexPattern

public String getRegexPattern()
Returns:
the regexPattern

setRegexPattern

public void setRegexPattern(String regexPattern)
Parameters:
regexPattern - the regexPattern to set


Copyright © 2007 Apache Software Foundation. All Rights Reserved.