javax.management.remote
Class JMXPrincipal

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.management.remote.JMXPrincipal
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Principal sample code for java.security.Principal definition code for java.security.Principal

public class JMXPrincipal
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Principal sample code for java.security.Principal definition code for java.security.Principal , Serializable sample code for java.io.Serializable definition code for java.io.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 sample code for javax.security.auth.Subject definition code for javax.security.auth.Subject class for more information on how to achieve this. Authorization decisions can then be based upon the Principals associated with a Subject.

Since:
1.5
See Also:
Principal sample code for java.security.Principal definition code for java.security.Principal , Subject sample code for javax.security.auth.Subject definition code for javax.security.auth.Subject , Serialized Form

Constructor Summary
JMXPrincipal sample code for javax.management.remote.JMXPrincipal.JMXPrincipal(java.lang.String) definition code for javax.management.remote.JMXPrincipal.JMXPrincipal(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
          Creates a JMXPrincipal for a given identity.
 
Method Summary
 boolean equals sample code for javax.management.remote.JMXPrincipal.equals(java.lang.Object) definition code for javax.management.remote.JMXPrincipal.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  o)
          Compares the specified Object with this JMXPrincipal for equality.
 String sample code for java.lang.String definition code for java.lang.String getName sample code for javax.management.remote.JMXPrincipal.getName() definition code for javax.management.remote.JMXPrincipal.getName() ()
          Returns the name of this principal.
 int hashCode sample code for javax.management.remote.JMXPrincipal.hashCode() definition code for javax.management.remote.JMXPrincipal.hashCode() ()
          Returns a hash code for this JMXPrincipal.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.management.remote.JMXPrincipal.toString() definition code for javax.management.remote.JMXPrincipal.toString() ()
          Returns a string representation of this JMXPrincipal.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

JMXPrincipal sample code for javax.management.remote.JMXPrincipal(java.lang.String) definition code for javax.management.remote.JMXPrincipal(java.lang.String)

public JMXPrincipal(String sample code for java.lang.String definition code for java.lang.String  name)

Creates a JMXPrincipal for a given identity.

Parameters:
name - the JMX Remote API name for this identity.
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if the name is null.
Method Detail

getName sample code for javax.management.remote.JMXPrincipal.getName() definition code for javax.management.remote.JMXPrincipal.getName()

public String sample code for java.lang.String definition code for java.lang.String  getName()
Returns the name of this principal.

Specified by:
getName sample code for java.security.Principal.getName() definition code for java.security.Principal.getName() in interface Principal sample code for java.security.Principal definition code for java.security.Principal
Returns:
the name of this JMXPrincipal.

toString sample code for javax.management.remote.JMXPrincipal.toString() definition code for javax.management.remote.JMXPrincipal.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Returns a string representation of this JMXPrincipal.

Specified by:
toString sample code for java.security.Principal.toString() definition code for java.security.Principal.toString() in interface Principal sample code for java.security.Principal definition code for java.security.Principal
Overrides:
toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a string representation of this JMXPrincipal.

equals sample code for javax.management.remote.JMXPrincipal.equals(java.lang.Object) definition code for javax.management.remote.JMXPrincipal.equals(java.lang.Object)

public boolean equals(Object sample code for java.lang.Object definition code for java.lang.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.

Specified by:
equals sample code for java.security.Principal.equals(java.lang.Object) definition code for java.security.Principal.equals(java.lang.Object) in interface Principal sample code for java.security.Principal definition code for java.security.Principal
Overrides:
equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) in class Object sample code for java.lang.Object definition code for java.lang.Object
Parameters:
o - Object to be compared for equality with this JMXPrincipal.
Returns:
true if the specified Object is equal to this JMXPrincipal.
See Also:
Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

hashCode sample code for javax.management.remote.JMXPrincipal.hashCode() definition code for javax.management.remote.JMXPrincipal.hashCode()

public int hashCode()
Returns a hash code for this JMXPrincipal.

Specified by:
hashCode sample code for java.security.Principal.hashCode() definition code for java.security.Principal.hashCode() in interface Principal sample code for java.security.Principal definition code for java.security.Principal
Overrides:
hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a hash code for this JMXPrincipal.
See Also:
Object.equals(java.lang.Object) sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable