APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.jgss.wrapper

public Class GSSNameElement

extends Object
implements GSSNameSpi
Class Inheritance
All Implemented Interfaces
sun.security.jgss.spi.GSSNameSpi
Imports
org.ietf.jgss.GSSException, .GSSName, .Oid, sun.security.jgss.GSSExceptionImpl, .GSSUtil, sun.security.jgss.spi.GSSNameSpi, sun.security.krb5.Realm, sun.security.util.DerInputStream, .DerOutputStream, .ObjectIdentifier, java.io.IOException, java.lang.ref.Cleaner, java.security.Provider

This class is essentially a wrapper class for the gss_name_t structure of the native GSS library.
Author
Valerie Peng
Since
1.6

Field Summary

Modifier and TypeField and Description
private final Cleaner.Cleanable
private final GSSLibStub
pack-priv static final GSSNameElement
pack-priv final long
private String
private Oid

Constructor Summary

AccessConstructor and Description
private
pack-priv
GSSNameElement(long pNativeName, GSSLibStub stub)

pack-priv
GSSNameElement(byte[] nameBytes, Oid nameType, GSSLibStub stub)

Method Summary

Modifier and TypeMethod and Description
public void
private static Runnable
disposerFor(GSSLibStub stub, long pName)

public boolean
equals(GSSNameSpi other)

Implements sun.security.jgss.spi.GSSNameSpi.equals.

Equals method for the GSSNameSpi objects.

public boolean
equals(Object other)

Overrides java.lang.Object.equals.

Implements sun.security.jgss.spi.GSSNameSpi.equals.

Compares this GSSNameSpi object to another Object that might be a GSSNameSpi.

public byte[]
export()

Implements sun.security.jgss.spi.GSSNameSpi.export.

Returns a flat name representation for this object.

public String
public Oid
getMechanism()

Implements sun.security.jgss.spi.GSSNameSpi.getMechanism.

Get the mechanism type that this NameElement corresponds to.

private static Oid
public Provider
public Oid
getStringNameType()

Implements sun.security.jgss.spi.GSSNameSpi.getStringNameType.

Returns the oid describing the format of the printable name.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Implements sun.security.jgss.spi.GSSNameSpi.hashCode.

Returns a hashcode value for this GSSNameSpi.

public boolean
isAnonymousName()

Implements sun.security.jgss.spi.GSSNameSpi.isAnonymousName.

Indicates if this name object represents an Anonymous name.

private void
public String
toString()

Overrides java.lang.Object.toString.

Implements sun.security.jgss.spi.GSSNameSpi.toString.

Returns a string representation for this name.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

cleanableback to summary
private final Cleaner.Cleanable cleanable
cStubback to summary
private final GSSLibStub cStub
DEF_ACCEPTORback to summary
pack-priv static final GSSNameElement DEF_ACCEPTOR
pNameback to summary
pack-priv final long pName
printableNameback to summary
private String printableName
printableTypeback to summary
private Oid printableType

Constructor Detail

GSSNameElementback to summary
private GSSNameElement()
GSSNameElementback to summary
pack-priv GSSNameElement(long pNativeName, GSSLibStub stub) throws GSSException
GSSNameElementback to summary
pack-priv GSSNameElement(byte[] nameBytes, Oid nameType, GSSLibStub stub) throws GSSException

Method Detail

disposeback to summary
public void dispose()
disposerForback to summary
private static Runnable disposerFor(GSSLibStub stub, long pName)
equalsback to summary
public boolean equals(GSSNameSpi other) throws GSSException

Implements sun.security.jgss.spi.GSSNameSpi.equals.

Doc from sun.security.jgss.spi.GSSNameSpi.equals.

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

Exceptions
GSSException:
with major codes of BAD_NAMETYPE, BAD_NAME, FAILURE
equalsback to summary
public boolean equals(Object other)

Overrides java.lang.Object.equals.

Implements sun.security.jgss.spi.GSSNameSpi.equals.

Doc from sun.security.jgss.spi.GSSNameSpi.equals.

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.

exportback to summary
public byte[] export() throws GSSException

Implements sun.security.jgss.spi.GSSNameSpi.export.

Doc from sun.security.jgss.spi.GSSNameSpi.export.

Returns a flat name representation for this object. The name format is defined in RFC 2078.

Exceptions
GSSException:
with major codes NAME_NOT_MN, BAD_NAME, BAD_NAME, FAILURE.
getKrbNameback to summary
public String getKrbName() throws GSSException
getMechanismback to summary
public Oid getMechanism()

Implements sun.security.jgss.spi.GSSNameSpi.getMechanism.

Doc from sun.security.jgss.spi.GSSNameSpi.getMechanism.

Get the mechanism type that this NameElement corresponds to.

getNativeNameTypeback to summary
private static Oid getNativeNameType(Oid nameType, GSSLibStub stub)
getProviderback to summary
public Provider getProvider()

Implements sun.security.jgss.spi.GSSNameSpi.getProvider.

getStringNameTypeback to summary
public Oid getStringNameType()

Implements sun.security.jgss.spi.GSSNameSpi.getStringNameType.

Doc from sun.security.jgss.spi.GSSNameSpi.getStringNameType.

Returns the oid describing the format of the printable name.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Implements sun.security.jgss.spi.GSSNameSpi.hashCode.

Doc from sun.security.jgss.spi.GSSNameSpi.hashCode.

Returns a hashcode value for this GSSNameSpi.

isAnonymousNameback to summary
public boolean isAnonymousName()

Implements sun.security.jgss.spi.GSSNameSpi.isAnonymousName.

Doc from sun.security.jgss.spi.GSSNameSpi.isAnonymousName.

Indicates if this name object represents an Anonymous name.

setPrintablesback to summary
private void setPrintables() throws GSSException
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Implements sun.security.jgss.spi.GSSNameSpi.toString.

Doc from sun.security.jgss.spi.GSSNameSpi.toString.

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