Class RemoteFileProducer<T>
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultProducer
org.apache.camel.support.DefaultAsyncProducer
org.apache.camel.component.file.GenericFileProducer<T>
org.apache.camel.component.file.remote.RemoteFileProducer<T>
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.AsyncProcessor,org.apache.camel.AsyncProducer,org.apache.camel.EndpointAware,org.apache.camel.IsSingleton,org.apache.camel.Processor,org.apache.camel.Producer,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
public class RemoteFileProducer<T>
extends org.apache.camel.component.file.GenericFileProducer<T>
Generic remote file producer for all the FTP variations.
-
Field Summary
Fields inherited from class org.apache.camel.component.file.GenericFileProducer
endpoint, operationsFields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRemoteFileProducer(RemoteFileEndpoint<T> endpoint, RemoteFileOperations<T> operations) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconnectIfNecessary(org.apache.camel.Exchange exchange) voidprotected voiddoProcess(org.apache.camel.Exchange exchange) protected voiddoStart()protected voiddoStop()protected RemoteFileOperations<T> voidhandleFailedWrite(org.apache.camel.Exchange exchange, Exception exception) The file could not be written.booleannormalizePath(String name) voidpostWriteCheck(org.apache.camel.Exchange exchange) voidpreWriteCheck(org.apache.camel.Exchange exchange) toString()Methods inherited from class org.apache.camel.component.file.GenericFileProducer
createFileName, createTempFileName, process, processExchange, setOperations, writeChecksumFile, writeFileMethods inherited from class org.apache.camel.support.DefaultAsyncProducer
process, processAsyncMethods inherited from class org.apache.camel.support.DefaultProducer
createExchangeMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
RemoteFileProducer
-
-
Method Details
-
getFileSeparator
- Overrides:
getFileSeparatorin classorg.apache.camel.component.file.GenericFileProducer<T>
-
normalizePath
- Overrides:
normalizePathin classorg.apache.camel.component.file.GenericFileProducer<T>
-
doProcess
-
getOperations
-
getEndpoint
- Specified by:
getEndpointin interfaceorg.apache.camel.EndpointAware- Overrides:
getEndpointin classorg.apache.camel.support.DefaultProducer
-
handleFailedWrite
public void handleFailedWrite(org.apache.camel.Exchange exchange, Exception exception) throws Exception The file could not be written. We need to disconnect from the remote server. -
disconnect
public void disconnect() throws org.apache.camel.component.file.GenericFileOperationFailedException- Throws:
org.apache.camel.component.file.GenericFileOperationFailedException
-
preWriteCheck
-
postWriteCheck
public void postWriteCheck(org.apache.camel.Exchange exchange) - Overrides:
postWriteCheckin classorg.apache.camel.component.file.GenericFileProducer<T>
-
doStart
-
doStop
-
connectIfNecessary
protected void connectIfNecessary(org.apache.camel.Exchange exchange) throws org.apache.camel.component.file.GenericFileOperationFailedException - Throws:
org.apache.camel.component.file.GenericFileOperationFailedException
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceorg.apache.camel.IsSingleton- Overrides:
isSingletonin classorg.apache.camel.support.DefaultProducer
-
toString
- Overrides:
toStringin classorg.apache.camel.support.DefaultProducer
-