public class

Krb5NameElement

extends Object
implements GSSNameSpi
java.lang.Object
   ↳ sun.security.jgss.krb5.Krb5NameElement

Class Overview

Implements the GSSNameSpi for the krb5 mechanism.

Summary

Public Methods
boolean equals(GSSNameSpi other)
Equal method for the GSSNameSpi objects.
boolean equals(Object another)
Compares this GSSNameSpi object to another Object that might be a GSSNameSpi.
byte[] export()
Returns the principal name in the form user@REALM or host/service@REALM but with the following contraints that are imposed by RFC 1964:
  (1) all occurrences of the characters `@`,  `/`, and `\` within
   principal components or realm names shall be quoted with an
   immediately-preceding `\`.
Oid getGSSNameType()
Returns the name type oid.
final PrincipalName getKrb5PrincipalName()
Oid getMechanism()
Get the mechanism type that this NameElement corresponds to.
Provider getProvider()
Oid getStringNameType()
Returns the oid describing the format of the printable name.
int hashCode()
Returns a hashcode value for this GSSNameSpi.
boolean isAnonymousName()
Indicates if this name object represents an Anonymous name.
String toString()
Returns a string representation for this name.
[Expand]
Inherited Methods
From class java.lang.Object
From interface sun.security.jgss.spi.GSSNameSpi

Public Methods

public boolean equals (GSSNameSpi other)

Equal method for the GSSNameSpi objects. If either name denotes an anonymous principal, the call should return false.

Parameters
other to be compared with
Throws
GSSException with major codes of BAD_NAMETYPE, BAD_NAME, FAILURE

public boolean equals (Object another)

Compares this GSSNameSpi object to another Object that might be a GSSNameSpi. The behaviour is exactly the same as in equals except that no GSSException is thrown; instead, false will be returned in the situation where an error occurs.

Parameters
another the object to be compared to
Returns
  • true if this object is the same as the obj argument; false otherwise.

public byte[] export ()

Returns the principal name in the form user@REALM or host/service@REALM but with the following contraints that are imposed by RFC 1964:

  (1) all occurrences of the characters `@`,  `/`, and `\` within
   principal components or realm names shall be quoted with an
   immediately-preceding `\`.

   (2) all occurrences of the null, backspace, tab, or newline
   characters within principal components or realm names will be
   represented, respectively, with `\0`, `\b`, `\t`, or `\n`.

   (3) the `\` quoting character shall not be emitted within an
   exported name except to accomodate cases (1) and (2).
 

Returns
  • the flat name representation for this object
Throws
GSSException

public Oid getGSSNameType ()

Returns the name type oid.

public final PrincipalName getKrb5PrincipalName ()

public Oid getMechanism ()

Get the mechanism type that this NameElement corresponds to.

Returns
  • the Oid of the mechanism type

public Provider getProvider ()

public Oid getStringNameType ()

Returns the oid describing the format of the printable name.

Returns
  • the Oid for the format of the printed name

public int hashCode ()

Returns a hashcode value for this GSSNameSpi.

Returns
  • a hashCode value

public boolean isAnonymousName ()

Indicates if this name object represents an Anonymous name.

public String toString ()

Returns a string representation for this name. The printed name type can be obtained by calling getStringNameType().

Returns
  • string form of this name