org.openmdx.kernel.security.authentication.spi
Class GenericPrincipal

java.lang.Object
  extended by org.openmdx.kernel.security.authentication.spi.GenericPrincipal
All Implemented Interfaces:
Externalizable, Serializable, Principal

public final class GenericPrincipal
extends Object
implements Externalizable, Principal

Generic Principal

See Also:
Serialized Form

Constructor Summary
GenericPrincipal()
          Implements Externalizable
GenericPrincipal(String type, String identity, String name)
          Constructor
 
Method Summary
 boolean equals(Object object)
           
 String getIdentity()
          Retrieve the identity.
 String getName()
           
 String getType()
          Get the principal's type
 int hashCode()
           
 void readExternal(ObjectInput in)
           
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenericPrincipal

public GenericPrincipal()
Implements Externalizable


GenericPrincipal

public GenericPrincipal(String type,
                        String identity,
                        String name)
Constructor

Parameters:
type - the principal's class name
identity - the principal's identity
name - the principal's name
NullPointerException - if any of the arguments is null
Method Detail

getType

public String getType()
Get the principal's type

Returns:
the principal's class name

getIdentity

public String getIdentity()
Retrieve the identity.

Returns:
the identity's value

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

getName

public String getName()
Specified by:
getName in interface Principal

toString

public String toString()
Specified by:
toString in interface Principal
Overrides:
toString in class Object

equals

public boolean equals(Object object)
Specified by:
equals in interface Principal
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Principal
Overrides:
hashCode in class Object


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.