org.gridbus.broker.runfile
Class GCopyCommand

java.lang.Object
  extended by org.gridbus.broker.runfile.TaskCommand
      extended by org.gridbus.broker.runfile.GCopyCommand
All Implemented Interfaces:
java.io.Serializable

public class GCopyCommand
extends TaskCommand

This command is to allow third party nodes other than the broker or the compute resource to copy amongst themselves.

Author:
Ding Choon Hoong (chd@students.cs.mu.oz.au)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.gridbus.broker.runfile.TaskCommand
COPY_CMD, EXECUTE_CMD, GCOPY_CMD, MCOPY_CMD, REMOTE_EXECUTE_CMD, SUBSTITUTE_CMD, TEST_CMD, UNKNOWN_CMD
 
Constructor Summary
GCopyCommand()
           
GCopyCommand(java.lang.String sf, java.lang.String sn, java.lang.String df, java.lang.String dn)
          Sets up the GCopyCommand class members
 
Method Summary
 java.lang.String getDestinationFile()
          Gets the destination file for this copy command.
 java.lang.String getDestinationNode()
          Gets the destination node for this copy command.
 java.lang.String getSourceFile()
          Gets the source file for this copy command.
 java.lang.String getSourceNode()
          Gets the source node for this copy command.
 void setDestination(java.lang.String destination)
          Set destination location.
 void setSource(java.lang.String source)
          Set source location.
 
Methods inherited from class org.gridbus.broker.runfile.TaskCommand
findType, getType, setType, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GCopyCommand

public GCopyCommand()

GCopyCommand

public GCopyCommand(java.lang.String sf,
                    java.lang.String sn,
                    java.lang.String df,
                    java.lang.String dn)
Sets up the GCopyCommand class members

Parameters:
sf -
sn -
df -
dn -
Method Detail

setSource

public void setSource(java.lang.String source)
               throws java.lang.RuntimeException
Set source location. Can be in these formats: 'hostname:filename' or 'filename'

Parameters:
source - where the file will be copied from.
Throws:
java.lang.RuntimeException - if a hostname is specified and the path of filename starts with "./"

getSourceFile

public java.lang.String getSourceFile()
Gets the source file for this copy command.

Returns:
sourceFile.

getSourceNode

public java.lang.String getSourceNode()
Gets the source node for this copy command.

Returns:
sourceNode.

setDestination

public void setDestination(java.lang.String destination)
                    throws java.lang.RuntimeException
Set destination location. Can be in these formats: 'hostname:filename' or 'filename'

Parameters:
destination - where the file will be copied to.
Throws:
java.lang.RuntimeException - if a hostname is specified and the path of filename starts with "./"

getDestinationFile

public java.lang.String getDestinationFile()
Gets the destination file for this copy command.

Returns:
destinationFile.

getDestinationNode

public java.lang.String getDestinationNode()
Gets the destination node for this copy command.

Returns:
destinationNode.