org.apache.camel.component.file.remote
Class RemoteFileProducer<T>
java.lang.Object
org.apache.camel.impl.ServiceSupport
org.apache.camel.impl.DefaultProducer
org.apache.camel.component.file.GenericFileProducer<T>
org.apache.camel.component.file.remote.RemoteFileProducer<T>
- All Implemented Interfaces:
- IsSingleton, Processor, Producer, Service, ServicePoolAware, ShutdownableService
public class RemoteFileProducer<T>
- extends GenericFileProducer<T>
- implements ServicePoolAware
Generic remote file producer for all the FTP variations.
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 |
RemoteFileProducer
protected RemoteFileProducer(RemoteFileEndpoint<T> endpoint,
RemoteFileOperations<T> operations)
getFileSeparator
public String getFileSeparator()
- Overrides:
getFileSeparator
in class GenericFileProducer<T>
normalizePath
public String normalizePath(String name)
- Overrides:
normalizePath
in class GenericFileProducer<T>
process
public void process(Exchange exchange)
throws Exception
- Specified by:
process
in interface Processor
- Overrides:
process
in class GenericFileProducer<T>
- Throws:
Exception
getOperations
protected RemoteFileOperations getOperations()
getEndpoint
public RemoteFileEndpoint<T> getEndpoint()
- Specified by:
getEndpoint
in interface Producer
- Overrides:
getEndpoint
in class DefaultProducer
handleFailedWrite
public void handleFailedWrite(Exchange exchange,
Exception exception)
throws Exception
- The file could not be written. We need to disconnect from the remote server.
- Overrides:
handleFailedWrite
in class GenericFileProducer<T>
- Throws:
Exception
disconnect
public void disconnect()
throws GenericFileOperationFailedException
- Throws:
GenericFileOperationFailedException
preWriteCheck
public void preWriteCheck()
throws Exception
- Overrides:
preWriteCheck
in class GenericFileProducer<T>
- Throws:
Exception
postWriteCheck
public void postWriteCheck()
- Overrides:
postWriteCheck
in class GenericFileProducer<T>
doStart
protected void doStart()
throws Exception
- Overrides:
doStart
in class DefaultProducer
- Throws:
Exception
doStop
protected void doStop()
throws Exception
- Overrides:
doStop
in class DefaultProducer
- Throws:
Exception
recoverableConnectIfNecessary
protected void recoverableConnectIfNecessary()
throws Exception
- Throws:
Exception
connectIfNecessary
protected void connectIfNecessary()
throws GenericFileOperationFailedException
- Throws:
GenericFileOperationFailedException
isSingleton
public boolean isSingleton()
- Specified by:
isSingleton
in interface IsSingleton
- Overrides:
isSingleton
in class DefaultProducer
Apache CAMEL