org.gridbus.broker.services.data
Class SrbDataHost

java.lang.Object
  extended by org.gridbus.broker.common.Service
      extended by org.gridbus.broker.common.DataHost
          extended by org.gridbus.broker.services.data.SrbDataHost

public class SrbDataHost
extends DataHost

This class contains the methods to work with an SRB Data Host. SRB URL protocol: srb://[username.mdasdomain[.zone][:password]@]host[:port]/path[?replica=replica_id][&resource=resource_name][&serverDN=server_DN][&authScheme=auth_scheme]

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

Constructor Summary
SrbDataHost(java.lang.String hostname)
           
 
Method Summary
 java.lang.Object clone()
           
protected  boolean discoverProperties(UserCredential uc)
          Discover properties should be implemented by all subclasses.
 java.lang.String getAuthScheme()
          Gets the Authentication Scheme used with SRB connection
 int getDataHostType()
           
 java.lang.String getFullFilePath(java.lang.String filename)
          Returns an SRB URL of the form: srb:// [username.mdasdomain [.zone] [:password] @] host [:port][/path][?replica=replica_id][&resource=resource_name][&serverDN=server_DN] The URL resembles a http url with a query string.
 java.lang.String getMdasDomainName()
           
 java.lang.String getMdasResourceName()
           
 java.lang.String getPassword()
          Returns the password used for the connection to the SRBServer
 int getPort()
           
 java.lang.String getServerDN()
           
 java.lang.String getUsername()
           
 java.lang.String getZone()
           
 void setAuthScheme(java.lang.String auth_scheme)
           
 void setMdasDomainName(java.lang.String domain)
           
 void setMdasResourceName(java.lang.String mdasResourceName)
           
 void setPassword(java.lang.String pwd)
          Sets the password for the connection to the SRBserver
 void setPort(int srbPort)
           
 void setServerDN(java.lang.String serverDN)
           
 void setUsername(java.lang.String username)
           
 void setZone(java.lang.String zone)
           
 java.lang.String toString()
           
 
Methods inherited from class org.gridbus.broker.common.DataHost
addFilePath, clearFilePaths, equals, getDataAccessMode, getFileTable, getHostname, getServiceType, isFilePresent, setDataAccessMode
 
Methods inherited from class org.gridbus.broker.common.Service
getApplicationID, getId, getMappingID, getName, isAvailable, setApplicationID, setAvailable, setMappingID, setName
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SrbDataHost

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

getMdasDomainName

public java.lang.String getMdasDomainName()
Returns:
Returns the mdasDomainName.

setMdasDomainName

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

getPort

public int getPort()
Returns:
Returns the port.

setPort

public void setPort(int srbPort)
Parameters:
port - The port 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

getFullFilePath

public java.lang.String getFullFilePath(java.lang.String filename)
Returns an SRB URL of the form: srb:// [username.mdasdomain [.zone] [:password] @] host [:port][/path][?replica=replica_id][&resource=resource_name][&serverDN=server_DN] The URL resembles a http url with a query string. (The order of the parameter-value pairs in the query-string is not important)

Specified by:
getFullFilePath in class DataHost
Parameters:
filename -
Returns:
srb url

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:
authScheme - The authScheme to set.

toString

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

getMdasResourceName

public java.lang.String getMdasResourceName()
Returns:
Returns the mdasResourceName.

setMdasResourceName

public void setMdasResourceName(java.lang.String mdasResourceName)
Parameters:
mdasResourceName - The mdasResourceName to set.

getDataHostType

public int getDataHostType()
Specified by:
getDataHostType in class DataHost
See Also:
org.gridbus.broker.farming.common.DataHost#getDataHostType()

discoverProperties

protected boolean discoverProperties(UserCredential uc)
                              throws GridBrokerException
Description copied from class: Service
Discover properties should be implemented by all subclasses. At the very least, this should inform the caller about the availability of the (remote) service, and also set the "available" field of the service object.

Specified by:
discoverProperties in class Service
Parameters:
uc - (credentials used to connect to the service, if any)
Returns:
true if the service is available, false otherwise.
Throws:
GridBrokerException

getZone

public java.lang.String getZone()
Returns:
Returns the zone.

setZone

public void setZone(java.lang.String zone)
Parameters:
zone - The zone to set.

getServerDN

public java.lang.String getServerDN()
Returns:
Returns the serverDN.

setServerDN

public void setServerDN(java.lang.String serverDN)
Parameters:
serverDN - The serverDN to set.

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

Copyright © The University of Melbourne. 2006