public class CoGProperties
extends java.util.Properties
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BASEDN |
static java.lang.String |
CERT_CACHE_LIFETIME |
static java.lang.String |
CONFIG_FILE
the configuration file properties are read from --
located in ~/.globus"
|
static java.lang.String |
configFile
the config file location
|
static java.lang.String |
CRL_CACHE_LIFETIME
Deprecated.
|
static java.lang.String |
DELEGATION_KEY_CACHE_LIFETIME |
static java.lang.String |
ENFORCE_SIGNING_POLICY |
static java.lang.String |
MDSHOST |
static java.lang.String |
MDSPORT |
static java.lang.String |
NO_CACHE |
static java.lang.String |
THREADED_CACHE |
Constructor and Description |
---|
CoGProperties() |
CoGProperties(java.lang.String file) |
Modifier and Type | Method and Description |
---|---|
boolean |
enforceSigningPolicy() |
static void |
fixSpace(java.util.Properties p) |
protected boolean |
getAsBoolean(java.lang.String key,
boolean defaultValue) |
protected int |
getAsInt(java.lang.String label,
int defValue) |
java.lang.String |
getCaCertLocations()
Retrieves the location of the CA certificate files.
|
long |
getCertCacheLifetime()
Returns the Cert cache lifetime.
|
long |
getCRLCacheLifetime()
Deprecated.
replaced by
getCertCacheLifetime() |
static CoGProperties |
getDefault() |
java.lang.String |
getDefaultPKCS11Handle() |
int |
getDelegationKeyCacheLifetime()
Returns the delegation key cache lifetime for all delegations from this
JVM.
|
java.lang.String |
getHostName()
Returns the user specified hostname.
|
java.lang.String |
getIPAddress()
Returns the user specified ip address.
|
java.lang.String |
getPKCS11LibraryName() |
java.lang.String |
getProxyFile()
Retrieves the location of the proxy file.
|
int |
getProxyLifeTime() |
int |
getProxyStrength() |
java.lang.String |
getReverseDNSCacheType()
Returns the reverse DNS cache type.
|
long |
getReveseDNSCacheLifetime()
Returns the reverse DNS cache time.
|
java.lang.String |
getSecureRandomAlgorithm() |
java.lang.String |
getSecureRandomProvider() |
int |
getSocketTimeout()
Returns the timeout (in milliseconds) for sockets operations.
|
java.lang.String |
getTcpPortRange()
Returns the tcp port range.
|
java.lang.String |
getTcpSourcePortRange()
Returns the tcp source port range.
|
java.lang.String |
getUdpSourcePortRange()
Returns the udp source port range.
|
java.lang.String |
getUserCertFile()
Retrieves the location of the user cert file.
|
java.lang.String |
getUserKeyFile()
Retrieves the location of the user key file.
|
protected static boolean |
isNullOrEmpty(java.lang.String tmp) |
void |
load(java.io.InputStream in) |
void |
load(java.lang.String file) |
void |
save() |
void |
save(java.lang.String file) |
void |
setCaCertLocations(java.lang.String list) |
static void |
setDefault(CoGProperties properties)
Sets default configuration.
|
void |
setHostName(java.lang.String host)
Sets hostname
|
void |
setIPAddress(java.lang.String ipAddress)
Sets ip address
|
void |
setProxyFile(java.lang.String proxyFile) |
void |
setProxyLifeTime(int lifeTimeInHours) |
void |
setProxyStrength(int strength) |
void |
setSocketTimeout(int socketTimeout) |
void |
setUserCertFile(java.lang.String userCertFile) |
void |
setUserKeyFile(java.lang.String userKeyFile)
Sets user key file location
|
boolean |
useDevRandom()
Returns whether to use the /dev/urandom device
for seed generation.
|
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
public static final java.lang.String ENFORCE_SIGNING_POLICY
public static final java.lang.String DELEGATION_KEY_CACHE_LIFETIME
@Deprecated public static final java.lang.String CRL_CACHE_LIFETIME
public static final java.lang.String CERT_CACHE_LIFETIME
public static final java.lang.String MDSHOST
public static final java.lang.String MDSPORT
public static final java.lang.String BASEDN
public static final java.lang.String NO_CACHE
public static final java.lang.String THREADED_CACHE
public static final java.lang.String CONFIG_FILE
public static java.lang.String configFile
public CoGProperties()
public CoGProperties(java.lang.String file) throws java.io.IOException
java.io.IOException
public static CoGProperties getDefault()
public static void setDefault(CoGProperties properties)
public void save() throws java.io.IOException
java.io.IOException
public void save(java.lang.String file) throws java.io.IOException
java.io.IOException
public void load(java.lang.String file) throws java.io.IOException
java.io.IOException
public void load(java.io.InputStream in) throws java.io.IOException
load
in class java.util.Properties
java.io.IOException
public static void fixSpace(java.util.Properties p)
public java.lang.String getUserCertFile()
String
the location of the user cert filepublic void setUserCertFile(java.lang.String userCertFile)
public java.lang.String getPKCS11LibraryName()
public java.lang.String getDefaultPKCS11Handle()
public java.lang.String getUserKeyFile()
String
the location of the user key filepublic void setUserKeyFile(java.lang.String userKeyFile)
userKeyFile
- user key file locationpublic java.lang.String getHostName()
String
the hostname of the machine.public void setHostName(java.lang.String host)
host
- hostnamepublic java.lang.String getIPAddress()
getHostName()
function. If
getHostName()
returns a hostname that hostname is converted
into an IP address and it is returned. Otherwise, null is returned
(and default ip address will be used)String
the ip address of the machine.public void setIPAddress(java.lang.String ipAddress)
ipAddress
- ip addresspublic java.lang.String getCaCertLocations()
String
the locations of the CA certificatespublic void setCaCertLocations(java.lang.String list)
public java.lang.String getProxyFile()
String
the location of the proxy filepublic void setProxyFile(java.lang.String proxyFile)
public java.lang.String getTcpPortRange()
String
the port range.public java.lang.String getTcpSourcePortRange()
String
the port range.public java.lang.String getUdpSourcePortRange()
String
the port range.public boolean useDevRandom()
public boolean enforceSigningPolicy()
public int getDelegationKeyCacheLifetime()
@Deprecated public long getCRLCacheLifetime()
getCertCacheLifetime()
java.lang.NumberFormatException
- if the cache lifetime property
could not be parsedpublic long getCertCacheLifetime() throws java.lang.NumberFormatException
java.lang.NumberFormatException
- if the cache lifetime property
could not be parsedpublic long getReveseDNSCacheLifetime() throws java.lang.NumberFormatException
java.lang.NumberFormatException
- if the cache lifetime property
could not be parsedpublic java.lang.String getReverseDNSCacheType()
public java.lang.String getSecureRandomProvider()
public java.lang.String getSecureRandomAlgorithm()
public int getSocketTimeout()
public void setSocketTimeout(int socketTimeout)
public int getProxyStrength()
public void setProxyStrength(int strength)
public int getProxyLifeTime()
public void setProxyLifeTime(int lifeTimeInHours)
protected boolean getAsBoolean(java.lang.String key, boolean defaultValue)
protected int getAsInt(java.lang.String label, int defValue)
protected static final boolean isNullOrEmpty(java.lang.String tmp)