public abstract class IniFactorySupport<T> extends AbstractFactory<T>
Factory
implementations that generate their instance(s) based on
Ini
configuration.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_INI_RESOURCE_PATH |
Modifier | Constructor and Description |
---|---|
protected |
IniFactorySupport() |
protected |
IniFactorySupport(Ini ini) |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
createDefaultInstance() |
T |
createInstance()
Creates a new object instance by using a configured INI source.
|
protected abstract T |
createInstance(Ini ini) |
Ini |
getIni() |
static Ini |
loadDefaultClassPathIni()
Returns a new Ini instance created from the default
classpath:shiro.ini file, or null if
the file does not exist. |
protected Ini |
resolveIni()
Tries to resolve the Ini instance to use for configuration.
|
void |
setIni(Ini ini) |
getInstance, isSingleton, setSingleton
public static final String DEFAULT_INI_RESOURCE_PATH
protected IniFactorySupport()
protected IniFactorySupport(Ini ini)
public Ini getIni()
public void setIni(Ini ini)
public static Ini loadDefaultClassPathIni()
classpath:shiro.ini
file, or null
if
the file does not exist.classpath:shiro.ini
file, or null
if
the file does not exist.protected Ini resolveIni()
Ini
instance returned from getIni()
will be returned if it is not null or empty.getIni()
is null
or empty, this implementation will attempt to find and load the
default class path Ini
.null
is returnedpublic T createInstance()
Resolve
the Ini
source to use for configuration.createDefaultInstance()
method.createInstance
in class AbstractFactory<T>
SecurityManager
instance by using a configured INI source.protected abstract T createDefaultInstance()
Copyright © 2004–2019 The Apache Software Foundation. All rights reserved.