SerializablePrincipal (Tomcat API Documentation)
Keywords: org.apache.catalina.cluster.session.SerializablePrincipal class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.catalina.cluster.session
Class SerializablePrincipal

    java.lang.Object
      org.apache.catalina.cluster.session.SerializablePrincipal

All Implemented Interfaces:
  java.io.Serializable

public class SerializablePrincipal
extends java.lang.Object
implements java.io.Serializable

See Also:
  Serialized Form

Field Summary
`protected java.lang.String` | `name` The username of the user represented by this Principal.
`protected java.lang.String` | `password` The authentication credentials for the user represented by this Principal.
`protected Realm` | `realm` The Realm with which this Principal is associated.
`protected java.lang.String[]` | `roles` The set of roles associated with this user.

Constructor Summary
`SerializablePrincipal()`
`SerializablePrincipal(Realm realm, java.lang.String name, java.lang.String password)` Construct a new Principal, associated with the specified Realm, for the specified username and password.
`SerializablePrincipal(Realm realm, java.lang.String name, java.lang.String password, java.util.List roles)` Construct a new Principal, associated with the specified Realm, for the specified username and password, with the specified role names (as Strings).

Method Summary
`static SerializablePrincipal` | `createPrincipal(GenericPrincipal principal)`
`java.lang.String` | `getName()`
`java.lang.String` | `getPassword()`
`GenericPrincipal` | `getPrincipal(Realm realm)`
`Realm` | `getRealm()`
`java.lang.String[]` | `getRoles()`
`static GenericPrincipal` | `readPrincipal(java.io.ObjectInputStream in, Realm realm)`
`void` | `setRealm(Realm realm)`
`java.lang.String` | `toString()` Return a String representation of this object, which exposes only information that should be public.
`static void` | `writePrincipal(GenericPrincipal p, java.io.ObjectOutputStream out)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### name

    protected java.lang.String name

  The username of the user represented by this Principal.

### password

    protected java.lang.String password

  The authentication credentials for the user represented by this Principal.

### realm

    protected transient Realm realm

  The Realm with which this Principal is associated.

### roles

    protected java.lang.String[] roles

  The set of roles associated with this user.

Constructor Detail

### SerializablePrincipal

    public SerializablePrincipal()

### SerializablePrincipal

    public SerializablePrincipal(Realm realm,
                                 java.lang.String name,
                                 java.lang.String password)

  Construct a new Principal, associated with the specified Realm, for the specified username and password.

Parameters:
  `realm` - The Realm that owns this Principal
  `name` - The username of the user represented by this Principal
  `password` - Credentials used to authenticate this user

### SerializablePrincipal

    public SerializablePrincipal(Realm realm,
                                 java.lang.String name,
                                 java.lang.String password,
                                 java.util.List roles)

  Construct a new Principal, associated with the specified Realm, for the specified username and password, with the specified role names (as Strings).

Parameters:
  `realm` - The Realm that owns this principal
  `name` - The username of the user represented by this Principal
  `password` - Credentials used to authenticate this user
  `roles` - List of roles (must be Strings) possessed by this user

Method Detail

### getName

    public java.lang.String getName()

### getPassword

    public java.lang.String getPassword()

### getRealm

    public Realm getRealm()

### setRealm

    public void setRealm(Realm realm)

### getRoles

    public java.lang.String[] getRoles()

### toString

    public java.lang.String toString()

  Return a String representation of this object, which exposes only information that should be public.

### createPrincipal

    public static SerializablePrincipal createPrincipal(GenericPrincipal principal)

### getPrincipal

    public GenericPrincipal getPrincipal(Realm realm)

### readPrincipal

    public static GenericPrincipal readPrincipal(java.io.ObjectInputStream in,
                                                 Realm realm)
                                          throws java.io.IOException

  Throws:
    `java.io.IOException`

### writePrincipal

    public static void writePrincipal(GenericPrincipal p,
                                      java.io.ObjectOutputStream out)
                               throws java.io.IOException

  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.