public class JMXPrincipal extends Objectimplements 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 Form
| Constructor and Description |
|---|
JMXPrincipal(String
Creates a JMXPrincipal for a given identity.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object
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(Stringname)
Creates a JMXPrincipal for a given identity.
name - the JMX Remote API name for this identity.
NullPointerException - if the
name is
null.
public StringgetName()
public StringtoString()
JMXPrincipal.
public boolean equals(Objecto)
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)