|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--MyGridFTP
Sample Java class to perform a transfer.
Example usage is: (to transfer a file in parallel to a remote computer)
MyGridFTP grid = new MyGridFTP("hawk01.mcs.surrey.ac.uk", 2811, "/tmp/x509up_u28008");
String rf1 = "/grid/users/tugba/TestGridFile";
String lf1 = "/user/csckmst/css1tt/gt3/samples/TestGridFile";
int TRANSFER_TYPE = GridFTPSession.TYPE_ASCII;
myGridFTP1.parallelTransfer(rf1,lf1);
myGridFTP1.close();
| Field Summary | |
static int |
GRIDFTP_PORT
|
| Constructor Summary | |
MyGridFTP(java.lang.String host,
int port,
java.lang.String credentialFile)
Initiate GRIDFTP session |
|
| Method Summary | |
void |
close()
Cleanup FTP connection & certs |
void |
download(java.lang.String remoteFile,
java.lang.String localFile,
int transferType)
Download a file from a remote host |
static void |
main(java.lang.String[] args)
testing GridFTP class |
void |
markerArrived(Marker m)
|
void |
parallelDownload(java.lang.String remoteFile,
java.lang.String localFile)
Download a file in parallel. |
void |
parallelTransfer(java.lang.String remoteFile,
java.lang.String localfile)
Transfer a local file to the remote host in parallel |
void |
transfer(java.lang.String remoteFile,
java.lang.String localfile)
Transfer a local file to the remote host |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static int GRIDFTP_PORT
| Constructor Detail |
public MyGridFTP(java.lang.String host,
int port,
java.lang.String credentialFile)
host - remote GRIDFTP hostport - remote GridFTP port (default is 2811)credentialFile - The user's credential file e.g. /tmp/x509up_u28008. This value can be obtained as follows:
cd /tmp
ls -al
find your file associated with your login name e.g.:
-rw------- 1 css1tt csstaff 2203 Feb 13 10:32 x509up_u28008
Use this file name in your credentialFile
| Method Detail |
public void transfer(java.lang.String remoteFile,
java.lang.String localfile)
remoteFile - Remote host filelocalfile - The file which will be transferred
public void parallelTransfer(java.lang.String remoteFile,
java.lang.String localfile)
remoteFile - Remote host filelocalfile - The file which will be transferredpublic void markerArrived(Marker m)
public void download(java.lang.String remoteFile,
java.lang.String localFile,
int transferType)
remoteFile - Remote host file must existlocalFile - Whre should the remote file be stored
public void parallelDownload(java.lang.String remoteFile,
java.lang.String localFile)
public void close()
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||