Methods Summary |
---|
private static LoginInfoStore | getCustomStore(java.lang.String icn)
final Class ic = Class.forName(icn);
final String in = LoginInfoStore.class.getName();
if (ic == null || !isStore(ic))
throw new IllegalArgumentException("Class: " + ic.getName() + " does not implement: " + in);
final LoginInfoStore store = (LoginInfoStore) ic.newInstance();
return ( store );
|
private static LoginInfoStore | getDefaultStore()
return ( new MemoryHashLoginInfoStore() );
|
public static LoginInfoStore | getStore(java.lang.String storeImplClassName)Returns the store that is represented by given class name. The parameter must
implement the {@link LoginInfoStore} interface. If a null is passed, an instance of the default
store {@link MemoryHashLoginInfoStore} is returned.
LoginInfoStore store = null;
if (storeImplClassName == null)
store = getDefaultStore();
else
store = getCustomStore(storeImplClassName);
return ( store );
|
private static boolean | isStore(java.lang.Class c)
final Class[] ifs = c.getInterfaces();
final Class sc = LoginInfoStore.class;
return ( Arrays.asList(ifs).contains(sc) );
|