com.ibm.websphere.filetransfer
Interface FileTransferMBean
- public interface FileTransferMBean
UnsupportedOperationException
.
The ObjectName for this MBean is "WebSphere:feature=restConnector,type=FileTransfer,name=FileTransfer".
For the remote file parameters (ie: remoteSourceFile for download/delete and remoteTargetFile for upload) the following characteristics apply:
- the remote file will be either on the connected host or on the routing host (if one is setup).
- all file paths need to be either absolute or prepend a Liberty-defined symbol (described on <wlp>/README.txt) that resolves to an absolute path.
- all read and write operations need to be within the configured (or defaulted) read/write regions. See
FileServiceMXBean
for details.
For the local file parameters (ie: localTargetFile for download and and localSourceFile for upload) the following characteristics apply:
- the local file will be in a folder that contains the appropriate read/write permissions.
- the file path is either absolute or relative to the current working directory.
Field Summary
Modifier and Type | Field and Description |
---|---|
|
OBJECT_NAME
A string representing the
ObjectName that this MBean maps to.
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
deleteFile(java.lang.String remoteSourceFile)
Delete a file located at the remote specified location.
|
|
downloadFile(java.lang.String remoteSourceFile,java.lang.String localTargetFile)
Download a file from the specified remote source location and write it
in the specified local target location.
|
|
uploadFile(java.lang.String localSourceFile,java.lang.String remoteTargetFile,boolean expandOnCompletion)
Upload a file from the specified local source location and write it
in the specified remote target location.
|
Field Detail
OBJECT_NAME
- static final java.lang.String OBJECT_NAME
Method Detail
downloadFile
- void downloadFile(java.lang.String remoteSourceFile,
- java.lang.String localTargetFile)
- throws java.io.IOException
Directories are not supported as the remote source file. To download a directory, it must first be archived.
remoteSourceFile
- the remote file location of the source to download localTargetFile
- the local file location where the source contents will be written java.io.IOException
- if there are any issues handling the source or target files uploadFile
- void uploadFile(java.lang.String localSourceFile,
- java.lang.String remoteTargetFile,
- boolean expandOnCompletion)
- throws java.io.IOException
This operation supports expanding an archive (specified as the local source file) to the remote target file. The supported compression formats are 'zip' and 'jar'. All other format types will result in undefined behaviour.
Directories are not supported as the local source file. To upload a directory, it must first be archived and can then be expanded during upload using the expandOnCompletion option.
localSourceFile
- the local file location of the source to upload.
The source file must be a normal file, directories are not supported. remoteTargetFile
- the remote file location where the source contents will be written expandOnCompletion
- indicates if the archive should be expanded automatically
to a folder location that matches the remoteTargetFile parameter.
The archive file deleted after expansion. If the uploaded file is not
an archive then false should be specified. java.io.IOException
- if there are any issues handling the request deleteFile
- void deleteFile(java.lang.String remoteSourceFile)
- throws java.io.IOException
Recursive deletion of a directory is not supported, however deletion of an empty directory is supported.
remoteSourceFile
- the location of the remote file to be deleted java.io.IOException
- if there are any issues handling the request
ObjectName
that this MBean maps to.