|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.uwyn.rife.database.DbQueryManager
com.uwyn.rife.authentication.sessionmanagers.DatabaseSessions
public abstract class DatabaseSessions
| Constructor Summary | |
|---|---|
protected |
DatabaseSessions(Datasource datasource)
|
| Method Summary | |
|---|---|
boolean |
_continueSession(Update continueSession,
String authId)
|
protected long |
_countSessions(Select countSessions)
|
protected void |
_eraseAllSessions(Delete eraseAllSessions)
|
protected boolean |
_eraseSession(Delete eraseSession,
String authId)
|
protected boolean |
_eraseUserSessions(Delete eraseUserSessions,
long userId)
|
protected long |
_getSessionUserId(Select getSessionUserId,
String authId)
|
protected boolean |
_install(CreateTable createAuthentication,
String createAuthenticationSessStartIndex)
|
protected boolean |
_isSessionValid(Select sessionValidity,
Select sessionValidityRestrictHostIp,
String authId,
String hostIp)
|
protected boolean |
_listSessions(Select listSessions,
ListSessions processor)
|
protected void |
_purgeSessions(Delete purgeSession)
|
protected boolean |
_remove(DropTable removeAuthentication,
String removeAuthenticationSessStartIndex)
|
protected String |
_startSession(Insert startSession,
long userId,
String hostIp,
boolean remembered)
|
protected boolean |
_wasRemembered(Select wasRemembered,
String authId)
|
abstract long |
countSessions()
Counts the number of active sessions. |
boolean |
getRestrictHostIp()
Obtains the restriction policy of the authentication ID with regards to the user's host IP. |
long |
getSessionDuration()
Obtains the maximum time that a user can stay inactive before an active session becomes invalid. |
abstract boolean |
install()
|
abstract boolean |
remove()
|
void |
setRestrictHostIp(boolean flag)
Sets the restriction policy of the authentication ID with regards to the user's host IP. |
void |
setSessionDuration(long milliseconds)
Sets the maximum time that a user can stay inactive before an active session becomes invalid. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.uwyn.rife.authentication.SessionManager |
|---|
continueSession, eraseAllSessions, eraseSession, eraseUserSessions, getSessionUserId, isSessionValid, listSessions, purgeSessions, startSession, wasRemembered |
| Constructor Detail |
|---|
protected DatabaseSessions(Datasource datasource)
| Method Detail |
|---|
public long getSessionDuration()
SessionManager
getSessionDuration in interface SessionManagerpublic void setSessionDuration(long milliseconds)
SessionManager
setSessionDuration in interface SessionManagermilliseconds - The maximum time of inactivity in milliseconds.public boolean getRestrictHostIp()
SessionManagerThe default is false, or no restriction.
getRestrictHostIp in interface SessionManagertrue if the authentication is restricted to one host IP; or
false if the authentication ID can be used with any host IP
public void setRestrictHostIp(boolean flag)
SessionManagerThe default is false, or no restriction.
setRestrictHostIp in interface SessionManagerflag - true to activate the host IP restriction; or
false otherwise
public abstract boolean install()
throws SessionManagerException
SessionManagerException
public abstract boolean remove()
throws SessionManagerException
SessionManagerException
public abstract long countSessions()
throws SessionManagerException
SessionManager
countSessions in interface SessionManagerSessionManagerException - An undefined number of exceptional
cases or error situations can occur when a session is counted. They are
all indicated by throwing an instance of
SessionManagerException. It's up to the implementations of
this interface to give more specific meanings to these exceptions.
protected boolean _install(CreateTable createAuthentication,
String createAuthenticationSessStartIndex)
protected boolean _remove(DropTable removeAuthentication,
String removeAuthenticationSessStartIndex)
protected void _purgeSessions(Delete purgeSession)
throws SessionManagerException
SessionManagerException
protected String _startSession(Insert startSession,
long userId,
String hostIp,
boolean remembered)
throws SessionManagerException
SessionManagerException
protected boolean _isSessionValid(Select sessionValidity,
Select sessionValidityRestrictHostIp,
String authId,
String hostIp)
throws SessionManagerException
SessionManagerException
public boolean _continueSession(Update continueSession,
String authId)
throws SessionManagerException
SessionManagerException
protected boolean _eraseSession(Delete eraseSession,
String authId)
throws SessionManagerException
SessionManagerException
protected boolean _wasRemembered(Select wasRemembered,
String authId)
throws SessionManagerException
SessionManagerException
protected boolean _eraseUserSessions(Delete eraseUserSessions,
long userId)
throws SessionManagerException
SessionManagerException
protected void _eraseAllSessions(Delete eraseAllSessions)
throws SessionManagerException
SessionManagerException
protected long _countSessions(Select countSessions)
throws SessionManagerException
SessionManagerException
protected long _getSessionUserId(Select getSessionUserId,
String authId)
throws SessionManagerException
SessionManagerException
protected boolean _listSessions(Select listSessions,
ListSessions processor)
throws SessionManagerException
SessionManagerException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||