public interface SessionContext
| Modifier and Type | Method and Description |
|---|---|
String |
getId()
This method returns an unique identifier that serves as a key to this session.
|
String |
getVariable(String name)
This method returns the string-value of the variable given by
name. |
Set<String> |
getVariableNames()
This method returns a set of variable names (strings) that are set within the session scope
and did not expire yet.
|
void |
increment(String var,
int count)
This method will increment the count of the variable
var by the
amount of count. |
void |
removeVariable(String name)
This method shall remove the variable with the given name from the session-context.
|
void |
setVariable(String name,
String value,
Date expires)
This method creates a new variable with the given name and initializes it to the
value provided by
value. |
String getId()
Set<String> getVariableNames()
String getVariable(String name)
name. If no such
variable exists within this session, null is returned.name - name or null if the
variable does not exist.void increment(String var, int count)
var by the
amount of count. If the variable is a non-numeric one, calling this
method will have no effect.var - count - void setVariable(String name, String value, Date expires)
value. The variable will expire at the given date or
as the session itself expires.
By providing a null value for the date, the variable will be set to
expire at the sessions end.name - value - expires - void removeVariable(String name)
name - Copyright © 2014 jwall.org. All Rights Reserved.