gridbroker
Class RunConfiguration

Object
  extended bygridbroker.RunConfiguration

public class RunConfiguration
extends Object

A class that handles the file configuration

Version:
2.1, June 2003
Author:
Manzur Murshed and Rajkumar Buyya
Invariant:
$none

Constructor Summary
RunConfiguration(String filename)
          Allocates a new RunConfiguration object
 
Method Summary
 String getConfigFileName()
          Gets the configuration file name
 int getNumResource()
          Gets number of resources
 int getNumUser()
          Gets number of users
 int getResourceSamplePoint()
          Gets the resource sample point
 int getUserSamplePoint()
          Gets the user sample point
 boolean ReadConfig()
          Deprecated. As of GridBroker 2.1, replaced by readConfigFile()
 boolean readConfigFile()
          Reads the configuration file
static String readString()
          Reads a string from the keyboard until the ENTER key is pressed.
 void setConfigFileName(String name)
          Sets the configuration file name
 void setNumResource(int num)
          Sets the number of resources
 void setNumUser(int num)
          Sets number of users
 void setResourceSamplePoint(int point)
          Sets the resource sample point
 void setUserSamplePoint(int point)
          Sets the user sample point
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunConfiguration

public RunConfiguration(String filename)
Allocates a new RunConfiguration object

Parameters:
filename - the configuration file name
Pre Condition:
filename != null
Post Condition:
$none
Method Detail

ReadConfig

public boolean ReadConfig()
Deprecated. As of GridBroker 2.1, replaced by readConfigFile()

Reads the configuration file

Returns:
true if the configuration file can be read, otherwise false
Pre Condition:
$none
Post Condition:
$none

readConfigFile

public boolean readConfigFile()
Reads the configuration file

Returns:
true if the configuration file can be read, otherwise false
Pre Condition:
$none
Post Condition:
$none

readString

public static String readString()
Reads a string from the keyboard until the ENTER key is pressed.

Returns:
the string read or null if it is empty
Pre Condition:
$none
Post Condition:
$none

setConfigFileName

public void setConfigFileName(String name)
Sets the configuration file name

Parameters:
name - file name
Pre Condition:
name != null
Post Condition:
$none

getConfigFileName

public String getConfigFileName()
Gets the configuration file name

Returns:
file name
Pre Condition:
$none
Post Condition:
$result != null

setNumUser

public void setNumUser(int num)
Sets number of users

Parameters:
num - number of users
Pre Condition:
num >= 0
Post Condition:
$none

getNumUser

public int getNumUser()
Gets number of users

Returns:
number of users
Pre Condition:
$none
Post Condition:
$result >= 0

setUserSamplePoint

public void setUserSamplePoint(int point)
Sets the user sample point

Parameters:
point - sample point
Pre Condition:
point >= 0
Post Condition:
$none

getUserSamplePoint

public int getUserSamplePoint()
Gets the user sample point

Returns:
sample point
Pre Condition:
$none
Post Condition:
$result >= 0

setNumResource

public void setNumResource(int num)
Sets the number of resources

Parameters:
num - number of resources
Pre Condition:
num >= 0
Post Condition:
$none

getNumResource

public int getNumResource()
Gets number of resources

Returns:
number of resources
Pre Condition:
$none
Post Condition:
$result >= 0

setResourceSamplePoint

public void setResourceSamplePoint(int point)
Sets the resource sample point

Parameters:
point - sample point
Pre Condition:
point >= 0
Post Condition:
$none

getResourceSamplePoint

public int getResourceSamplePoint()
Gets the resource sample point

Returns:
sample point
Pre Condition:
$none
Post Condition:
$result >= 0