|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindtree.techworks.insight.download.RemoteClient
public abstract class RemoteClient
TODO
Field Summary | |
---|---|
protected java.io.File |
baseDownloadDirectory
The base directory to which files are downloaded |
protected Insight |
insight
The insight instance used for this class. |
protected boolean |
isBusy
Is the instance of the client busy on an operation |
protected StatusBar |
statusBar
The instance of status bar used for notifications. |
Constructor Summary | |
---|---|
RemoteClient()
Creates an instance of the RemoteClient |
Method Summary | |
---|---|
protected abstract void |
closeConnection()
This method is to be called at the end of a transaction to complete any clean up operations on the connections, etc. |
java.lang.String[] |
downloadFile(Fileset fileset,
java.lang.String file)
Downloads a single file to the directory mentioned. |
protected abstract java.lang.String[] |
downloadFile(java.lang.String fileName)
Downloads a single file to the default download directory, and returns the complete path of the file. |
java.util.List |
downloadFiles(Fileset fileset,
java.util.List files)
Downloads a list of files from the remote host. |
protected java.io.File |
getDestinationFile(java.lang.String fileName,
char seperatorChar)
This method creates a destination temporary file and returns it to the calling method. |
void |
setBaseDownloadDirectory(java.lang.String directoryName)
Set the base directory to which files are downloaded. |
protected abstract void |
setFileset(Fileset fileset)
Sets the fileset. |
void |
setInsight(Insight insight)
Sets the insight instance calling this class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.File baseDownloadDirectory
protected boolean isBusy
protected StatusBar statusBar
protected Insight insight
Constructor Detail |
---|
public RemoteClient()
Method Detail |
---|
public void setInsight(Insight insight)
insight
- The insight instancepublic void setBaseDownloadDirectory(java.lang.String directoryName) throws java.io.IOException
directoryName
- The name of the directory. It is created, if not
present.
java.io.IOException
- If the directory cannot be created, or the path does
not denote a directory or the application cannot write in
this directory.public java.lang.String[] downloadFile(Fileset fileset, java.lang.String file) throws RemoteClientException
fileset
- The fileset to get host information from.file
- The file to download on the host. The actual format is client
dependent.
RemoteClientException
- Remote exception if the client is busy or
download fails.public java.util.List downloadFiles(Fileset fileset, java.util.List files) throws RemoteClientException
fileset
- The fileset to get host information from.files
- The list of files to download on the host. The actual format
is client dependent.
RemoteClientException
- Remote exception if the client is busy or
download fails.protected abstract void setFileset(Fileset fileset) throws RemoteClientException
fileset
- The fileset being set
RemoteClientException
- If the information is not correct or the
client is incompatible for the fileset.protected abstract java.lang.String[] downloadFile(java.lang.String fileName) throws RemoteClientException
complete path
of the file.
fileName
- The file path and name on the remote system to download.
The actual format is client dependent.
RemoteClientException
- If the download fails.protected abstract void closeConnection() throws RemoteClientException
RemoteClientException
- If there is any exception during the
cleanup.protected java.io.File getDestinationFile(java.lang.String fileName, char seperatorChar) throws java.io.IOException
fileName
- The filename which is being downloaded, part of the
destination filename is generated from this.seperatorChar
- The seperator character in the path specified in the
fileName passed.
java.io.IOException
- If the file cannot be downloaded.Temporary File creation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |