|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.impl.ServiceSupport
org.apache.camel.impl.DefaultEndpoint
org.apache.camel.impl.ScheduledPollEndpoint
org.apache.camel.component.file.GenericFileEndpoint<T>
public abstract class GenericFileEndpoint<T>
Generic FileEndpoint
| Constructor Summary | |
|---|---|
GenericFileEndpoint()
|
|
GenericFileEndpoint(String endpointUri,
Component component)
|
|
| Method Summary | |
|---|---|
void |
configureExchange(Exchange exchange)
Set up the exchange properties with the options of the file endpoint |
void |
configureMessage(GenericFile<T> file,
Message message)
Configures the given message with the file which sets the body to the file object. |
protected String |
configureMoveOrPreMoveExpression(String expression)
Strategy to configure the move or premove option based on a String input. |
abstract GenericFileConsumer<T> |
createConsumer(Processor processor)
Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor |
protected String |
createDoneFileName(String fileName)
Creates the associated name of the done file based on the given file name. |
abstract Exchange |
createExchange(GenericFile<T> file)
|
protected GenericFileProcessStrategy<T> |
createGenericFileStrategy()
A strategy method to lazily create the file strategy |
abstract GenericFileProducer<T> |
createProducer()
Creates a new producer which is used send messages into the endpoint |
int |
getBufferSize()
|
String |
getCharset()
|
GenericFileConfiguration |
getConfiguration()
|
String |
getDoneFileName()
|
String |
getExclude()
|
GenericFileExclusiveReadLockStrategy<T> |
getExclusiveReadLockStrategy()
|
GenericFileExist |
getFileExist()
|
Expression |
getFileName()
|
abstract char |
getFileSeparator()
|
GenericFileFilter<T> |
getFilter()
|
String |
getGeneratedFileName(Message message)
Return the file name that will be auto-generated for the given message if none is provided |
GenericFileProcessStrategy<T> |
getGenericFileProcessStrategy()
|
IdempotentRepository<String> |
getIdempotentRepository()
|
String |
getInclude()
|
IdempotentRepository<String> |
getInProgressRepository()
|
String |
getLocalWorkDirectory()
|
int |
getMaxMessagesPerPoll()
|
Expression |
getMove()
|
Expression |
getMoveFailed()
|
protected Map<String,Object> |
getParamsAsMap()
|
Expression |
getPreMove()
|
GenericFileProcessStrategy<T> |
getProcessStrategy()
|
String |
getReadLock()
|
long |
getReadLockCheckInterval()
|
long |
getReadLockTimeout()
|
abstract String |
getScheme()
|
Comparator<Exchange> |
getSortBy()
|
Comparator<GenericFile<T>> |
getSorter()
|
Expression |
getTempFileName()
|
String |
getTempPrefix()
|
abstract boolean |
isAbsolute(String name)
|
boolean |
isAutoCreate()
|
boolean |
isDelete()
|
boolean |
isDirectoryMustExist()
|
protected boolean |
isDoneFile(String fileName)
Is the given file a done file? This method should only be invoked if a done filename property has been set on this endpoint. |
boolean |
isEagerDeleteTargetFile()
|
boolean |
isFlatten()
|
Boolean |
isIdempotent()
|
boolean |
isKeepLastModified()
|
boolean |
isNoop()
|
boolean |
isRecursive()
|
boolean |
isSingleton()
Whether this class supports being singleton or not. |
boolean |
isStartingDirectoryMustExist()
|
void |
setAutoCreate(boolean autoCreate)
|
void |
setBufferSize(int bufferSize)
|
void |
setCharset(String charset)
|
void |
setConfiguration(GenericFileConfiguration configuration)
|
void |
setDelete(boolean delete)
|
void |
setDirectoryMustExist(boolean directoryMustExist)
|
void |
setDoneFileName(String doneFileName)
Sets the done file name. |
void |
setEagerDeleteTargetFile(boolean eagerDeleteTargetFile)
|
void |
setExclude(String exclude)
|
void |
setExclusiveReadLockStrategy(GenericFileExclusiveReadLockStrategy<T> exclusiveReadLockStrategy)
|
void |
setFileExist(GenericFileExist fileExist)
|
void |
setFileName(Expression fileName)
|
void |
setFileName(String fileLanguageExpression)
Sets the file expression based on SimpleLanguage |
void |
setFilter(GenericFileFilter<T> filter)
|
void |
setFlatten(boolean flatten)
|
void |
setIdempotent(Boolean idempotent)
|
void |
setIdempotentRepository(IdempotentRepository<String> idempotentRepository)
|
void |
setInclude(String include)
|
void |
setInProgressRepository(IdempotentRepository<String> inProgressRepository)
|
void |
setKeepLastModified(boolean keepLastModified)
|
void |
setLocalWorkDirectory(String localWorkDirectory)
|
void |
setMaxMessagesPerPoll(int maxMessagesPerPoll)
|
void |
setMove(Expression move)
|
void |
setMove(String fileLanguageExpression)
Sets the move expression based on SimpleLanguage |
void |
setMoveFailed(Expression moveFailed)
|
void |
setMoveFailed(String fileLanguageExpression)
Sets the move failure expression based on SimpleLanguage |
void |
setNoop(boolean noop)
|
void |
setPreMove(Expression preMove)
|
void |
setPreMove(String fileLanguageExpression)
Sets the pre move expression based on SimpleLanguage |
void |
setProcessStrategy(GenericFileProcessStrategy<T> processStrategy)
|
void |
setReadLock(String readLock)
|
void |
setReadLockCheckInterval(long readLockCheckInterval)
|
void |
setReadLockTimeout(long readLockTimeout)
|
void |
setRecursive(boolean recursive)
|
void |
setSortBy(Comparator<Exchange> sortBy)
|
void |
setSortBy(String expression)
|
void |
setSortBy(String expression,
boolean reverse)
|
void |
setSorter(Comparator<GenericFile<T>> sorter)
|
void |
setStartingDirectoryMustExist(boolean startingDirectoryMustExist)
|
void |
setTempFileName(Expression tempFileName)
|
void |
setTempFileName(String tempFileNameExpression)
|
void |
setTempPrefix(String tempPrefix)
Enables and uses temporary prefix when writing files, after write it will be renamed to the correct name. |
| Methods inherited from class org.apache.camel.impl.ScheduledPollEndpoint |
|---|
configureConsumer, configureProperties, getConsumerProperties, setConsumerProperties |
| Methods inherited from class org.apache.camel.impl.DefaultEndpoint |
|---|
createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExchangePattern, getExchangeType, getId, hashCode, isLenientProperties, isSynchronous, sanitizeUri, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous, toString |
| Methods inherited from class org.apache.camel.impl.ServiceSupport |
|---|
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, 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.Service |
|---|
start, stop |
| Field Detail |
|---|
protected static final transient String DEFAULT_STRATEGYFACTORY_CLASS
protected static final transient int DEFAULT_IDEMPOTENT_CACHE_SIZE
protected final transient org.slf4j.Logger log
protected GenericFileProcessStrategy<T> processStrategy
protected GenericFileConfiguration configuration
protected IdempotentRepository<String> inProgressRepository
protected String localWorkDirectory
protected boolean autoCreate
protected boolean startingDirectoryMustExist
protected boolean directoryMustExist
protected int bufferSize
protected GenericFileExist fileExist
protected boolean noop
protected boolean recursive
protected boolean delete
protected boolean flatten
protected int maxMessagesPerPoll
protected String tempPrefix
protected Expression tempFileName
protected boolean eagerDeleteTargetFile
protected String include
protected String exclude
protected String charset
protected Expression fileName
protected Expression move
protected Expression moveFailed
protected Expression preMove
protected Boolean idempotent
protected IdempotentRepository<String> idempotentRepository
protected GenericFileFilter<T> filter
protected Comparator<GenericFile<T>> sorter
protected Comparator<Exchange> sortBy
protected String readLock
protected long readLockCheckInterval
protected long readLockTimeout
protected GenericFileExclusiveReadLockStrategy<T> exclusiveReadLockStrategy
protected boolean keepLastModified
protected String doneFileName
| Constructor Detail |
|---|
public GenericFileEndpoint()
public GenericFileEndpoint(String endpointUri,
Component component)
| Method Detail |
|---|
public boolean isSingleton()
IsSingleton
public abstract GenericFileConsumer<T> createConsumer(Processor processor)
throws Exception
Endpoint
processor - the given processor
Exception - can be thrown
public abstract GenericFileProducer<T> createProducer()
throws Exception
Endpoint
Exception - can be thrownpublic abstract Exchange createExchange(GenericFile<T> file)
public abstract String getScheme()
public abstract char getFileSeparator()
public abstract boolean isAbsolute(String name)
public String getGeneratedFileName(Message message)
public GenericFileProcessStrategy<T> getGenericFileProcessStrategy()
protected GenericFileProcessStrategy<T> createGenericFileStrategy()
public boolean isNoop()
public void setNoop(boolean noop)
public boolean isRecursive()
public void setRecursive(boolean recursive)
public String getInclude()
public void setInclude(String include)
public String getExclude()
public void setExclude(String exclude)
public boolean isDelete()
public void setDelete(boolean delete)
public boolean isFlatten()
public void setFlatten(boolean flatten)
public Expression getMove()
public void setMove(Expression move)
public void setMoveFailed(String fileLanguageExpression)
SimpleLanguage
public Expression getMoveFailed()
public void setMoveFailed(Expression moveFailed)
public void setMove(String fileLanguageExpression)
SimpleLanguage
public Expression getPreMove()
public void setPreMove(Expression preMove)
public void setPreMove(String fileLanguageExpression)
SimpleLanguage
public Expression getFileName()
public void setFileName(Expression fileName)
public void setFileName(String fileLanguageExpression)
SimpleLanguage
public String getDoneFileName()
public void setDoneFileName(String doneFileName)
public Boolean isIdempotent()
public String getCharset()
public void setCharset(String charset)
public void setIdempotent(Boolean idempotent)
public IdempotentRepository<String> getIdempotentRepository()
public void setIdempotentRepository(IdempotentRepository<String> idempotentRepository)
public GenericFileFilter<T> getFilter()
public void setFilter(GenericFileFilter<T> filter)
public Comparator<GenericFile<T>> getSorter()
public void setSorter(Comparator<GenericFile<T>> sorter)
public Comparator<Exchange> getSortBy()
public void setSortBy(Comparator<Exchange> sortBy)
public void setSortBy(String expression)
public void setSortBy(String expression,
boolean reverse)
public String getTempPrefix()
public void setTempPrefix(String tempPrefix)
public Expression getTempFileName()
public void setTempFileName(Expression tempFileName)
public void setTempFileName(String tempFileNameExpression)
public boolean isEagerDeleteTargetFile()
public void setEagerDeleteTargetFile(boolean eagerDeleteTargetFile)
public GenericFileConfiguration getConfiguration()
public void setConfiguration(GenericFileConfiguration configuration)
public GenericFileExclusiveReadLockStrategy<T> getExclusiveReadLockStrategy()
public void setExclusiveReadLockStrategy(GenericFileExclusiveReadLockStrategy<T> exclusiveReadLockStrategy)
public String getReadLock()
public void setReadLock(String readLock)
public long getReadLockCheckInterval()
public void setReadLockCheckInterval(long readLockCheckInterval)
public long getReadLockTimeout()
public void setReadLockTimeout(long readLockTimeout)
public int getBufferSize()
public void setBufferSize(int bufferSize)
public GenericFileExist getFileExist()
public void setFileExist(GenericFileExist fileExist)
public boolean isAutoCreate()
public void setAutoCreate(boolean autoCreate)
public boolean isStartingDirectoryMustExist()
public void setStartingDirectoryMustExist(boolean startingDirectoryMustExist)
public boolean isDirectoryMustExist()
public void setDirectoryMustExist(boolean directoryMustExist)
public GenericFileProcessStrategy<T> getProcessStrategy()
public void setProcessStrategy(GenericFileProcessStrategy<T> processStrategy)
public String getLocalWorkDirectory()
public void setLocalWorkDirectory(String localWorkDirectory)
public int getMaxMessagesPerPoll()
public void setMaxMessagesPerPoll(int maxMessagesPerPoll)
public IdempotentRepository<String> getInProgressRepository()
public void setInProgressRepository(IdempotentRepository<String> inProgressRepository)
public boolean isKeepLastModified()
public void setKeepLastModified(boolean keepLastModified)
public void configureMessage(GenericFile<T> file,
Message message)
public void configureExchange(Exchange exchange)
exchange - protected String configureMoveOrPreMoveExpression(String expression)
expression - the original string input
protected Map<String,Object> getParamsAsMap()
protected String createDoneFileName(String fileName)
fileName - the file name
protected boolean isDoneFile(String fileName)
fileName - the file name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||