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.component.file.GenericFileProducer<T>
org.apache.camel.component.file.remote.RemoteFileProducer<T>
- All Implemented Interfaces:
AutoCloseable
,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, operations
Fields 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
ModifierConstructorDescriptionprotected
RemoteFileProducer
(RemoteFileEndpoint<T> endpoint, RemoteFileOperations<T> operations) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
connectIfNecessary
(org.apache.camel.Exchange exchange) void
protected void
doStart()
protected void
doStop()
protected RemoteFileOperations<T>
void
handleFailedWrite
(org.apache.camel.Exchange exchange, Exception exception) The file could not be written.boolean
normalizePath
(String name) void
postWriteCheck
(org.apache.camel.Exchange exchange) void
preWriteCheck
(org.apache.camel.Exchange exchange) void
process
(org.apache.camel.Exchange exchange) toString()
Methods inherited from class org.apache.camel.component.file.GenericFileProducer
createFileName, createTempFileName, processExchange, setOperations, writeFile
Methods inherited from class org.apache.camel.support.DefaultProducer
createExchange
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, 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
build, close, init, start, stop
Methods inherited from interface org.apache.camel.ShutdownableService
shutdown
Methods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
RemoteFileProducer
-
-
Method Details
-
getFileSeparator
- Overrides:
getFileSeparator
in classorg.apache.camel.component.file.GenericFileProducer<T>
-
normalizePath
- Overrides:
normalizePath
in classorg.apache.camel.component.file.GenericFileProducer<T>
-
process
-
getOperations
-
getEndpoint
- Specified by:
getEndpoint
in interfaceorg.apache.camel.EndpointAware
- Overrides:
getEndpoint
in 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:
postWriteCheck
in 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:
isSingleton
in interfaceorg.apache.camel.IsSingleton
- Overrides:
isSingleton
in classorg.apache.camel.support.DefaultProducer
-
toString
- Overrides:
toString
in classorg.apache.camel.support.DefaultProducer
-