public class

Config

extends Object
java.lang.Object
   ↳ sun.security.krb5.Config

Class Overview

This class maintains key-value pairs of Kerberos configurable constants from configuration file or from user specified system properties.

Summary

Public Methods
int[] defaultEtype(String enctypes)
Returns the default encryption types.
String getDefault(String name)
Gets the default string value for the specified name.
String getDefault(String name, String section)
Gets the default string value for the specified name in the specified section.
boolean getDefaultBooleanValue(String name, String section)
Gets the default boolean value for the specified name in the specified section.
boolean getDefaultBooleanValue(String name)
Gets the default boolean value for the specified name.
int getDefaultIntValue(String name)
Gets the default int value for the specified name.
int getDefaultIntValue(String name, String section)
Gets the default int value for the specified name in the specified section.
String getDefaultRealm()
Gets default realm.
synchronized static Config getInstance()
Gets an instance of Config class.
String getKDCList(String realm)
Returns a list of KDC's with each KDC separated by a space
int getType(String input)
Get the etype and checksum value for the specified encryption and checksum type.
void listTable()
For testing purpose.
synchronized static void refresh()
Refresh and reload the Configuration.
void resetDefaultRealm(String realm)
Resets the default kdc realm.
boolean useAddresses()
Check to use addresses in tickets use addresses if "no_addresses" or "noaddresses" is set to false
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public int[] defaultEtype (String enctypes)

Returns the default encryption types.

public String getDefault (String name)

Gets the default string value for the specified name.

Parameters
name the name.
Returns
  • the default value, null is returned if it cannot be found.

public String getDefault (String name, String section)

Gets the default string value for the specified name in the specified section.
This method is quicker by using the section name as the search key.

Parameters
name the name.
section the name of the section.
Returns
  • the default value, null is returned if it cannot be found.

public boolean getDefaultBooleanValue (String name, String section)

Gets the default boolean value for the specified name in the specified section.
This method is quicker by using the section name as the search key.

Parameters
name the name.
section the name of the section.
Returns
  • the default boolean value, false is returned if it cannot be found.

public boolean getDefaultBooleanValue (String name)

Gets the default boolean value for the specified name.

Parameters
name the name.
Returns
  • the default boolean value, false is returned if it cannot be found.

public int getDefaultIntValue (String name)

Gets the default int value for the specified name.

Parameters
name the name.
Returns
  • the default Integer, null is returned if no such name and value are found in configuration file, or error occurs when parsing string to integer.

public int getDefaultIntValue (String name, String section)

Gets the default int value for the specified name in the specified section.
This method is quicker by using section name as the search key.

Parameters
name the name.
Returns
  • the default Integer, null is returned if no such name and value are found in configuration file, or error occurs when parsing string to integer.

public String getDefaultRealm ()

Gets default realm.

public static synchronized Config getInstance ()

Gets an instance of Config class. One and only one instance (the singleton) is returned.

Throws
KrbException if error occurs when constructing a Config instance. Possible causes would be configuration file not found, either of java.security.krb5.realm or java.security.krb5.kdc not specified, error reading configuration file.

public String getKDCList (String realm)

Returns a list of KDC's with each KDC separated by a space

Parameters
realm the realm for which the master KDC is desired
Returns
  • the list of KDCs

public int getType (String input)

Get the etype and checksum value for the specified encryption and checksum type.

public void listTable ()

For testing purpose. This method lists all information being parsed from the configuration file to the hashtable.

public static synchronized void refresh ()

Refresh and reload the Configuration. This could involve, for example reading the Configuration file again or getting the java.security.krb5.* system properties again.

Throws
KrbException if error occurs when constructing a Config instance. Possible causes would be configuration file not found, either of java.security.krb5.realm or java.security.krb5.kdc not specified, error reading configuration file.

public void resetDefaultRealm (String realm)

Resets the default kdc realm. We do not need to synchronize these methods since assignments are atomic

public boolean useAddresses ()

Check to use addresses in tickets use addresses if "no_addresses" or "noaddresses" is set to false