org.gridbus.broker.farming.common
Class BrokerProperties

java.lang.Object
  extended byorg.gridbus.broker.farming.common.BrokerProperties

public class BrokerProperties
extends java.lang.Object

This is the class which contains the global properties for the broker (loaded from DB.properties file at runtime)

Author:
Srikumar Venugopal (srikumar@cs.mu.oz.au)

Constructor Summary
BrokerProperties()
          Default constructor for the BrokerProperties class
 
Method Summary
static java.lang.String getProperty(java.lang.String key)
          Returns a specified property or null if it doesn't exist.
static java.lang.String getProperty(java.lang.String key, java.lang.String def)
          Returns a single property value for the given "key"
static org.ietf.jgss.GSSCredential getProxy()
          Get the proxy of the broker
static void setBrokerProperties(java.util.Properties prop)
          Sets all the broker properties at once
static void setProperty(java.lang.String key, java.lang.String val)
          Sets the property key with the value val
static void setProxy(org.ietf.jgss.GSSCredential prox)
          Sets the proxy for the broker
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrokerProperties

public BrokerProperties()
Default constructor for the BrokerProperties class

Method Detail

getProxy

public static org.ietf.jgss.GSSCredential getProxy()
Get the proxy of the broker

Returns:
GSSCredential proxy object

setProxy

public static void setProxy(org.ietf.jgss.GSSCredential prox)
Sets the proxy for the broker

Parameters:
prox - - GSSCredential proxy object

getProperty

public static java.lang.String getProperty(java.lang.String key)
                                    throws GridBrokerException
Returns a specified property or null if it doesn't exist.

Parameters:
key - The name or 'key' of the property
Returns:
String with the property contents, or null if property doesn't exist.
Throws:
GridBrokerException - If BrokerProperties.setBrokerProperties() has not been called.

getProperty

public static java.lang.String getProperty(java.lang.String key,
                                           java.lang.String def)
Returns a single property value for the given "key"

Parameters:
key - : the name of the property to get
def - : default value to return
Returns:
property value

setBrokerProperties

public static void setBrokerProperties(java.util.Properties prop)
Sets all the broker properties at once

Parameters:
prop - : Properties object which contains all the properties

setProperty

public static void setProperty(java.lang.String key,
                               java.lang.String val)
                        throws GridBrokerException
Sets the property key with the value val

Parameters:
key - : name of the property to set
val - : value of the property to be set
Throws:
GridBrokerException