Class w3c.jigsaw.auth.AuthRealm
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.auth.AuthRealm

java.lang.Object
   |
   +----w3c.jigsaw.resources.AttributeHolder
           |
           +----w3c.jigsaw.resources.Resource
                   |
                   +----w3c.jigsaw.auth.AuthRealm

public class AuthRealm
extends Resource
implements ResourceStoreHolder

Variable Index

 o ATTR_REPOSITORY
Attribute index - The repository for the realm.
 o ATTR_SERVER
The server we are attached to.
 o store
Our user store.

Constructor Index

 o AuthRealm()

Method Index

 o acquireStore()
Acquire and load the users store.
 o enumerateUserNames()
Enumerate this realm user's name.
 o getRepository()
Get our repository.
 o getServer()
Get our attached server.
 o loadUser(String)
Load the user having this name.
 o makeRealm(String, File)
create a new empty realm.
 o notifyStoreShutdown(ResourceStore)
The resource store asks us to shutdown our associated store.
 o notifyStoreStabilize(ResourceStore)
ResourceStoreHolder implementation - Save our store.
 o notifyStoreUnload(ResourceStore)
ResourceStoreHolder implementation - Unload the store.
 o registerUser(AuthUser)
register this new user in the realm.
 o save()
Save our store.
 o unregisterUser(String)
Unregister a user from the realm.

Variables

 o ATTR_SERVER
  protected static int ATTR_SERVER
The server we are attached to.
 o ATTR_REPOSITORY
  protected static int ATTR_REPOSITORY
Attribute index - The repository for the realm.
 o store
  protected ResourceStore store
Our user store.

Constructors

 o AuthRealm
  public AuthRealm()

Methods

 o acquireStore
  protected synchronized void acquireStore()
Acquire and load the users store. Should only be called from a synchronized method.
 o getRepository
  public File getRepository()
Get our repository.
 o getServer
  public httpd getServer()
Get our attached server.
 o loadUser
  public synchronized AuthUser loadUser(String name)
Load the user having this name.
Parameters:
name - The user's name.
Returns:
An instance of AuthUser or null if not found.
 o registerUser
  public synchronized void registerUser(AuthUser user)
register this new user in the realm.
Parameters:
user - The new user.
 o unregisterUser
  public synchronized void unregisterUser(String name)
Unregister a user from the realm.
Parameters:
name - The user's name.
 o enumerateUserNames
  public synchronized Enumeration enumerateUserNames()
Enumerate this realm user's name.
 o makeRealm
  public static AuthRealm makeRealm(String name,
                                    File repository)
create a new empty realm.
Parameters:
name - The name of the realm.
repository - The file to use to store the realm database.
 o save
  public synchronized void save()
Save our store.
 o notifyStoreUnload
  public synchronized boolean notifyStoreUnload(ResourceStore st)
ResourceStoreHolder implementation - Unload the store.
Parameters:
st - The store to unload.
Returns:
A boolean true if store was successfully unloaded.
 o notifyStoreShutdown
  public void notifyStoreShutdown(ResourceStore st)
The resource store asks us to shutdown our associated store.
Parameters:
st - The store to shutdown.
 o notifyStoreStabilize
  public boolean notifyStoreStabilize(ResourceStore st)
ResourceStoreHolder implementation - Save our store.
Parameters:
st - The store to be saved.
Returns:
A boolean true if saving the store is now not modified.

All Packages  Class Hierarchy  This Package  Previous  Next  Index