Interface RemoteFileOperations<T>
- All Superinterfaces:
org.apache.camel.component.file.GenericFileOperations<T>
- All Known Implementing Classes:
FtpOperations
,FtpsOperations
,SftpOperations
public interface RemoteFileOperations<T>
extends org.apache.camel.component.file.GenericFileOperations<T>
Remote file operations based on some backing framework
-
Method Summary
Modifier and TypeMethodDescriptionboolean
connect
(RemoteFileConfiguration configuration, org.apache.camel.Exchange exchange) Connects to the remote servervoid
Disconnects from the remote servervoid
Forces a hard disconnect from the remote server and cause the client to be re-created on next poll.boolean
Returns whether we are connected to the remote server or notboolean
sendNoop()
Sends a noop command to the remote serverboolean
sendSiteCommand
(String command) Sends a site command to the remote serverMethods inherited from interface org.apache.camel.component.file.GenericFileOperations
buildDirectory, changeCurrentDirectory, changeToParentDirectory, deleteFile, existsFile, getCurrentDirectory, listFiles, listFiles, newGenericFile, releaseRetrievedFileResources, renameFile, retrieveFile, setEndpoint, storeFile
-
Method Details
-
connect
boolean connect(RemoteFileConfiguration configuration, org.apache.camel.Exchange exchange) throws org.apache.camel.component.file.GenericFileOperationFailedException Connects to the remote server- Parameters:
configuration
- configurationexchange
- the exchange that trigger the connect (if any)- Returns:
- true if connected
- Throws:
org.apache.camel.component.file.GenericFileOperationFailedException
- can be thrown
-
isConnected
boolean isConnected() throws org.apache.camel.component.file.GenericFileOperationFailedExceptionReturns whether we are connected to the remote server or not- Returns:
- true if connected, false if not
- Throws:
org.apache.camel.component.file.GenericFileOperationFailedException
- can be thrown
-
disconnect
void disconnect() throws org.apache.camel.component.file.GenericFileOperationFailedExceptionDisconnects from the remote server- Throws:
org.apache.camel.component.file.GenericFileOperationFailedException
- can be thrown
-
forceDisconnect
void forceDisconnect() throws org.apache.camel.component.file.GenericFileOperationFailedExceptionForces a hard disconnect from the remote server and cause the client to be re-created on next poll.- Throws:
org.apache.camel.component.file.GenericFileOperationFailedException
- can be thrown
-
sendNoop
boolean sendNoop() throws org.apache.camel.component.file.GenericFileOperationFailedExceptionSends a noop command to the remote server- Returns:
- true if the noop was a success, false otherwise
- Throws:
org.apache.camel.component.file.GenericFileOperationFailedException
- can be thrown
-
sendSiteCommand
boolean sendSiteCommand(String command) throws org.apache.camel.component.file.GenericFileOperationFailedException Sends a site command to the remote server- Parameters:
command
- the command- Returns:
- true if the command was a success, false otherwise
- Throws:
org.apache.camel.component.file.GenericFileOperationFailedException
- can be thrown
-