public class JMXPrincipal extends Object implements Principal, Serializable
The identity of a remote client of the JMX Remote API.
Principals such as this JMXPrincipal
may be associated with a particular Subject
to augment that Subject
with an additional
identity. Refer to the Subject
class for more information on how to achieve this.
Authorization decisions can then be based upon
the Principals associated with a Subject
.
Principal
,
Subject
,
Serialized FormConstructor and Description |
---|
JMXPrincipal(String name)
Creates a JMXPrincipal for a given identity.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Compares the specified Object with this
JMXPrincipal
for equality. |
String |
getName()
Returns the name of this principal.
|
int |
hashCode()
Returns a hash code for this
JMXPrincipal . |
String |
toString()
Returns a string representation of this
JMXPrincipal . |
public JMXPrincipal(String name)
Creates a JMXPrincipal for a given identity.
name
- the JMX Remote API name for this identity.NullPointerException
- if the name
is
null
.public String getName()
public String toString()
JMXPrincipal
.
public boolean equals(Object o)
JMXPrincipal
for equality. Returns true if the given object is also a
JMXPrincipal
and the two JMXPrincipals
have the same name.
public int hashCode()
JMXPrincipal
.
hashCode
in interface Principal
hashCode
in class Object
JMXPrincipal
.Object.equals(java.lang.Object)
,
System.identityHashCode(java.lang.Object)
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, 2020, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.