- java.lang.Object
-
- com.sun.security.auth.X500Principal
-
- All Implemented Interfaces:
Serializable
,Principal
Deprecated, for removal: This API element is subject to removal in a future version.A new X500Principal class is available in the Java platform. This X500Principal classs is entirely deprecated and is here to allow for a smooth transition to the new class. This class is subject to removal in a future version of Java SE.
@Deprecated(since="1.4", forRemoval=true) public class X500Principal extends Object implements Principal, Serializable
This class represents an X.500Principal
. X500Principals have names such as, "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US" (RFC 1779 style).Principals such as this
X500Principal
may be associated with a particularSubject
to augment thatSubject
with an additional identity. Refer to theSubject
class for more information on how to achieve this. Authorization decisions can then be based upon the Principals associated with aSubject
.- See Also:
Principal
,Subject
,X500Principal
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description X500Principal(String name)
Deprecated, for removal: This API element is subject to removal in a future version.Create a X500Principal with an X.500 Name, such as "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US" (RFC 1779 style).
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object o)
Deprecated, for removal: This API element is subject to removal in a future version.Compares the specified Object with thisX500Principal
for equality.String
getName()
Deprecated, for removal: This API element is subject to removal in a future version.Return the Unix username for thisX500Principal
.int
hashCode()
Deprecated, for removal: This API element is subject to removal in a future version.Return a hash code for thisX500Principal
.String
toString()
Deprecated, for removal: This API element is subject to removal in a future version.Return a string representation of thisX500Principal
.
-
-
-
Constructor Detail
-
X500Principal
public X500Principal(String name)
Deprecated, for removal: This API element is subject to removal in a future version.Create a X500Principal with an X.500 Name, such as "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US" (RFC 1779 style).- Parameters:
name
- the X.500 name- Throws:
NullPointerException
- if thename
isnull
.IllegalArgumentException
- if thename
is improperly specified.
-
-
Method Detail
-
getName
public String getName()
Deprecated, for removal: This API element is subject to removal in a future version.Return the Unix username for thisX500Principal
.
-
toString
public String toString()
Deprecated, for removal: This API element is subject to removal in a future version.Return a string representation of thisX500Principal
.
-
equals
public boolean equals(Object o)
Deprecated, for removal: This API element is subject to removal in a future version.Compares the specified Object with thisX500Principal
for equality.
-
hashCode
public int hashCode()
Deprecated, for removal: This API element is subject to removal in a future version.Return a hash code for thisX500Principal
.- Specified by:
hashCode
in interfacePrincipal
- Overrides:
hashCode
in classObject
- Returns:
- a hash code for this
X500Principal
. - See Also:
Object.equals(java.lang.Object)
,System.identityHashCode(java.lang.Object)
-
-