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 mutableJsonObjectrepresenting 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.voidSets the session as "not valid anymore".booleanisDirty()Was the session modified since it was loaded?booleanHas the session been invalidated?booleanisNew()Returnstrueif the session has been created in the current request.voidsetDirty()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()Returnstrueif the session has been created in the current request. -
getAttributes
JsonObject getAttributes()Returns a mutableJsonObjectrepresenting 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?
-