Class ServletSessionDao
java.lang.Object
se.swedenconnect.bankid.idp.authn.session.ServletSessionDao
- All Implemented Interfaces:
SessionDao
Implements the
SessionDao
interface using the session extracted from the HttpServletRequest
.
If using Spring session the session objects will be distributed.- Author:
- Martin Lindström, Felix Hellman
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
Reads the object identified bykey
of typetClass
.void
Removes the object identified bykey
.void
Writes objectvalue
under the keykey
.
-
Constructor Details
-
ServletSessionDao
public ServletSessionDao()
-
-
Method Details
-
write
Writes objectvalue
under the keykey
.- Specified by:
write
in interfaceSessionDao
- Parameters:
key
- the object keyvalue
- the objectrequest
- the HTTP servlet request
-
read
Reads the object identified bykey
of typetClass
.- Specified by:
read
in interfaceSessionDao
- Type Parameters:
T
- the type- Parameters:
key
- the object keytClass
- the type of the object to readrequest
- the HTTP servlet request- Returns:
- the object, or
null
if none is available
-
remove
Removes the object identified bykey
.- Specified by:
remove
in interfaceSessionDao
- Parameters:
key
- the object keyrequest
- the HTTP servlet request
-