com.sun.gssapi
Interface GSSNameSpi


public interface GSSNameSpi

This class represents a mechanism specific name element. One or more instances of this class are contained in an instance of a GSSName object. Each GSSNameSpi object represents at most 1 mechanism specific name element.


Method Summary
 java.lang.Object clone()
          Produces a copy of this object.
 boolean equals(GSSNameSpi name)
          Equal method for the GSSNameSpi objects.
 byte[] export()
          Returns a flat name representation for this object.
 Oid getMech()
          Get the mechanism type that this NameElement corresponds to.
 Oid getNameType()
          Returns the name type oid for this name.
 Oid getStringNameType()
          Returns the oid describing the format of the printable name.
 void init(byte[] externalName, Oid nameType)
          Initializer for the GSSNameSpi object using a byte array.
 void init(java.lang.String name, Oid nameType)
          Initializer for the GSSNameSpi object using a String.
 boolean isAnonymousName()
          Indicates if this name object represents an Anonymous name.
 java.lang.String toString()
          Returns a string representation for this name.
 

Method Detail

init

void init(byte[] externalName,
          Oid nameType)
          throws GSSException
Initializer for the GSSNameSpi object using a byte array.

Parameters:
byte[] - name bytes which is to be interpreted based on the nameType
nameType - - oid representing the type of name supplied
Throws:
GSSException - The major codes can be BAD_NAMETYPE, BAD_NAME, and FAILURE.
See Also:
init(String,Oid)

init

void init(java.lang.String name,
          Oid nameType)
          throws GSSException
Initializer for the GSSNameSpi object using a String.

Parameters:
name - string which is to be interpreted based on the nameType
nameType - - oid representing the type of name supplied
Throws:
GSSException - The major codes can be BAD_NAMETYPE, BAD_NAME, and FAILURE.
See Also:
init(String,Oid)

equals

boolean equals(GSSNameSpi name)
               throws GSSException
Equal 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

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.

getMech

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

Returns:
the Oid of the mechanism type

getNameType

Oid getNameType()
Returns the name type oid for this name.

Returns:
the name type oid for this name

toString

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

Overrides:
toString in class java.lang.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

clone

java.lang.Object clone()
Produces a copy of this object.


isAnonymousName

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