|
||||||||||
| 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.DefaultProducer
org.apache.camel.component.file.GenericFileProducer<T>
public class GenericFileProducer<T>
Generic file producer
| Field Summary | |
|---|---|
protected GenericFileEndpoint<T> |
endpoint
|
protected org.slf4j.Logger |
log
|
protected GenericFileOperations<T> |
operations
|
| Constructor Summary | |
|---|---|
protected |
GenericFileProducer(GenericFileEndpoint<T> endpoint,
GenericFileOperations<T> operations)
|
| Method Summary | |
|---|---|
String |
createFileName(Exchange exchange)
|
String |
createTempFileName(Exchange exchange,
String fileName)
|
protected void |
doStart()
|
protected void |
doStop()
|
String |
getFileSeparator()
|
void |
handleFailedWrite(Exchange exchange,
Exception exception)
If we fail writing out a file, we will call this method. |
String |
normalizePath(String name)
|
void |
postWriteCheck()
Perform any actions that need to occur after we are done such as disconnecting. |
void |
preWriteCheck()
Perform any actions that need to occur before we write such as connecting to an FTP server etc. |
void |
process(Exchange exchange)
Processes the message exchange |
protected void |
processExchange(Exchange exchange,
String target)
Perform the work to process the fileExchange |
void |
setOperations(GenericFileOperations<T> operations)
Sets the operations to be used. |
void |
writeFile(Exchange exchange,
String fileName)
|
| Methods inherited from class org.apache.camel.impl.DefaultProducer |
|---|
createExchange, createExchange, createExchange, getEndpoint, isSingleton, 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.camel.Service |
|---|
start, stop |
| Field Detail |
|---|
protected final transient org.slf4j.Logger log
protected final GenericFileEndpoint<T> endpoint
protected GenericFileOperations<T> operations
| Constructor Detail |
|---|
protected GenericFileProducer(GenericFileEndpoint<T> endpoint,
GenericFileOperations<T> operations)
| Method Detail |
|---|
public String getFileSeparator()
public String normalizePath(String name)
public void process(Exchange exchange)
throws Exception
Processor
exchange - the message exchange
Exception - if an internal processing error has occurred.public void setOperations(GenericFileOperations<T> operations)
operations - the operations
protected void processExchange(Exchange exchange,
String target)
throws Exception
exchange - fileExchangetarget - the target filename
Exception - is thrown if some error
public void handleFailedWrite(Exchange exchange,
Exception exception)
throws Exception
Exception
public void preWriteCheck()
throws Exception
Exceptionpublic void postWriteCheck()
public void writeFile(Exchange exchange,
String fileName)
throws GenericFileOperationFailedException
GenericFileOperationFailedExceptionpublic String createFileName(Exchange exchange)
public String createTempFileName(Exchange exchange,
String fileName)
protected void doStart()
throws Exception
doStart in class DefaultProducerException
protected void doStop()
throws Exception
doStop in class DefaultProducerException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||