org.apache.camel.component.file
Class FileEndpoint

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.impl.DefaultEndpoint
          extended by org.apache.camel.impl.ScheduledPollEndpoint
              extended by org.apache.camel.component.file.GenericFileEndpoint<File>
                  extended by org.apache.camel.component.file.FileEndpoint
All Implemented Interfaces:
CamelContextAware, Endpoint, IsSingleton, Service, ShutdownableService, BrowsableEndpoint, HasId, StatefulService, SuspendableService

public class FileEndpoint
extends GenericFileEndpoint<File>

File endpoint.


Field Summary
 
Fields inherited from class org.apache.camel.component.file.GenericFileEndpoint
allowNullBody, antFilter, autoCreate, bufferSize, charset, configuration, DEFAULT_IDEMPOTENT_CACHE_SIZE, DEFAULT_STRATEGYFACTORY_CLASS, delete, directoryMustExist, doneFileName, eagerDeleteTargetFile, eagerMaxMessagesPerPoll, exclude, exclusiveReadLockStrategy, fileExist, fileName, filter, flatten, idempotent, idempotentRepository, include, inProgressRepository, keepLastModified, localWorkDirectory, log, maxDepth, maxMessagesPerPoll, minDepth, move, moveExisting, moveFailed, noop, preMove, processStrategy, readLock, readLockCheckInterval, readLockMinLength, readLockTimeout, recursive, sortBy, sorter, startingDirectoryMustExist, tempFileName, tempPrefix
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
FileEndpoint()
           
FileEndpoint(String endpointUri, Component component)
           
 
Method Summary
 FileConsumer createConsumer(Processor processor)
          Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor
protected  String createEndpointUri()
          A factory method to lazily create the endpointUri if none is specified
 Exchange createExchange(GenericFile<File> file)
           
 GenericFileProducer<File> createProducer()
          Creates a new producer which is used send messages into the endpoint
 File getFile()
           
 char getFileSeparator()
           
 String getScheme()
           
 boolean isAbsolute(String name)
           
 boolean isCopyAndDeleteOnRenameFail()
           
 boolean isForceWrites()
           
protected  FileConsumer newFileConsumer(Processor processor, GenericFileOperations<File> operations)
          Strategy to create a new FileConsumer
 void setCopyAndDeleteOnRenameFail(boolean copyAndDeleteOnRenameFail)
           
 void setFile(File file)
           
 void setForceWrites(boolean forceWrites)
           
 
Methods inherited from class org.apache.camel.component.file.GenericFileEndpoint
configureExchange, configureMessage, configureMoveOrPreMoveExpression, createDoneFileName, createGenericFileStrategy, doStart, doStop, getAntFilter, getBufferSize, getCharset, getConfiguration, getDoneFileName, getExchanges, getExclude, getExclusiveReadLockStrategy, getFileExist, getFileName, getFilter, getGeneratedFileName, getGenericFileProcessStrategy, getIdempotentRepository, getInclude, getInProgressRepository, getLocalWorkDirectory, getMaxDepth, getMaxMessagesPerPoll, getMinDepth, getMove, getMoveExisting, getMoveFailed, getParamsAsMap, getPreMove, getProcessStrategy, getReadLock, getReadLockCheckInterval, getReadLockMinLength, getReadLockTimeout, getSortBy, getSorter, getTempFileName, getTempPrefix, isAllowNullBody, isAutoCreate, isDelete, isDirectoryMustExist, isDoneFile, isEagerDeleteTargetFile, isEagerMaxMessagesPerPoll, isFlatten, isIdempotent, isIdempotentSet, isKeepLastModified, isNoop, isRecursive, isSingleton, isStartingDirectoryMustExist, setAllowNullBody, setAntExclude, setAntInclude, setAutoCreate, setBufferSize, setCharset, setConfiguration, setDelete, setDirectoryMustExist, setDoneFileName, setEagerDeleteTargetFile, setEagerMaxMessagesPerPoll, setExclude, setExclusiveReadLockStrategy, setFileExist, setFileName, setFileName, setFilter, setFlatten, setIdempotent, setIdempotentRepository, setInclude, setInProgressRepository, setKeepLastModified, setLocalWorkDirectory, setMaxDepth, setMaxMessagesPerPoll, setMinDepth, setMove, setMove, setMoveExisting, setMoveExisting, setMoveFailed, setMoveFailed, setNoop, setPreMove, setPreMove, setProcessStrategy, setReadLock, setReadLockCheckInterval, setReadLockMinLength, setReadLockTimeout, setRecursive, setSortBy, setSortBy, setSortBy, setSorter, setStartingDirectoryMustExist, setTempFileName, setTempFileName, setTempPrefix
 
Methods inherited from class org.apache.camel.impl.ScheduledPollEndpoint
configureProperties
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureConsumer, createEndpointConfiguration, createExchange, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExchangePattern, getId, hashCode, isLenientProperties, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous, toString
 
Methods inherited from class org.apache.camel.support.ServiceSupport
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Endpoint
configureProperties, createExchange, createExchange, createExchange, createPollingConsumer, getCamelContext, getEndpointConfiguration, getEndpointKey, getEndpointUri, isLenientProperties, setCamelContext
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Constructor Detail

FileEndpoint

public FileEndpoint()

FileEndpoint

public FileEndpoint(String endpointUri,
                    Component component)
Method Detail

createConsumer

public FileConsumer createConsumer(Processor processor)
                            throws Exception
Description copied from interface: Endpoint
Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor

Specified by:
createConsumer in interface Endpoint
Specified by:
createConsumer in class GenericFileEndpoint<File>
Parameters:
processor - the given processor
Returns:
a newly created consumer
Throws:
Exception - can be thrown

createProducer

public GenericFileProducer<File> createProducer()
                                         throws Exception
Description copied from interface: Endpoint
Creates a new producer which is used send messages into the endpoint

Specified by:
createProducer in interface Endpoint
Specified by:
createProducer in class GenericFileEndpoint<File>
Returns:
a newly created producer
Throws:
Exception - can be thrown

createExchange

public Exchange createExchange(GenericFile<File> file)
Specified by:
createExchange in class GenericFileEndpoint<File>

newFileConsumer

protected FileConsumer newFileConsumer(Processor processor,
                                       GenericFileOperations<File> operations)
Strategy to create a new FileConsumer

Parameters:
processor - the given processor
operations - file operations
Returns:
the created consumer

getFile

public File getFile()

setFile

public void setFile(File file)

getScheme

public String getScheme()
Specified by:
getScheme in class GenericFileEndpoint<File>

createEndpointUri

protected String createEndpointUri()
Description copied from class: DefaultEndpoint
A factory method to lazily create the endpointUri if none is specified

Overrides:
createEndpointUri in class DefaultEndpoint

getFileSeparator

public char getFileSeparator()
Specified by:
getFileSeparator in class GenericFileEndpoint<File>

isAbsolute

public boolean isAbsolute(String name)
Specified by:
isAbsolute in class GenericFileEndpoint<File>

isCopyAndDeleteOnRenameFail

public boolean isCopyAndDeleteOnRenameFail()

setCopyAndDeleteOnRenameFail

public void setCopyAndDeleteOnRenameFail(boolean copyAndDeleteOnRenameFail)

isForceWrites

public boolean isForceWrites()

setForceWrites

public void setForceWrites(boolean forceWrites)


Apache CAMEL