|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.impl.DefaultEndpoint<E>
org.apache.camel.impl.ScheduledPollEndpoint<FileExchange>
org.apache.camel.component.file.FileEndpoint
public class FileEndpoint
A File Endpoint for working with file systems
Constructor Summary | |
---|---|
protected |
FileEndpoint(File file,
String endpointUri,
FileComponent component)
|
Method Summary | |
---|---|
Consumer<FileExchange> |
createConsumer(Processor file)
Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor |
FileExchange |
createExchange()
Create a new exchange for communicating with this endpoint |
FileExchange |
createExchange(File file)
|
protected FileProcessStrategy |
createFileStrategy()
A strategy method to lazily create the file strategy |
Producer<FileExchange> |
createProducer()
Creates a new producer which is used send messages into the endpoint |
int |
getBufferSize()
|
String[] |
getExcludedNamePostfixes()
|
String[] |
getExcludedNamePrefixes()
|
File |
getFile()
|
FileProcessStrategy |
getFileStrategy()
|
String |
getMoveNamePostfix()
|
String |
getMoveNamePrefix()
|
boolean |
isAppend()
|
boolean |
isAutoCreate()
|
boolean |
isDelete()
|
boolean |
isLock()
|
boolean |
isNoop()
|
boolean |
isSingleton()
Returns if the endpoint should be a CamelContext singleton. |
void |
setAppend(boolean append)
When writing do we append to the end of the file, or replace it? The default is to append |
void |
setAutoCreate(boolean autoCreate)
|
void |
setBufferSize(int bufferSize)
Sets the buffer size used to read/write files |
void |
setDelete(boolean delete)
|
void |
setExcludedNamePostfixes(String[] excludedNamePostfixes)
Sets the excluded file name postfixes, such as FileProcessStrategySupport.DEFAULT_LOCK_FILE_POSTFIX
to ignore lock files by default. |
void |
setExcludedNamePrefixes(String[] excludedNamePrefixes)
Sets the excluded file name prefixes, such as "." for hidden files which are excluded by default |
void |
setFileStrategy(FileProcessStrategy fileProcessStrategy)
Sets the strategy to be used when the file has been processed such as deleting or renaming it etc. |
void |
setLock(boolean lock)
|
void |
setMoveNamePostfix(String moveNamePostfix)
Sets the name postfix appended to moved files. |
void |
setMoveNamePrefix(String moveNamePrefix)
Sets the name prefix appended to moved files. |
void |
setNoop(boolean noop)
If set to true then the default FileProcessStrategy will be to use the
NoOpFileProcessStrategy to not move or copy processed files |
Methods inherited from class org.apache.camel.impl.ScheduledPollEndpoint |
---|
configureConsumer, configureProperties, getConsumerProperties, setConsumerProperties |
Methods inherited from class org.apache.camel.impl.DefaultEndpoint |
---|
convertTo, createExchange, createExecutorService, createPollingConsumer, equals, getComponent, getContext, getEndpointUri, getExchangeType, getExecutorService, hashCode, setExecutorService, toExchangeType, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected FileEndpoint(File file, String endpointUri, FileComponent component)
Method Detail |
---|
public Producer<FileExchange> createProducer() throws Exception
Endpoint
Exception
Endpoint.createProducer()
public Consumer<FileExchange> createConsumer(Processor file) throws Exception
Endpoint
file
-
Exception
Endpoint.createConsumer(org.apache.camel.Processor)
public FileExchange createExchange(File file)
file
-
Endpoint.createExchange()
public FileExchange createExchange()
Endpoint
Endpoint.createExchange()
public File getFile()
public boolean isSingleton()
Endpoint
public boolean isAutoCreate()
public void setAutoCreate(boolean autoCreate)
autoCreate
- the autoCreate to setpublic FileProcessStrategy getFileStrategy()
public void setFileStrategy(FileProcessStrategy fileProcessStrategy)
fileProcessStrategy
- the new stategy to usepublic boolean isDelete()
public void setDelete(boolean delete)
public boolean isLock()
public void setLock(boolean lock)
public String getMoveNamePostfix()
public void setMoveNamePostfix(String moveNamePostfix)
moveNamePostfix
- DefaultFileRenamer.setNamePostfix(String)
public String getMoveNamePrefix()
public void setMoveNamePrefix(String moveNamePrefix)
DefaultFileRenamer.setNamePrefix(String)
public String[] getExcludedNamePrefixes()
public void setExcludedNamePrefixes(String[] excludedNamePrefixes)
public String[] getExcludedNamePostfixes()
public void setExcludedNamePostfixes(String[] excludedNamePostfixes)
FileProcessStrategySupport.DEFAULT_LOCK_FILE_POSTFIX
to ignore lock files by default.
public boolean isNoop()
public void setNoop(boolean noop)
FileProcessStrategy
will be to use the
NoOpFileProcessStrategy
to not move or copy processed files
noop
- public boolean isAppend()
public void setAppend(boolean append)
append
- whether to append (or replace)public int getBufferSize()
public void setBufferSize(int bufferSize)
protected FileProcessStrategy createFileStrategy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |