org.gridbus.broker.util
Class GridFTPUtil

java.lang.Object
  extended byorg.gridbus.broker.util.GridFTPUtil

public class GridFTPUtil
extends java.lang.Object

This class contains utility methods for GridFTP

Author:
Hussein Gibbins (hag@cs.mu.oz.au)

Constructor Summary
GridFTPUtil(java.lang.String host, int port, java.lang.String proxyFilePath, java.lang.String CACertFilePath, test.GridProxy proxy)
           
GridFTPUtil(java.lang.String host, int port, java.lang.String proxyFilePath, java.lang.String CACertFilePath, java.lang.String keyFilePath, java.lang.String certFilePath, java.lang.String password)
          Constructor for GridFTPUtil initialises the internal datastructures
 
Method Summary
 org.globus.ftp.GridFTPClient authenticate()
          Performs authentication for a node and returns a GridFTPClient
 boolean changeDir(java.lang.String dir)
          Change to the specified directory.
 boolean cleanup()
          Cleans up after a job has finished execution on the grid node.
 void getFile(java.lang.String source, java.lang.String dest)
          Gets a file from the remote source
 void putFile(java.lang.String source, java.lang.String dest)
          Copies a file to the remote node
 boolean transfer(Task task)
          Transfers the files related to the task to a remote grid node
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridFTPUtil

public GridFTPUtil(java.lang.String host,
                   int port,
                   java.lang.String proxyFilePath,
                   java.lang.String CACertFilePath,
                   java.lang.String keyFilePath,
                   java.lang.String certFilePath,
                   java.lang.String password)
Constructor for GridFTPUtil initialises the internal datastructures

Parameters:
host -
port -
proxyFilePath -
CACertFilePath -
keyFilePath -
certFilePath -
password -

GridFTPUtil

public GridFTPUtil(java.lang.String host,
                   int port,
                   java.lang.String proxyFilePath,
                   java.lang.String CACertFilePath,
                   test.GridProxy proxy)
Parameters:
host -
port -
proxyFilePath -
CACertFilePath -
proxy -
Method Detail

changeDir

public boolean changeDir(java.lang.String dir)
Change to the specified directory. Returns if the operation was successful.

Parameters:
dir -
Returns:
boolean

cleanup

public boolean cleanup()
Cleans up after a job has finished execution on the grid node. This includes deleting any temporary file and directories. Returns if the operation was successful.

Returns:
boolean

transfer

public boolean transfer(Task task)
Transfers the files related to the task to a remote grid node

Parameters:
task -
Returns:
boolean

authenticate

public org.globus.ftp.GridFTPClient authenticate()
Performs authentication for a node and returns a GridFTPClient

Returns:
GridFTPClient

getFile

public void getFile(java.lang.String source,
                    java.lang.String dest)
Gets a file from the remote source

Parameters:
source -
dest -

putFile

public void putFile(java.lang.String source,
                    java.lang.String dest)
Copies a file to the remote node

Parameters:
source -
dest -