sun.security.mule.jgss.wrapper
Class GSSNameElement

java.lang.Object
  extended by sun.security.mule.jgss.wrapper.GSSNameElement
All Implemented Interfaces:
GSSNameSpi

public class GSSNameElement
extends Object
implements GSSNameSpi

This class is essentially a wrapper class for the gss_name_t structure of the native GSS library.

Since:
1.6
Author:
Valerie Peng

Method Summary
 void dispose()
           
 boolean equals(GSSNameSpi other)
          Equals method for the GSSNameSpi objects.
 boolean equals(Object other)
          Compares this GSSNameSpi object to another Object that might be a GSSNameSpi.
 byte[] export()
          Returns a flat name representation for this object.
protected  void finalize()
           
 String getKrbName()
           
 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.
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getKrbName

public String getKrbName()
                  throws GSSException
Throws:
GSSException

getProvider

public Provider getProvider()
Specified by:
getProvider in interface GSSNameSpi

equals

public boolean equals(GSSNameSpi other)
               throws GSSException
Description copied from interface: GSSNameSpi
Equals method for the GSSNameSpi objects. If either name denotes an anonymous principal, the call should return false.

Specified by:
equals in interface GSSNameSpi
Parameters:
other - to be compared with
Throws:
GSSException - with major codes of BAD_NAMETYPE, BAD_NAME, FAILURE

equals

public boolean equals(Object other)
Description copied from interface: GSSNameSpi
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.

Specified by:
equals in interface GSSNameSpi
Overrides:
equals in class Object
Parameters:
other - the object to be compared to
See Also:
GSSNameSpi.equals(GSSNameSpi)

hashCode

public int hashCode()
Description copied from interface: GSSNameSpi
Returns a hashcode value for this GSSNameSpi.

Specified by:
hashCode in interface GSSNameSpi
Overrides:
hashCode in class Object
Returns:
a hashCode value

export

public byte[] export()
              throws GSSException
Description copied from interface: GSSNameSpi
Returns a flat name representation for this object. The name format is defined in RFC 2078.

Specified by:
export in interface GSSNameSpi
Returns:
the flat name representation for this object
Throws:
GSSException - with major codes NAME_NOT_MN, BAD_NAME, BAD_NAME, FAILURE.

getMechanism

public Oid getMechanism()
Description copied from interface: GSSNameSpi
Get the mechanism type that this NameElement corresponds to.

Specified by:
getMechanism in interface GSSNameSpi
Returns:
the Oid of the mechanism type

toString

public String toString()
Description copied from interface: GSSNameSpi
Returns a string representation for this name. The printed name type can be obtained by calling getStringNameType().

Specified by:
toString in interface GSSNameSpi
Overrides:
toString in class Object
Returns:
string form of this name
See Also:
GSSNameSpi.getStringNameType()

getStringNameType

public Oid getStringNameType()
Description copied from interface: GSSNameSpi
Returns the oid describing the format of the printable name.

Specified by:
getStringNameType in interface GSSNameSpi
Returns:
the Oid for the format of the printed name

isAnonymousName

public boolean isAnonymousName()
Description copied from interface: GSSNameSpi
Indicates if this name object represents an Anonymous name.

Specified by:
isAnonymousName in interface GSSNameSpi

dispose

public void dispose()

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable


Copyright © 2013. All Rights Reserved.