Package org.jboss.as.controller.security
Class InetAddressPrincipal
- java.lang.Object
-
- org.jboss.as.controller.security.InetAddressPrincipal
-
- All Implemented Interfaces:
Serializable,Cloneable,Principal
public final class InetAddressPrincipal extends Object implements Principal, Cloneable, Serializable
- Author:
- Kabir Khan
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InetAddressPrincipal(InetAddress inetAddress)Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InetAddressPrincipalclone()Create a clone of this instance.booleanequals(Object other)Determine whether this instance is equal to another.booleanequals(InetAddressPrincipal other)Determine whether this instance is equal to another.InetAddressgetInetAddress()Get the IP address of this principal.StringgetName()Get the name of this principal; it will be the string representation of the IP address.inthashCode()Get the hash code for this instance.StringtoString()Get a human-readable representation of this principal.
-
-
-
Constructor Detail
-
InetAddressPrincipal
public InetAddressPrincipal(InetAddress inetAddress)
Create a new instance.- Parameters:
inetAddress- the address
-
-
Method Detail
-
getName
public String getName()
Get the name of this principal; it will be the string representation of the IP address.
-
getInetAddress
public InetAddress getInetAddress()
Get the IP address of this principal.- Returns:
- the address
-
equals
public boolean equals(Object other)
Determine whether this instance is equal to another.
-
equals
public boolean equals(InetAddressPrincipal other)
Determine whether this instance is equal to another.- Parameters:
other- the other instance- Returns:
trueif they are equal,falseotherwise
-
hashCode
public int hashCode()
Get the hash code for this instance. It will be equal to the hash code of theInetAddressobject herein.
-
toString
public String toString()
Get a human-readable representation of this principal.
-
clone
public InetAddressPrincipal clone()
Create a clone of this instance.
-
-