Class PofPrincipal

All Implemented Interfaces:
PofConstants, Principal

public class PofPrincipal extends PofHelper implements Principal
Generic Principal implementation that can be used to represent the identity of any remote entity.
Author:
jh 2008.08.11
See Also:
  • Field Details

    • m_sName

      protected String m_sName
      The name of the identity represented by this Principal.
  • Constructor Details

    • PofPrincipal

      public PofPrincipal(String sName)
      Create a new PortablePrincipal with the given name.
      Parameters:
      sName - the name of the identity represented by this PortablePrincipal
  • Method Details

    • getName

      public String getName()
      Return the name of this Principal.
      Specified by:
      getName in interface Principal
      Returns:
      the name of this Principal
    • equals

      public boolean equals(Object o)
      Compares this Principal to the specified object.
      Specified by:
      equals in interface Principal
      Overrides:
      equals in class Object
      Parameters:
      o - a Principal to compare with
      Returns:
      true if the Principal passed in is the same as that encapsulated by this Principal, and false otherwise
    • toString

      public String toString()
      Return a string representation of this Principal.
      Specified by:
      toString in interface Principal
      Overrides:
      toString in class Object
      Returns:
      a string representation of this Principal
    • hashCode

      public int hashCode()
      Return a hashcode for this Principal.
      Specified by:
      hashCode in interface Principal
      Overrides:
      hashCode in class Object
      Returns:
      a hashcode for this Principal