AUTHENTICITY_KEY, ID_KEY, TIMESTAMP_KEY
Constructor and Description |
---|
SessionImpl(Crypto crypto,
CookieEncryption encryption,
NinjaProperties ninjaProperties) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all values from the session.
|
String |
get(String key)
Returns the value of the key or null.
|
String |
getAuthenticityToken() |
Map<String,String> |
getData() |
String |
getId() |
void |
init(Context context)
Has to be called initially.
|
boolean |
isEmpty()
Returns true if the session is empty, e.g.
|
void |
put(String key,
String value)
Puts key / value into the session.
|
String |
remove(String key)
Removes the value of the key and returns the value or null.
|
void |
save(Context context,
Result result)
To finally send this session to the user this method has to be called.
|
@Inject public SessionImpl(Crypto crypto, CookieEncryption encryption, NinjaProperties ninjaProperties)
public void init(Context context)
Session
public String getAuthenticityToken()
getAuthenticityToken
in interface Session
public void save(Context context, Result result)
Session
public void put(String key, String value)
Session
public String get(String key)
Session
public String remove(String key)
Session
public void clear()
Session
public boolean isEmpty()
Session
Copyright © 2015 ninjaframework. All Rights Reserved.