public class AuthBeanMultiplexer
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.sql.Array |
authenticate(java.lang.String database,
java.lang.String user,
java.lang.String password)
HyperSQL Java Function Method.
|
void |
clear()
Clear the set of AuthFunctionBeans
|
static AuthBeanMultiplexer |
getSingleton() |
void |
setAuthFunctionBean(java.sql.Connection c,
AuthFunctionBean authFunctionBean)
Exactly the same as setAuthFunctionBeans(String, List) other than taking
an open Connection to identify the database.
|
void |
setAuthFunctionBean(java.lang.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(java.sql.Connection c,
java.util.List<AuthFunctionBean> authFunctionBeans)
Wrapper for
setAuthFunctionBeans(String, List<AuthFunctionBean>) |
void |
setAuthFunctionBeans(java.util.Map<java.lang.String,java.util.List<AuthFunctionBean>> authFunctionBeanMap)
Primary purpose of this class is to manage this static map.
|
void |
setAuthFunctionBeans(java.lang.String dbName,
java.util.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.
|
public static AuthBeanMultiplexer getSingleton()
public void clear()
public void setAuthFunctionBeans(java.util.Map<java.lang.String,java.util.List<AuthFunctionBean>> authFunctionBeanMap)
The given entries are copied, to limit side-effects and concurrency issues.
public void setAuthFunctionBeans(java.sql.Connection c, java.util.List<AuthFunctionBean> authFunctionBeans) throws java.sql.SQLException
setAuthFunctionBeans(String, List<AuthFunctionBean>)
c
- An open Connection to the desired database.java.sql.SQLException
- if failed to obtain unique name from given
Connection.public void setAuthFunctionBeans(java.lang.String dbName, java.util.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.
public void setAuthFunctionBean(java.sql.Connection c, AuthFunctionBean authFunctionBean) throws java.sql.SQLException
java.sql.SQLException
public void setAuthFunctionBean(java.lang.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 java.sql.Array authenticate(java.lang.String database, java.lang.String user, java.lang.String password) throws java.lang.Exception
Registered AuthFunctionBeans matching the specified database and password will be tried in order.
java.lang.IllegalArgumentException
- if no AuthFunctionBean has been set for
specified dbName.java.lang.RuntimeException
- if all matching AuthFunctionBeans threw
RuntimeExceptions. (This indicates that no matching
AuthFunctionBean functioned properly, not that authentication was
purposefully denied by any AuthFunctionBean).java.lang.Exception
- (non-runtime). A matching AuthFunctionBean threw this
Exception.Copyright © 2001 - 2018 HSQL Development Group.