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.
NullPointerException
- if the name
is
null
.name
- the JMX Remote API name for this identity.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)
aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2019 aicas GmbH. All Rights Reserved.