org.gridbus.broker.jobdescription.commands
Class CopyCommand

java.lang.Object
  extended by org.gridbus.broker.jobdescription.TaskCommand
      extended by org.gridbus.broker.jobdescription.commands.CopyCommand

public class CopyCommand
extends TaskCommand

Represents the copy command of a run file.

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

Constructor Summary
CopyCommand()
          Constructs a CopyCommand and sets its command type.
 
Method Summary
 java.lang.Object clone()
           
 int getCopyType()
          Gets the type of copy command.
 java.lang.String getDestination()
          Gets the destination location for this copy command.
 int getDestinationLocation()
           
 java.lang.String getSource()
          Gets the source location for this copy command.
 int getSourceLocation()
           
 int getType()
          Gets which type of command this is.
 boolean isDestinationRemote()
          Deprecated.  
static boolean isLocationRemote(java.lang.String url)
          If a url starts with a protocol which is one of: http:, https:, ftp:, gsiftp:, srb: it is considered REMOTE.
 boolean isSourceRemote()
          Deprecated.  
 void setDestination(int destLocation, java.lang.String destination)
           
 void setSource(int srcLocation, java.lang.String source)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CopyCommand

public CopyCommand()
Constructs a CopyCommand and sets its command type.

Method Detail

setSource

public void setSource(int srcLocation,
                      java.lang.String source)
Parameters:
srcLocation - (One of the LocationType constants)
source -

getSource

public java.lang.String getSource()
Gets the source location for this copy command.

Returns:
source location.

isSourceRemote

public boolean isSourceRemote()
Deprecated. 

Returns:

setDestination

public void setDestination(int destLocation,
                           java.lang.String destination)
Parameters:
destLocation - (One of the LocationType constants)
destination -

getDestination

public java.lang.String getDestination()
Gets the destination location for this copy command.

Returns:
destination location.

isDestinationRemote

public boolean isDestinationRemote()
Deprecated. 

Checks whether the destination location is the compute node.

Returns:
whether the destination location is compute node.

toString

public java.lang.String toString()
Overrides:
toString in class TaskCommand
See Also:
Object.toString()

getDestinationLocation

public int getDestinationLocation()
Returns:
Returns the destinationLocation.

getSourceLocation

public int getSourceLocation()
Returns:
Returns the sourceLocation.

getCopyType

public int getCopyType()
Gets the type of copy command.

Returns:
an int which is one of the constants defined in the org.gridbus.broker.constants.CopyType class
See Also:
CopyType

getType

public int getType()
Description copied from class: TaskCommand
Gets which type of command this is.

Specified by:
getType in class TaskCommand
Returns:
the type of this command.

clone

public java.lang.Object clone()
Specified by:
clone in class TaskCommand

isLocationRemote

public static boolean isLocationRemote(java.lang.String url)
If a url starts with a protocol which is one of: http:, https:, ftp:, gsiftp:, srb: it is considered REMOTE. If no protocol is found or the protocol is not in the above list then, this method returns false.

Returns:

Copyright © The University of Melbourne. 2006