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:
  • Constructor Details

    • InetAddressPrincipal

      public InetAddressPrincipal(InetAddress inetAddress)
      Create a new instance.
      Parameters:
      inetAddress - the address
  • Method Details

    • getName

      public String getName()
      Get the name of this principal; it will be the string representation of the IP address.
      Specified by:
      getName in interface Principal
      Returns:
      the name of this principal
    • 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.
      Specified by:
      equals in interface Principal
      Overrides:
      equals in class Object
      Parameters:
      other - the other instance
      Returns:
      true if they are equal, false otherwise
    • equals

      public boolean equals(InetAddressPrincipal other)
      Determine whether this instance is equal to another.
      Parameters:
      other - the other instance
      Returns:
      true if they are equal, false otherwise
    • hashCode

      public int hashCode()
      Get the hash code for this instance. It will be equal to the hash code of the InetAddress object herein.
      Specified by:
      hashCode in interface Principal
      Overrides:
      hashCode in class Object
      Returns:
      the hash code
    • toString

      public String toString()
      Get a human-readable representation of this principal.
      Specified by:
      toString in interface Principal
      Overrides:
      toString in class Object
      Returns:
      the string
    • clone

      public InetAddressPrincipal clone()
      Create a clone of this instance.
      Overrides:
      clone in class Object
      Returns:
      the clone