org.gridbus.broker.farming.common
Class Server

java.lang.Object
  |
  +--org.gridbus.broker.farming.common.Server
Direct Known Subclasses:
ComputeServer, DataHost, StorageServer

public abstract class Server
extends java.lang.Object

Author:
krishna

Field Summary
static int BUSY
          Server is busy
static int READY
          Server is ready
 
Constructor Summary
Server()
           
 
Method Summary
 java.lang.String getHostname()
          Returns the hostname.
 java.lang.String getServerID()
          Returns the Unique ID of this server.
 int getServerStatus()
          Returns the server status as an integer
 java.lang.String getStatus()
          returns the Status of this compute Server
 void setHostname(java.lang.String hostname)
           
 void setServerStatus(int serverStatus)
          Sets the server status
 void setStatus(java.lang.String string)
          Sets the Status
static int statusInt(java.lang.String serverStatus)
          Converts the given string status to int form.
static java.lang.String statusString(int serverStatus)
          Converts the given int status to string form.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

READY

public static final int READY
Server is ready

See Also:
Constant Field Values

BUSY

public static final int BUSY
Server is busy

See Also:
Constant Field Values
Constructor Detail

Server

public Server()
Method Detail

statusString

public static java.lang.String statusString(int serverStatus)
Converts the given int status to string form. Available status-es are "ready" (0) and "busy" (1).

Parameters:
serverStatus -
Returns:

statusInt

public static int statusInt(java.lang.String serverStatus)
Converts the given string status to int form. Available status-es are "ready" (0) and "busy" (1).

Parameters:
serverStatus -
Returns:

getHostname

public java.lang.String getHostname()
Returns the hostname.

Returns:
String

setHostname

public void setHostname(java.lang.String hostname)
Parameters:
hostname - The hostname to set.

getStatus

public java.lang.String getStatus()
returns the Status of this compute Server

Returns:
status string

setStatus

public void setStatus(java.lang.String string)
Sets the Status

Parameters:
string -

getServerStatus

public int getServerStatus()
Returns the server status as an integer

Returns:

setServerStatus

public void setServerStatus(int serverStatus)
Sets the server status

Parameters:
serverStatus -

getServerID

public java.lang.String getServerID()
Returns the Unique ID of this server.

Returns:
serverID