FileDocCategorySizeDatePackage
AppservRealm.javaAPI DocGlassfish v2 API6080Fri May 04 22:32:54 BST 2007com.sun.appserv.security

AppservRealm

public abstract class AppservRealm extends Realm
Parent class for iAS Realm classes.

This class provides default implementation for most of the abstract methods in com.sun.enterprise.security.auth.realm.Realm. Since most of these abstract methods are not supported by Realms there is no need for the subclasses to implement them. The default implementations provided here generally throw an exception if invoked.

author
Harpreet Singh

Fields Summary
public static final String
JAAS_CONTEXT_PARAM
protected static final Logger
_logger
protected static final com.sun.enterprise.util.i18n.StringManager
sm
Constructors Summary
Methods Summary
public AuthenticationHandlergetAuthenticationHandler()
Returns an AuthenticationHandler object which can be used to authenticate within this realm.

This method return null always, since AuthenticationHandlers are generally not supported by iAS realms. Subclass can override if necessary.

return
An AuthenticationHandler object for this realm (always null)


    
                                                   
      
    
        _logger.warning("iasrealm.noauth");
        return null;
    
public java.util.EnumerationgetGroupNames()
Returns names of all the groups in this particular realm.

This method always throws a BadRealmException since by default this operation is not supported. Subclasses which support this method can override.

return
enumeration of group names (strings)
exception
com.sun.enterprise.security.auth.realm.BadRealmException if realm data structures are bad

        String msg = sm.getString("iasrealm.notsupported");
        throw new BadRealmException(msg);
    
public UsergetUser(java.lang.String name)
Returns the information recorded about a particular named user.

This method always throws a BadRealmException since by default this operation is not supported. Subclasses which support this method can override.

param
name name of the user whose information is desired
return
the user object
exception
com.sun.enterprise.security.auth.realm.NoSuchUserException if the user doesn't exist
exception
com.sun.enterprise.security.auth.realm.BadRealmException if realm data structures are bad

        String msg = sm.getString("iasrealm.notsupported");
        throw new BadRealmException(msg);
    
public java.util.EnumerationgetUserNames()
Returns names of all the users in this particular realm.

This method always throws a BadRealmException since by default this operation is not supported. Subclasses which support this method can override.

return
enumeration of user names (strings)
exception
com.sun.enterprise.security.auth.realm.BadRealmException if realm data structures are bad

        String msg = sm.getString("iasrealm.notsupported");
        throw new BadRealmException(msg);
    
public voidrefresh()
Refreshes the realm data so that new users/groups are visible.

This method always throws a BadRealmException since by default this operation is not supported. Subclasses which support this method can override.

exception
com.sun.enterprise.security.auth.realm.BadRealmException if realm data structures are bad

        String msg = sm.getString("iasrealm.notsupported");
        throw new BadRealmException(msg);