public class

JMXPrincipal

extends Object
implements Serializable Principal
java.lang.Object
   ↳ javax.management.remote.JMXPrincipal

Class Overview

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.

See Also

Summary

Public Constructors
JMXPrincipal(String name)

Creates a JMXPrincipal for a given identity.

Public Methods
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.
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.security.Principal

Public Constructors

public JMXPrincipal (String name)

Creates a JMXPrincipal for a given identity.

Parameters
name the JMX Remote API name for this identity.
Throws
NullPointerException if the name is null.

Public Methods

public boolean equals (Object o)

Compares the specified Object with this JMXPrincipal for equality. Returns true if the given object is also a JMXPrincipal and the two JMXPrincipals have the same name.

Parameters
o Object to be compared for equality with this JMXPrincipal.
Returns
  • true if the specified Object is equal to this JMXPrincipal.

public String getName ()

Returns the name of this principal.

Returns
  • the name of this JMXPrincipal.

public int hashCode ()

Returns a hash code for this JMXPrincipal.

Returns
  • a hash code for this JMXPrincipal.

public String toString ()

Returns a string representation of this JMXPrincipal.

Returns
  • a string representation of this JMXPrincipal.