org.gridbus.broker.runfile
Class GridfileVariable

java.lang.Object
  extended by org.gridbus.broker.runfile.Variable
      extended by org.gridbus.broker.runfile.SingleVariable
          extended by org.gridbus.broker.runfile.GridfileVariable
All Implemented Interfaces:
java.io.Serializable

public class GridfileVariable
extends SingleVariable

Author:
kna,srikumar This class is a special variable class that deals with Gridfiles. Each Gridfile has a preferredDataHost which links to the DataHost from which the files is to be taken. The method getValue() is overridden to return the full file path of the filename from he DataHost. The method getEnv() should return any environment variables to set such as the initScript() method from SrbDataHost. Note: The filename is the value that is stored here, and is the filename without any path stuff in it. In the interest of general sanity, do not put full file path as filename but let the DataHost provide it.
See Also:
Serialized Form

Constructor Summary
GridfileVariable()
           
GridfileVariable(java.lang.String name)
          Constructs a SingleVariable with a name.
GridfileVariable(java.lang.String name, java.lang.String value)
          Constructs a GridfileVariable with a name and a value.
GridfileVariable(java.lang.String name, java.lang.String type, java.lang.String value)
          Constructs a GridfileVariable with a name and type.
 
Method Summary
 DataHost getPreferredDataHost()
           
 java.lang.String getValue()
          Gets the value assigned to this variable.
 void setPreferredDataHost(DataHost preferredDataHost)
           
 
Methods inherited from class org.gridbus.broker.runfile.SingleVariable
setValue, toString
 
Methods inherited from class org.gridbus.broker.runfile.Variable
getName, getType, setName, setType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GridfileVariable

public GridfileVariable()

GridfileVariable

public GridfileVariable(java.lang.String name)
Constructs a SingleVariable with a name.

Parameters:
name -

GridfileVariable

public GridfileVariable(java.lang.String name,
                        java.lang.String value)
Constructs a GridfileVariable with a name and a value.

Parameters:
name -
value -

GridfileVariable

public GridfileVariable(java.lang.String name,
                        java.lang.String type,
                        java.lang.String value)
Constructs a GridfileVariable with a name and type.

Parameters:
name -
type -
value -
Method Detail

getValue

public java.lang.String getValue()
Gets the value assigned to this variable.

Overrides:
getValue in class SingleVariable
Returns:
the value of the variable.

getPreferredDataHost

public DataHost getPreferredDataHost()
Returns:
Returns the preferredDataHost.

setPreferredDataHost

public void setPreferredDataHost(DataHost preferredDataHost)
Parameters:
preferredDataHost - The preferredDataHost to set.