GeezerVison is showing docs.oracle.com — Identity (Java Platform SE 8 )
Java™ Platform Standard Ed. 8
compact1, compact2, compact3
java.security
Class Identity
-
-
Constructor Summary
Constructors
| Modifier |
Constructor |
Description |
protected |
Identity() |
Deprecated.
Constructor for serialization only.
|
|
Identity(String name) |
Deprecated.
Constructs an identity with the specified name and no scope.
|
|
Identity(String name,
IdentityScope scope) |
Deprecated.
Constructs an identity with the specified name and scope.
|
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods
| Modifier and Type |
Method |
Description |
void |
addCertificate(Certificate certificate) |
Deprecated.
Adds a certificate for this identity.
|
Certificate[] |
certificates() |
Deprecated.
Returns a copy of all the certificates for this identity.
|
boolean |
equals(Object identity) |
Deprecated.
Tests for equality between the specified object and this identity.
|
String |
getInfo() |
Deprecated.
Returns general information previously specified for this identity.
|
String |
getName() |
Deprecated.
Returns this identity's name.
|
PublicKey |
getPublicKey() |
Deprecated.
Returns this identity's public key.
|
IdentityScope |
getScope() |
Deprecated.
Returns this identity's scope.
|
int |
hashCode() |
Deprecated.
Returns a hashcode for this identity.
|
protected boolean |
identityEquals(Identity identity) |
Deprecated.
Tests for equality between the specified identity and this identity.
|
void |
removeCertificate(Certificate certificate) |
Deprecated.
Removes a certificate from this identity.
|
void |
setInfo(String info) |
Deprecated.
Specifies a general information string for this identity.
|
void |
setPublicKey(PublicKey key) |
Deprecated.
Sets this identity's public key.
|
String |
toString() |
Deprecated.
Returns a short string describing this identity, telling its
name and its scope (if any).
|
String |
toString(boolean detailed) |
Deprecated.
Returns a string representation of this identity, with
optionally more details than that provided by the
toString method without any arguments.
|
-
-
Constructor Detail
-
Identity
public Identity(String name,
IdentityScope scope)
throws KeyManagementException
Deprecated.
Constructs an identity with the specified name and scope.
- Parameters:
name - the identity name.
scope - the scope of the identity.
- Throws:
KeyManagementException - if there is already an identity
with the same name in the scope.
-
Method Detail
-
identityEquals
protected boolean identityEquals(Identity identity)
Deprecated.
Tests for equality between the specified identity and this identity.
This method should be overriden by subclasses to test for equality.
The default behavior is to return true if the names and public keys
are equal.
- Parameters:
identity - the identity to test for equality with this identity.
- Returns:
- true if the identities are considered equal, false
otherwise.
- See Also:
equals(java.lang.Object)
-
toString
public String toString()
Deprecated.
Returns a short string describing this identity, telling its
name and its scope (if any).
First, if there is a security manager, its checkSecurityAccess
method is called with "printIdentity"
as its argument to see if it's ok to return the string.
- Specified by:
toString in interface Principal
- Overrides:
toString in class Object
- Returns:
- information about this identity, such as its name and the
name of its scope (if any).
- Throws:
SecurityException - if a security manager exists and its
checkSecurityAccess method doesn't allow
returning a string describing this identity.
- See Also:
SecurityManager.checkSecurityAccess(java.lang.String)
Java™ Platform Standard Ed. 8
Submit a bug or feature For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
|