|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface FTPHandler
This interface provides the generic FTP connections and operations. Users can provide customized FTP-client handler to implement this interface. Fill the fully-quilified classname of the customized class into the "Handler Class" on the "Schedule->Publish->To FTP" page and add the class into the classpath of JReport Server.
| Field Summary | |
|---|---|
static int |
FTP
|
static int |
FTPS
|
static java.lang.String[] |
SCHEMES
|
static int |
SCP
|
static int |
SFTP
|
| Method Summary | |
|---|---|
boolean |
changeDirectory(java.lang.String dirName)
change the current working directory to another directory specified by dirName
on the remote FTP site. |
void |
connect(java.lang.String hostName)
connect to the remote FTP site with the specified host and default FTP port. |
void |
connect(java.lang.String hostName,
int port)
connect to the remote FTP site with the specified host and port. |
boolean |
deleteFile(java.lang.String fileName)
delete a file specified by the fileName on the remote FTP site. |
void |
disconnect()
disconnect from the remote FTP site for terminating the connection. |
boolean |
downloadFile(java.lang.String fileName)
download a file specified by the fileName from the remote FTP site,
and saved as the same fileName under the current path. |
boolean |
downloadFile(java.lang.String fileName,
java.lang.String localPath)
download a file specified by the fileName from the remote FTP site,
and saved as the same fileName under the specified localPath. |
boolean |
downloadFile(java.lang.String remoteFileName,
java.lang.String localPath,
java.lang.String localFileName)
download a file specified by the remoteFileName from the remote FTP site,
and named as localFileName under the specified localPath. |
java.lang.String |
getCurrentDirectory()
get the current working directory on the remote FTP site. |
java.lang.String |
getScheme()
get the protocol type of current connection. |
boolean |
login(java.lang.String userName,
java.lang.String password)
login to the remote FTP site with the specified userName and password. |
boolean |
login(java.lang.String userName,
java.lang.String password,
java.lang.String account)
login to the remote FTP site with the specified userName, password
and account if there. |
boolean |
logout()
logout from the remote FTP site for terminating the session. |
boolean |
makeDirectory(java.lang.String dirName)
create a new directory with the specified dirName under the current working directory
on the remote FTP site. |
boolean |
parentDirectory()
change the current working directory to the parent directory on the remote FTP site. |
void |
setConnectTimeout(int timeout)
set the connect timeout on the connection. |
void |
setReadTimeout(int timeout)
set the read timeout on the connection. |
boolean |
uploadFile(java.lang.String fileName)
upload a local file specified by the fileName under the current directory
to the remote FTP site, and named as the same fileName. |
boolean |
uploadFile(java.lang.String localPath,
java.lang.String fileName)
upload a local file specified by the fileName under the specified localPath
to the remote FTP site, and named as the same fileName. |
boolean |
uploadFile(java.lang.String localPath,
java.lang.String localFileName,
java.lang.String remoteFileName)
upload a local file specified by the localFileName under the specified localPath
to the remote FTP site, and named as remoteFileName. |
| Field Detail |
|---|
static final java.lang.String[] SCHEMES
static final int FTP
static final int SFTP
static final int SCP
static final int FTPS
| Method Detail |
|---|
boolean uploadFile(java.lang.String fileName)
throws java.io.IOException
fileName under the current directory
to the remote FTP site, and named as the same fileName.
java.io.IOException
boolean uploadFile(java.lang.String localPath,
java.lang.String fileName)
throws java.io.IOException
fileName under the specified localPath
to the remote FTP site, and named as the same fileName.
java.io.IOException
boolean uploadFile(java.lang.String localPath,
java.lang.String localFileName,
java.lang.String remoteFileName)
throws java.io.IOException
localFileName under the specified localPath
to the remote FTP site, and named as remoteFileName.
java.io.IOException
boolean downloadFile(java.lang.String fileName)
throws java.io.IOException
fileName from the remote FTP site,
and saved as the same fileName under the current path.
java.io.IOException
boolean downloadFile(java.lang.String fileName,
java.lang.String localPath)
throws java.io.IOException
fileName from the remote FTP site,
and saved as the same fileName under the specified localPath.
java.io.IOException
boolean downloadFile(java.lang.String remoteFileName,
java.lang.String localPath,
java.lang.String localFileName)
throws java.io.IOException
remoteFileName from the remote FTP site,
and named as localFileName under the specified localPath.
java.io.IOException
boolean deleteFile(java.lang.String fileName)
throws java.io.IOException
fileName on the remote FTP site.
java.io.IOException
boolean makeDirectory(java.lang.String dirName)
throws java.io.IOException
dirName under the current working directory
on the remote FTP site.
java.io.IOException
boolean changeDirectory(java.lang.String dirName)
throws java.io.IOException
dirName
on the remote FTP site.
java.io.IOException
boolean parentDirectory()
throws java.io.IOException
java.io.IOException
java.lang.String getCurrentDirectory()
throws java.io.IOException
java.io.IOException
void connect(java.lang.String hostName)
throws java.io.IOException
host and default FTP port.
java.io.IOException
void connect(java.lang.String hostName,
int port)
throws java.io.IOException
host and port.
java.io.IOException
boolean login(java.lang.String userName,
java.lang.String password)
throws java.io.IOException
userName and password.
java.io.IOException
boolean login(java.lang.String userName,
java.lang.String password,
java.lang.String account)
throws java.io.IOException
userName, password
and account if there.
java.io.IOException
boolean logout()
throws java.io.IOException
java.io.IOException
void disconnect()
throws java.io.IOException
java.io.IOExceptionvoid setReadTimeout(int timeout)
void setConnectTimeout(int timeout)
java.lang.String getScheme()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||