|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface SessionContext
This interface defines an abstract session context that is associated with a session-identifier and provides features like setting variables and removing or expiring variables of session scope.
| Method Summary | |
|---|---|
java.lang.String |
getId()
This method returns an unique identifier that serves as a key to this session. |
java.lang.String |
getVariable(java.lang.String name)
This method returns the string-value of the variable given by name. |
java.util.Set<java.lang.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(java.lang.String var,
int count)
This method will increment the count of the variable var by the
amount of count. |
void |
removeVariable(java.lang.String name)
This method shall remove the variable with the given name from the session-context. |
void |
setVariable(java.lang.String name,
java.lang.String value,
java.util.Date expires)
This method creates a new variable with the given name and initializes it to the value provided by value. |
| Method Detail |
|---|
java.lang.String getId()
java.util.Set<java.lang.String> getVariableNames()
java.lang.String getVariable(java.lang.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(java.lang.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(java.lang.String name,
java.lang.String value,
java.util.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(java.lang.String name)
name -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||