sun.security.mule.jgss.spi
Interface GSSNameSpi

All Known Implementing Classes:
GSSNameElement, Krb5NameElement

public interface GSSNameSpi

This interface is implemented by a mechanism specific name element. A GSSName is conceptually a container class of several name elements from different mechanisms.

Author:
Mayank Upadhyay

Method Summary
 boolean equals(GSSNameSpi name)
          Equals method for the GSSNameSpi objects.
 boolean equals(Object another)
          Compares this GSSNameSpi object to another Object that might be a GSSNameSpi.
 byte[] export()
          Returns a flat name representation for this object.
 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.
 

Method Detail

getProvider

Provider getProvider()

equals

boolean equals(GSSNameSpi name)
               throws GSSException
Equals method for the GSSNameSpi objects. If either name denotes an anonymous principal, the call should return false.

Parameters:
name - to be compared with
Throws:
GSSException - with major codes of BAD_NAMETYPE, BAD_NAME, FAILURE

equals

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.

Overrides:
equals in class Object
Parameters:
another - the object to be compared to
See Also:
equals(GSSNameSpi)

hashCode

int hashCode()
Returns a hashcode value for this GSSNameSpi.

Overrides:
hashCode in class Object
Returns:
a hashCode value

export

byte[] export()
              throws GSSException
Returns a flat name representation for this object. The name format is defined in RFC 2078.

Returns:
the flat name representation for this object
Throws:
GSSException - with major codes NAME_NOT_MN, BAD_NAME, BAD_NAME, FAILURE.

getMechanism

Oid getMechanism()
Get the mechanism type that this NameElement corresponds to.

Returns:
the Oid of the mechanism type

toString

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

Overrides:
toString in class Object
Returns:
string form of this name
See Also:
getStringNameType()

getStringNameType

Oid getStringNameType()
Returns the oid describing the format of the printable name.

Returns:
the Oid for the format of the printed name

isAnonymousName

boolean isAnonymousName()
Indicates if this name object represents an Anonymous name.



Copyright © 2013. All Rights Reserved.