APIdia Launch Partner
Top Description Fields Constructors Methods
javax.management.remote

public Class JMXPrincipal

extends Object
implements Principal, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, java.security.Principal
Imports
java.io.IOException, .InvalidObjectException, .ObjectInputStream, .Serializable, java.security.Principal

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 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
java.security.Principal, javax.security.auth.Subject

Field Summary

Modifier and TypeField and Description
private String
private static final long

Constructor Summary

AccessConstructor and Description
public
JMXPrincipal(String
the JMX Remote API name for this identity.
name
)

Creates a JMXPrincipal for a given identity.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the specified Object is equal to this JMXPrincipal.
equals
(Object
Object to be compared for equality with this JMXPrincipal.
o
)

Overrides java.lang.Object.equals.

Implements java.security.Principal.equals.

Compares the specified Object with this JMXPrincipal for equality.

public String

Returns:

the name of this JMXPrincipal.
getName
()

Implements java.security.Principal.getName.

Returns the name of this principal.

public int

Returns:

a hash code for this JMXPrincipal.
hashCode
()

Overrides java.lang.Object.hashCode.

Implements java.security.Principal.hashCode.

Returns a hash code for this JMXPrincipal.

private void
public String

Returns:

a string representation of this JMXPrincipal.
toString
()

Overrides java.lang.Object.toString.

Implements java.security.Principal.toString.

Returns a string representation of this JMXPrincipal.

private static void
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

nameback to summary
private String name
See Also
getName()
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

JMXPrincipalback to summary
public JMXPrincipal(String name)

Creates a JMXPrincipal for a given identity.

Parameters
name:String

the JMX Remote API name for this identity.

Exceptions
NullPointerException:
if the name is null.

Method Detail

equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Implements java.security.Principal.equals.

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

Object to be compared for equality with this JMXPrincipal.

Returns:boolean

true if the specified Object is equal to this JMXPrincipal.

getNameback to summary
public String getName()

Implements java.security.Principal.getName.

Returns the name of this principal.

Returns:String

the name of this JMXPrincipal.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Implements java.security.Principal.hashCode.

Returns a hash code for this JMXPrincipal.

Returns:int

a hash code for this JMXPrincipal.

readObjectback to summary
private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Implements java.security.Principal.toString.

Returns a string representation of this JMXPrincipal.

Returns:String

a string representation of this JMXPrincipal.

validateback to summary
private static void validate(String name) throws NullPointerException