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

## com.sun.appserv.security
Class AppservRealm

    java.lang.Object
      com.sun.enterprise.security.auth.realm.Realm
          com.sun.appserv.security.AppservRealm

All Implemented Interfaces:
  java.lang.Comparable

public abstract class AppservRealm
extends com.sun.enterprise.security.auth.realm.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

Field Summary
`protected static java.util.logging.Logger` | `_logger`
`static java.lang.String` | `JAAS_CONTEXT_PARAM`
`protected static com.sun.enterprise.util.i18n.StringManager` | `sm`

Constructor Summary
`AppservRealm()`

Method Summary
`com.sun.enterprise.security.auth.realm.AuthenticationHandler` | `getAuthenticationHandler()` Returns an AuthenticationHandler object which can be used to authenticate within this realm.
`java.util.Enumeration` | `getGroupNames()` Returns names of all the groups in this particular realm.
`com.sun.enterprise.security.auth.realm.User` | `getUser(java.lang.String name)` Returns the information recorded about a particular named user.
`java.util.Enumeration` | `getUserNames()` Returns names of all the users in this particular realm.
`void` | `refresh()` Refreshes the realm data so that new users/groups are visible.

Methods inherited from class com.sun.enterprise.security.auth.realm.Realm
`compareTo, getAuthType, getDefaultInstance, getDefaultRealm, getGroupNames, getInstance, getJAASContext, getName, getProperties, getProperty, getRealmNames, init, instantiate, instantiate, isValidRealm, setDefaultRealm, setName, setProperty, toString, updateInstance`

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

Field Detail

### JAAS_CONTEXT_PARAM

    public static final java.lang.String JAAS_CONTEXT_PARAM

See Also:
  Constant Field Values

### _logger

    protected static java.util.logging.Logger _logger

### sm

    protected static com.sun.enterprise.util.i18n.StringManager sm

Constructor Detail

### AppservRealm

    public AppservRealm()

Method Detail

### getAuthenticationHandler

    public com.sun.enterprise.security.auth.realm.AuthenticationHandler getAuthenticationHandler()

  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.

  Returns:
    An AuthenticationHandler object for this realm (always null)

### getUserNames

    public java.util.Enumeration getUserNames()
                                       throws com.sun.enterprise.security.auth.realm.BadRealmException

  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.

  Returns:
    enumeration of user names (strings)
  Throws:
    `com.sun.enterprise.security.auth.realm.BadRealmException` - if realm data structures are bad

### getUser

    public com.sun.enterprise.security.auth.realm.User getUser(java.lang.String name)
                                                        throws com.sun.enterprise.security.auth.realm.NoSuchUserException,
                                                               com.sun.enterprise.security.auth.realm.BadRealmException

  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.

  Parameters:
    `name` - name of the user whose information is desired
  Returns:
    the user object
  Throws:
    `com.sun.enterprise.security.auth.realm.NoSuchUserException` - if the user doesn't exist
    `com.sun.enterprise.security.auth.realm.BadRealmException` - if realm data structures are bad

### getGroupNames

    public java.util.Enumeration getGroupNames()
                                        throws com.sun.enterprise.security.auth.realm.BadRealmException

  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.

  Returns:
    enumeration of group names (strings)
  Throws:
    `com.sun.enterprise.security.auth.realm.BadRealmException` - if realm data structures are bad

### refresh

    public void refresh()
                 throws com.sun.enterprise.security.auth.realm.BadRealmException

  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.

  Throws:
    `com.sun.enterprise.security.auth.realm.BadRealmException` - if realm data structures are bad

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

Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.