Package com.sun.gssapi
Interface GSSNameSpi
-
public interface GSSNameSpiThis 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Objectclone()Produces a copy of this object.booleanequals(GSSNameSpi name)Equal method for the GSSNameSpi objects.byte[]export()Returns a flat name representation for this object.OidgetMech()Get the mechanism type that this NameElement corresponds to.OidgetNameType()Returns the name type oid for this name.OidgetStringNameType()Returns the oid describing the format of the printable name.voidinit(byte[] externalName, Oid nameType)Initializer for the GSSNameSpi object using a byte array.voidinit(java.lang.String name, Oid nameType)Initializer for the GSSNameSpi object using a String.booleanisAnonymousName()Indicates if this name object represents an Anonymous name.java.lang.StringtoString()Returns a string representation for this name.
-
-
-
Method Detail
-
init
void init(byte[] externalName, Oid nameType) throws GSSExceptionInitializer for the GSSNameSpi object using a byte array.- Parameters:
byte- [] name bytes which is to be interpreted based on the nameTypenameType- - 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 GSSExceptionInitializer for the GSSNameSpi object using a String.- Parameters:
name- string which is to be interpreted based on the nameTypenameType- - 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 GSSExceptionReturns 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:
toStringin classjava.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.
-
-