JBoss Remoting 3 3.2.0.Beta2-redhat-1

org.jboss.remoting3.security
Class InetAddressPrincipal

java.lang.Object
  extended by org.jboss.remoting3.security.InetAddressPrincipal
All Implemented Interfaces:
Cloneable, Principal

public final class InetAddressPrincipal
extends Object
implements Principal, Cloneable

A principal representing an IP address.


Constructor Summary
InetAddressPrincipal(InetAddress inetAddress)
          Create a new instance.
 
Method Summary
 InetAddressPrincipal clone()
          Create a clone of this instance.
 boolean equals(InetAddressPrincipal other)
          Determine whether this instance is equal to another.
 boolean equals(Object other)
          Determine whether this instance is equal to another.
 InetAddress getInetAddress()
          Get the IP address of this principal.
 String getName()
          Get the name of this principal; it will be the string representation of the IP address.
 int hashCode()
          Get the hash code for this instance.
 String toString()
          Get a human-readable representation of this principal.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

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.

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

JBoss Remoting 3 3.2.0.Beta2-redhat-1

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.