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.
    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
    Was the session modified since it was loaded?
    boolean
    Has the session been invalidated?
    boolean
    Returns true if the session has been created in the current request.
    void
    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?