org.ikasan.connector.basefiletransfer.net
Interface FileTransferClient

All Superinterfaces:
TransactionalResource

public interface FileTransferClient
extends TransactionalResource

An interface for various File Transfer Clients to implement

Author:
Ikasan Development Team

Method Summary
 void cd(java.lang.String targetPath)
          Method to change directory
 void deleteRemoteDirectory(java.lang.String directoryPath, boolean recurse)
          Method to delete a remote directory
 void deleteRemoteFile(java.lang.String filename)
          Method to delete a remote file
 void disconnect()
          TODO add comment
 BaseFileTransferMappedRecord get(ClientListEntry clientListEntry)
          Gets a BaseFileTransferMappedRecord (a 'File') given a ClientListEntry
 BaseFileTransferMappedRecord get(java.lang.String filePath)
          Gets a BaseFileTransferMappedRecord (a 'File') given a filePath
 void get(java.lang.String filePath, java.io.OutputStream outputStream)
          Get a file as a OutputStream
 void get(java.lang.String filePath, java.io.OutputStream outputStream, int resume, long offset)
          Get a file as an OutputStream given an offset and a resume flag
 java.io.InputStream getAsInputStream(java.lang.String filePath)
          Utilises the underlying API to return an InputStream as the result of the GET operation
 java.io.InputStream getContentAsStream(ClientListEntry entry)
          Get the content of a ClientListFileEntry (a 'File') as an InputStream
 java.util.List<ClientListEntry> ls(java.lang.String path)
          Method to return a list of the contents of a directory
 void put(java.lang.String name, byte[] content)
          Method to put a content on to a File Tansfer system
 void putWithOutputStream(java.lang.String fileName, java.io.InputStream inputstream)
          Method to put the file using an OutputStream
 java.lang.String pwd()
          Method to list what directory you are currently in
 void rename(java.lang.String currentPath, java.lang.String newPath)
          Method to rename a path (a 'File')
 
Methods inherited from interface org.ikasan.connector.base.command.TransactionalResource
ensureConnection
 

Method Detail

cd

void cd(java.lang.String targetPath)
        throws ClientCommandCdException
Method to change directory

Parameters:
targetPath -
Throws:
ClientCommandCdException

deleteRemoteDirectory

void deleteRemoteDirectory(java.lang.String directoryPath,
                           boolean recurse)
                           throws ClientException,
                                  ClientCommandLsException
Method to delete a remote directory

Parameters:
directoryPath -
recurse - (whether to delete recursively or not)
Throws:
ClientException
ClientCommandLsException

deleteRemoteFile

void deleteRemoteFile(java.lang.String filename)
                      throws ClientException
Method to delete a remote file

Parameters:
filename -
Throws:
ClientException

get

BaseFileTransferMappedRecord get(ClientListEntry clientListEntry)
                                 throws ClientCommandGetException
Gets a BaseFileTransferMappedRecord (a 'File') given a ClientListEntry

Parameters:
clientListEntry -
Returns:
BaseFileTransferMappedRecord (a 'File')
Throws:
ClientCommandGetException

get

BaseFileTransferMappedRecord get(java.lang.String filePath)
                                 throws ClientCommandGetException
Gets a BaseFileTransferMappedRecord (a 'File') given a filePath

Parameters:
filePath -
Returns:
BaseFileTransferMappedRecord (a 'File')
Throws:
ClientCommandGetException

get

void get(java.lang.String filePath,
         java.io.OutputStream outputStream)
         throws ClientCommandGetException
Get a file as a OutputStream

Parameters:
filePath -
outputStream -
Throws:
ClientCommandGetException

get

void get(java.lang.String filePath,
         java.io.OutputStream outputStream,
         int resume,
         long offset)
         throws ClientCommandGetException
Get a file as an OutputStream given an offset and a resume flag

Parameters:
filePath -
outputStream -
resume -
offset -
Throws:
ClientCommandGetException

getAsInputStream

java.io.InputStream getAsInputStream(java.lang.String filePath)
                                     throws ClientCommandGetException
Utilises the underlying API to return an InputStream as the result of the GET operation

Parameters:
filePath -
Returns:
InputStream
Throws:
ClientCommandGetException

getContentAsStream

java.io.InputStream getContentAsStream(ClientListEntry entry)
                                       throws ClientCommandGetException
Get the content of a ClientListFileEntry (a 'File') as an InputStream

Parameters:
entry -
Returns:
InputStream
Throws:
ClientCommandGetException

ls

java.util.List<ClientListEntry> ls(java.lang.String path)
                                   throws ClientCommandLsException,
                                          java.net.URISyntaxException
Method to return a list of the contents of a directory

Parameters:
path -
Returns:
A list of ClientListEntries
Throws:
ClientCommandLsException
java.net.URISyntaxException

put

void put(java.lang.String name,
         byte[] content)
         throws ClientCommandPutException
Method to put a content on to a File Tansfer system

Parameters:
name - (of the 'File')
content - (of the 'File')
Throws:
ClientCommandPutException

putWithOutputStream

void putWithOutputStream(java.lang.String fileName,
                         java.io.InputStream inputstream)
                         throws ClientCommandPutException,
                                ClientCommandLsException,
                                ClientCommandMkdirException
Method to put the file using an OutputStream

Parameters:
fileName -
inputstream -
Throws:
ClientCommandPutException
ClientCommandLsException
ClientCommandMkdirException

pwd

java.lang.String pwd()
                     throws ClientCommandPwdException
Method to list what directory you are currently in

Returns:
Fully qualified path to what directory you are in.
Throws:
ClientCommandPwdException

rename

void rename(java.lang.String currentPath,
            java.lang.String newPath)
            throws ClientCommandRenameException
Method to rename a path (a 'File')

Parameters:
currentPath -
newPath -
Throws:
ClientCommandRenameException

disconnect

void disconnect()
TODO add comment



Copyright © 2007-2010 Ikasan. All Rights Reserved.