public class

Realm

extends Object
implements Cloneable
java.lang.Object
   ↳ sun.security.mule.krb5.Realm

Class Overview

Implements the ASN.1 Realm type.

Realm ::= GeneralString

Summary

Fields
private static boolean DEBUG
private String realm
Public Constructors
Realm(String name)
Realm(DerValue encoding)
Constructs a Realm object.
Public Methods
byte[] asn1Encode()
Encodes a Realm object.
Object clone()
boolean equals(Object obj)
static String[] getRealmsList(String cRealm, String sRealm, Config kerberosConfig)
Returns an array of realms that may be traversed to obtain a TGT from the initiating realm cRealm to the target realm sRealm.
int hashCode()
static Realm parse(DerInputStream data, byte explicitTag, boolean optional)
Parse (unmarshal) a realm from a DER input stream.
static String parseRealmAtSeparator(String name)
String toString()
Protected Methods
static boolean isValidRealmString(String name)
static String parseRealm(String name)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private static boolean DEBUG

private String realm

Public Constructors

public Realm (String name)

Parameters
name

public Realm (DerValue encoding)

Constructs a Realm object.

Parameters
encoding A Der-encoded data.
Throws
Asn1Exception if an error occurs while decoding an ASN1 encoded data.
IOException if an I/O error occurs while reading encoded data.
RealmException if an error occurs while parsing a Realm object.

Public Methods

public byte[] asn1Encode ()

Encodes a Realm object.

Returns
  • the byte array of encoded KrbCredInfo object.
Throws
Asn1Exception if an error occurs while decoding an ASN1 encoded data.
IOException if an I/O error occurs while reading encoded data.

public Object clone ()

public boolean equals (Object obj)

Parameters
obj

public static String[] getRealmsList (String cRealm, String sRealm, Config kerberosConfig)

Returns an array of realms that may be traversed to obtain a TGT from the initiating realm cRealm to the target realm sRealm.
There may be an arbitrary number of intermediate realms between cRealm and sRealm. The realms may be organized organized hierarchically, or the paths between them may be specified in the [capaths] stanza of the caller's Kerberos configuration file. The configuration file is consulted first. Then a hirarchical organization is assumed if no realms are found in the configuration file.
The returned list, if not null, contains cRealm as the first entry. sRealm is not included unless it is mistakenly listed in the configuration file as an intermediary realm.

Parameters
cRealm The initiating realm
sRealm The target realm
kerberosConfig
Throws
KrbException

public int hashCode ()

public static Realm parse (DerInputStream data, byte explicitTag, boolean optional)

Parse (unmarshal) a realm from a DER input stream. This form parsing might be used when expanding a value which is part of a constructed sequence and uses explicitly tagged type.

Parameters
data The Der input stream value, which contains one or more marshaled value.
explicitTag Tag number.
optional Indicate if this data field is optional
Returns
  • an instance of Realm.
Throws
Asn1Exception on error.
IOException
RealmException

public static String parseRealmAtSeparator (String name)

Parameters
name

public String toString ()

Protected Methods

protected static boolean isValidRealmString (String name)

Parameters
name

protected static String parseRealm (String name)

Parameters
name