const mixinafBedSheet::HttpSession
afBedSheet::HttpSession
(Service) - An injectable const version of WebSession.
This class is proxied and will always refer to the session in the current web request.
- containsKey
- virtual Bool containsKey(Str key)- Returns - trueif the session map contains the given key.- Does not create a session if it does not already exist. 
- delete
- abstract Void delete()- Delete this web session which clears both the user agent cookie and the server side session instance. This method must be called before the WebRes is committed otherwise the server side instance is cleared, but the user agent cookie will remain uncleared. - Does not create a session if it does not already exist. - @see web::WebSession 
- exists
- abstract Bool exists()- Returns - trueif a session exists.- Does not create a session if it does not already exist. 
- get
- @Operator
 Obj? get(Str name, Obj? def := null)- Convenience for - map.get(name, def).- Does not create a session if it does not already exist. - @see web::WebSession 
- getOrAdd
- abstract Obj? getOrAdd(Str key, |Str->Obj? valFunc)- Convenience for - map.getOrAdd(name, valFunc).- Calling this will create a session if it doesn't already exist. 
- id
- abstract Str id()- Get the unique id used to identify this session. - Calling this will create a session if it doesn't already exist. - @see web::WebSession 
- isEmpty
- virtual Bool isEmpty()- Returns - trueif the session map is empty.- Does not create a session if it does not already exist. 
- map
- Application name/value pairs which are persisted between HTTP requests. The values stored in this map must be serializable. - Calling this will create a session if it doesn't already exist. - The returned map is READ ONLY. Use the methods on this class to write to the session. This is so we can fail fast (before a response is sent to the user) should a value not be serializable. - @see web::WebSession 
- remove
- abstract Void remove(Str name)- Convenience for - map.remove(name).- Does not create a session if it does not already exist. 
- set
- @Operator
 abstract Void set(Str name, Obj? val)- Convenience for - map.set(name, val).- Calling this will create a session if it doesn't already exist. - @see web::WebSession