org.jboss.security
Class CallerIdentity

java.lang.Object
  extended byorg.jboss.security.SimplePrincipal (src) 
      extended byorg.jboss.security.CallerIdentity
All Implemented Interfaces:
java.security.Principal, java.io.Serializable
Direct Known Subclasses:
RunAsIdentity (src)

public class CallerIdentity
extends SimplePrincipal (src)

The CallerIdentity is a principal that may have a credential.

See Also:
Serialized Form

Constructor Summary
CallerIdentity(java.lang.String principal, java.lang.Object credential)
          Construct an unmutable instance of a CallerIdentity
 
Method Summary
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 java.lang.Object getCredential()
           
 int hashCode()
          Returns a hash code value for the object.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class org.jboss.security.SimplePrincipal (src)
getName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CallerIdentity

public CallerIdentity(java.lang.String principal,
                      java.lang.Object credential)
Construct an unmutable instance of a CallerIdentity

Method Detail

getCredential

public java.lang.Object getCredential()

toString

public java.lang.String toString()
Returns a string representation of the object.

Specified by:
toString in interface java.security.Principal
Overrides:
toString in class SimplePrincipal (src)
Returns:
a string representation of the object.

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.

Specified by:
equals in interface java.security.Principal
Overrides:
equals in class SimplePrincipal (src)
Returns:
true if name equals another.getName();

hashCode

public int hashCode()
Returns a hash code value for the object.

Specified by:
hashCode in interface java.security.Principal
Overrides:
hashCode in class SimplePrincipal (src)