Interface Session
-
- All Known Implementing Classes:
DefaultSession
,MockSession
,SAPMockSession
public interface Session
Interface for the servicelayer session.- Since:
- 4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> java.util.Map<java.lang.String,T>
getAllAttributes()
<T> T
getAttribute(java.lang.String name)
Returns for the given session attribute name the valuejava.lang.String
getSessionId()
void
removeAttribute(java.lang.String name)
Removes the given attribute from the current session.void
setAttribute(java.lang.String name, java.lang.Object value)
Sets the given value Object to the Session as attribute with the given name
-
-
-
Method Detail
-
setAttribute
void setAttribute(java.lang.String name, java.lang.Object value)
Sets the given value Object to the Session as attribute with the given name- Parameters:
name
- the name of the attributevalue
- the value to be set
-
getAttribute
<T> T getAttribute(java.lang.String name)
Returns for the given session attribute name the value- Parameters:
name
- the attribute name- Returns:
null
if no attribute with the given name is stored in the session
-
getAllAttributes
<T> java.util.Map<java.lang.String,T> getAllAttributes()
- Returns:
- a Map with all session attributes
-
getSessionId
java.lang.String getSessionId()
- Returns:
- the id of the session
-
removeAttribute
void removeAttribute(java.lang.String name)
Removes the given attribute from the current session. Do nothing if the attribute doesn't exists in the session.- Parameters:
name
- the attribute name
-
-