org.gridbus.broker.farming.common.data
Class SrbDataHost

java.lang.Object
  extended by org.gridbus.broker.farming.common.Server
      extended by org.gridbus.broker.farming.common.data.DataHost
          extended by org.gridbus.broker.farming.common.data.SrbDataHost

public final class SrbDataHost
extends DataHost

This class contains the methods to work with an SRB Data Host.

Author:
Krishna Nadiminti (kna@unimelb.edu.au)

Field Summary
 
Fields inherited from class org.gridbus.broker.farming.common.data.DataHost
MAX_BW, MAX_COST, MIN_BW, MIN_COST
 
Constructor Summary
SrbDataHost(java.lang.String hostname)
           
 
Method Summary
 void addFilePath(java.lang.String filename, java.lang.String path, java.lang.String username, java.lang.String password)
          Adds a filepath to the list of existing files hosted by this datahost
 java.lang.String getAuthScheme()
          Gets the Authentication Scheme used with SRB connection
 java.lang.String getCollectionName()
          Gets the collection name for the SRB connection to this host
 java.lang.String getDomain()
           
 java.lang.String getFullFilePath(java.lang.String filename)
          Returns the full path of the file (including the filename) on this host specified by the filename
 java.lang.String getPassword()
          Returns the password used for the connection to the SRBServer
 java.lang.String getResourceName()
          Gets the resource name for the SRB connection
 java.lang.String getSrbHost()
           
static java.lang.String getSrbPath(java.lang.String uri)
           
 int getSrbPort()
           
 java.lang.String getUsername()
           
static boolean isSrbUri(java.lang.String uri)
           
static SrbDataHost parseSrbUri(java.lang.String uri)
          This method expects the url to be in the following format: srb:// userName .
 void setAuthScheme(java.lang.String auth_scheme)
           
 void setCollection(java.lang.String collectionName)
          Sets the collection name for the SRB connection to this host
 void setDomain(java.lang.String domain)
           
 void setPassword(java.lang.String pwd)
          Sets the password for the connection to the SRBserver
 void setResourceName(java.lang.String resourceName)
          Sets the Resource Name for the SRB Connection
 void setSrbHost(java.lang.String srbHost)
           
 void setSrbPort(int srbPort)
           
 void setUsername(java.lang.String username)
           
 
Methods inherited from class org.gridbus.broker.farming.common.data.DataHost
addFilePath, clearFilePaths, getBandwidth, getCost, getEnv, getFileList, getFilePath, getRankedservers, isFilePresent, setCosts, setCosts, setNetworkService, setRankedservers, setRanks, setRanks
 
Methods inherited from class org.gridbus.broker.farming.common.Server
getHostname, getServerID, setHostname, setServerID
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SrbDataHost

public SrbDataHost(java.lang.String hostname)
Parameters:
hostname -
See Also:
DataHost.DataHost(String)
Method Detail

getDomain

public java.lang.String getDomain()
Returns:
Returns the domain.

setDomain

public void setDomain(java.lang.String domain)
Parameters:
domain - The domain to set.

getSrbHost

public java.lang.String getSrbHost()
Returns:
Returns the srbHost.

setSrbHost

public void setSrbHost(java.lang.String srbHost)
Parameters:
srbHost - The srbHost to set.

getSrbPort

public int getSrbPort()
Returns:
Returns the srbPort.

setSrbPort

public void setSrbPort(int srbPort)
Parameters:
srbPort - The srbPort to set.

getUsername

public java.lang.String getUsername()
Returns:
Returns the username.

setUsername

public void setUsername(java.lang.String username)
Parameters:
username - The username to set.

setPassword

public void setPassword(java.lang.String pwd)
Sets the password for the connection to the SRBserver

Parameters:
pwd -

getPassword

public java.lang.String getPassword()
Returns the password used for the connection to the SRBServer

Returns:
password

addFilePath

public void addFilePath(java.lang.String filename,
                        java.lang.String path,
                        java.lang.String username,
                        java.lang.String password)
Adds a filepath to the list of existing files hosted by this datahost

Parameters:
filename -
path -
username - (for SRB server)
password - (for SRB server)

getFullFilePath

public java.lang.String getFullFilePath(java.lang.String filename)
Description copied from class: DataHost
Returns the full path of the file (including the filename) on this host specified by the filename

Overrides:
getFullFilePath in class DataHost
Returns:
string filename
See Also:
DataHost.getFullFilePath(java.lang.String)

getResourceName

public java.lang.String getResourceName()
Gets the resource name for the SRB connection

Returns:

setResourceName

public void setResourceName(java.lang.String resourceName)
Sets the Resource Name for the SRB Connection

Parameters:
resourceName -

getCollectionName

public java.lang.String getCollectionName()
Gets the collection name for the SRB connection to this host

Returns:

setCollection

public void setCollection(java.lang.String collectionName)
Sets the collection name for the SRB connection to this host

Parameters:
collectionName -

getAuthScheme

public java.lang.String getAuthScheme()
Gets the Authentication Scheme used with SRB connection

Returns:

setAuthScheme

public void setAuthScheme(java.lang.String auth_scheme)
Parameters:
auth_scheme - The auth_scheme to set.

parseSrbUri

public static SrbDataHost parseSrbUri(java.lang.String uri)
This method expects the url to be in the following format: srb:// userName . domainHome [ : password ] @ host : port / path

Parameters:
uri -
Returns:

getSrbPath

public static java.lang.String getSrbPath(java.lang.String uri)
Parameters:
uri -
Returns:

isSrbUri

public static boolean isSrbUri(java.lang.String uri)
Parameters:
uri -
Returns: