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 TypeMethodDescriptionReturns a mutableJsonObject
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()
Returnstrue
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()Returnstrue
if the session has been created in the current request. -
getAttributes
JsonObject getAttributes()Returns a mutableJsonObject
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?
-