public.javadoc.org.spincast.plugins.session.SpincastSession.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
SpincastSession (org.spincast:spincast-framework 2.1.1 API)
Package org.spincast.plugins.session
Interface SpincastSession
- All Known Implementing Classes:
SpincastSessionDefault
public interface SpincastSession
The object representing the Session of a visitor.
-
Method Summary
Modifier and Type
Method
Description
Returns a mutable JsonObject
representing the
attributes of the session.
The Instant at which the session was created.
getId()
The unique id of this session.
The Instant at which the session was modified
for the last time.
void
Sets the session as "not valid anymore".
boolean
isDirty()
Was the session modified since it was loaded?
boolean
Has the session been invalidated?
boolean
isNew()
Returns true
if the session
has been created in the current request.
void
setDirty()
This allows you to flag a session as being
dirty, even if its attributes don't change.
-
Method Details
-
getId
String getId()
The unique id of this session.
-
isNew
boolean isNew()
Returns true
if the session
has been created in the current request.
-
getAttributes
JsonObject getAttributes()
Returns a mutable JsonObject
representing the
attributes of the session. You can use this object
to get/retrieve/delete attributes.
-
getCreationDate
Instant getCreationDate()
The Instant at which the session was created.
-
getModificationDate
Instant getModificationDate()
The Instant at which the session was modified
for the last time.
-
isDirty
boolean isDirty()
Was the session modified since it was loaded?
-
setDirty
void setDirty()
This allows you to flag a session as being
dirty, even if its attributes don't change.
This will force the session to be saved in
the database.
-
invalidate
void invalidate()
Sets the session as "not valid anymore".
-
isInvalidated
boolean isInvalidated()
Has the session been invalidated?