public class Session extends Object
| Constructor and Description |
|---|
Session() |
Session(Map<String,String> values,
String authenticityToken,
LocalDateTime expires) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the complete session
|
String |
get(String key)
Retrieves a specific value from the session
|
String |
getAuthenticityToken() |
LocalDateTime |
getExpires() |
Map<String,String> |
getValues() |
boolean |
hasChanges() |
boolean |
hasContent()
Checks if the session has at least one entry
|
void |
put(String key,
String value)
Adds a value to the session, overwriting an existing value
|
void |
remove(String key)
Removes a value with a given key from the session
|
public Session()
public Session(Map<String,String> values, String authenticityToken, LocalDateTime expires)
public boolean hasContent()
public String get(String key)
key - The keypublic LocalDateTime getExpires()
public void put(String key, String value)
key - The key to store the valuevalue - The value to storepublic void remove(String key)
key - The key to removepublic void clear()
public boolean hasChanges()
public String getAuthenticityToken()
Copyright © 2016. All rights reserved.