|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hsqldb.auth.AuthBeanMultiplexer
public class AuthBeanMultiplexer
This class provides a method which can be used directly as a HyperSQL static Java function method. Manages a set of AuthFunctionBean implementations
Method Summary | |
---|---|
static Array |
authenticate(String database,
String user,
String password)
HyperSQL Java Function Method. |
void |
clear()
Clear the set of AuthFunctionBeans |
static AuthBeanMultiplexer |
getSingleton()
|
void |
setAuthFunctionBean(Connection c,
AuthFunctionBean authFunctionBean)
Exactly the same as setAuthFunctionBeans(String, List) other than taking an open Connection to identify the database. |
void |
setAuthFunctionBean(String dbName,
AuthFunctionBean authFunctionBean)
This is not an "adder" function, but a "setter" function for the specified dbName , so do not use this to add to a database's FunctionBeans, but to assign ths single given AuthFunctionBean as the specified database's authenticator. |
void |
setAuthFunctionBeans(Connection c,
List<AuthFunctionBean> authFunctionBeans)
Wrapper for setAuthFunctioNBeans(String, List |
void |
setAuthFunctionBeans(Map<String,List<AuthFunctionBean>> authFunctionBeanMap)
Primary purpose of this class is to manage this static map. |
void |
setAuthFunctionBeans(String dbName,
List<AuthFunctionBean> authFunctionBeans)
This is not an "adder" function, but a "setter" function for the specified dbName , so do not use this to add to a database's FunctionBeans, but to assign the entire list for that database. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static AuthBeanMultiplexer getSingleton()
public void clear()
public void setAuthFunctionBeans(Map<String,List<AuthFunctionBean>> authFunctionBeanMap)
The given entries are copied, to limit side-effects and concurrency issues.
public void setAuthFunctionBeans(Connection c, List<AuthFunctionBean> authFunctionBeans) throws SQLException
c
- An open Connection to the desired database.
SQLException
- if failed to obtain unique name from given
Connection.public void setAuthFunctionBeans(String dbName, List<AuthFunctionBean> authFunctionBeans)
The given entries are copied, to limit side-effects and concurrency issues.
Use this method instead of setAuthFunctionBean(String, AuthFunctionBean) in order to set up multiple authenticators for a single database for redundancy purposes.
setAuthFunctionBeans(Map)
,
setAuthFunctionBean(String, AuthFunctionBean)
public void setAuthFunctionBean(Connection c, AuthFunctionBean authFunctionBean) throws SQLException
SQLException
public void setAuthFunctionBean(String dbName, AuthFunctionBean authFunctionBean)
To set up multiple authenticators for a single database for redundancy purposes, use the method setAuthFunctionBeans(String, List) instead.
setAuthFunctionBeans(String, List)
public static Array authenticate(String database, String user, String password) throws Exception
Registered AuthFunctionBeans matching the specified database and password will be tried in order.
IllegalArgumentException
- if no AuthFunctionBean has been set for
specified dbName.
RuntimeException
- if all matching AuthFunctionBeans threw
RuntimeExceptions. (This indicates that no matching
AuthFunctionBean functioned properly, not that authentication was
purposefully denied by any AuthFunctionBean).
Exception
- (non-runtime). A matching AuthFunctionBean threw this
Exception.User Guide, System Management
chapter, Authentication Settings subsection.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |