org.gridbus.broker.farming.globus
Class GridFTPUtil

java.lang.Object
  extended by org.gridbus.broker.farming.globus.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 gridFTPURL, org.ietf.jgss.GSSCredential proxy)
           
GridFTPUtil(java.lang.String host, int port, org.ietf.jgss.GSSCredential proxy)
           
 
Method Summary
 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 close()
           
 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,
                   org.ietf.jgss.GSSCredential proxy)
Parameters:
host -
port -
proxy -

GridFTPUtil

public GridFTPUtil(java.lang.String gridFTPURL,
                   org.ietf.jgss.GSSCredential proxy)
            throws java.net.MalformedURLException
Parameters:
gridFTPURL -
proxy -
Throws:
java.net.MalformedURLException
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

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 -

close

public void close()