@Contract public abstract class Realm extends AbstractStatefulRealm implements Comparable<Realm>
Principal| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
_logger |
static String |
JAAS_CONTEXT_PARAM
Recommended property for keeping JAAS Context of a realm.
|
static String |
RI_DEFAULT |
groupMapper, PARAM_GROUP_MAPPING| Constructor and Description |
|---|
Realm() |
| Modifier and Type | Method and Description |
|---|---|
static Realm |
getDefaultInstance()
Convenience method which returns the Realm object representing the current default realm.
|
static String |
getDefaultRealm()
Returns the name of the default realm.
|
static Realm |
getInstance(String name)
Returns the realm identified by the name which is passed as a parameter.
|
static Realm |
getInstance(String configName,
String name)
Returns the realm identified by the name which is passed as a parameter.
|
static Enumeration<String> |
getRealmNames()
Returns the names of accessible realms.
|
static void |
getRealmStatsProvier() |
static Realm |
instantiate(String name,
String className,
Properties props)
Instantiate a Realm with the given name and properties using the Class name given.
|
static Realm |
instantiate(String name,
String className,
Properties props,
String configName)
Instantiate a Realm with the given name and properties using the Class name given.
|
static boolean |
isValidRealm(String name)
Checks if the given realm name is loaded/valid.
|
static boolean |
isValidRealm(String configName,
String name)
Checks if the given realm name is loaded/valid.
|
static void |
setDefaultRealm(String realmName)
Sets the name of the default realm.
|
static void |
unloadInstance(String realmName)
Remove realm with given name from cache.
|
static void |
unloadInstance(String configName,
String realmName)
Remove realm with given name from cache.
|
protected static void |
updateInstance(Realm realm,
String name)
Replace a Realm instance.
|
protected static void |
updateInstance(String configName,
Realm realm,
String name)
Replace a Realm instance.
|
addAssignGroups, compareTo, getDefaultDigestAlgorithm, getJAASContext, getMappedGroupNames, getName, getProperties, getProperty, init, refresh, setName, setProperty, toStringaddUser, getAuthType, getGroupNames, getGroupNames, getUser, getUserNames, persist, refresh, removeUser, supportsUserManagement, updateUserclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcompareTopublic static final String JAAS_CONTEXT_PARAM
protected static final Logger _logger
public static final String RI_DEFAULT
public static Realm instantiate(String name, String className, Properties props) throws BadRealmException
name - Name of the new realm.className - Java Class name of the realm to create.props - Properties containing values of the Property element from server.xmlBadRealmException - If the requested realm cannot be instantiated.public static Realm instantiate(String name, String className, Properties props, String configName) throws BadRealmException
name - Name of the new realm.className - Java Class name of the realm to create.props - Properties containing values of the Property element from server.xmlconfigName - the config to which this realm belongsBadRealmException - If the requested realm cannot be instantiated.public static Realm getDefaultInstance() throws NoSuchRealmException
NoSuchRealmException - if default realm does not existpublic static String getDefaultRealm()
public static void setDefaultRealm(String realmName)
realmName - Name of realm to set as default.public static Realm getInstance(String name) throws NoSuchRealmException
name - identifies the realmNoSuchRealmException - if the realm is invalidBadRealmException - if realm data structures are badpublic static Realm getInstance(String configName, String name) throws NoSuchRealmException
configName - name - identifies the realmNoSuchRealmException - if the realm is invalidBadRealmException - if realm data structures are badpublic static Enumeration<String> getRealmNames()
public static boolean isValidRealm(String name)
name - name of the realm to check.public static boolean isValidRealm(String configName, String name)
configName - name - name of the realm to check.public static void getRealmStatsProvier()
public static void unloadInstance(String realmName) throws NoSuchRealmException
realmName - NoSuchRealmExceptionpublic static void unloadInstance(String configName, String realmName) throws NoSuchRealmException
configName - realmName - NoSuchRealmExceptionprotected static void updateInstance(Realm realm, String name)
Minimal error checking is done. The realm being replaced must already exist (instantiate() was previously called), the new instance must be fully initialized properly and it must of course be of the same class as the previous instance.
realm - The new realm instance.name - The (previously instantiated) name for this realm.protected static void updateInstance(String configName, Realm realm, String name)
Minimal error checking is done. The realm being replaced must already exist (instantiate() was previously called), the new instance must be fully initialized properly and it must of course be of the same class as the previous instance.
configName - realm - The new realm instance.name - The (previously instantiated) name for this realm.Copyright © 2019. All rights reserved.