public class SpincastSessionDefault extends Object implements SpincastSession
| Constructor and Description |
|---|
SpincastSessionDefault(JsonManager jsonManager,
SpincastSessionManager spincastSessionManager)
Constructor for a *new* session.
|
SpincastSessionDefault(String sessionId,
Instant creationDate,
Instant modificationDate,
JsonObject attributes,
boolean setAsDirty,
boolean isNew,
JsonManager jsonManager,
SpincastSessionManager spincastSessionManager) |
SpincastSessionDefault(String sessionId,
Instant creationDate,
Instant modificationDate,
JsonObject attributes,
boolean setAsDirty,
JsonManager jsonManager,
SpincastSessionManager spincastSessionManager) |
SpincastSessionDefault(String sessionId,
Instant creationDate,
Instant modificationDate,
JsonObject attributes,
JsonManager jsonManager,
SpincastSessionManager spincastSessionManager) |
| Modifier and Type | Method and Description |
|---|---|
JsonObject |
getAttributes()
Returns a mutable
JsonObject representing the
attributes of the session. |
protected String |
getAttributesHash() |
protected String |
getAttributesInitialHash() |
Instant |
getCreationDate()
The Instant at which the session was created.
|
String |
getId()
The unique id of this session.
|
protected JsonManager |
getJsonManager() |
Instant |
getModificationDate()
The Instant at which the session was modified
for the last time.
|
protected SpincastSessionManager |
getSpincastSessionManager() |
void |
invalidate()
Sets the session as "not valid anymore".
|
boolean |
isDirty()
Was the session modified since it was loaded?
|
protected boolean |
isForcedAsDirty() |
boolean |
isInvalidated()
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.
|
public SpincastSessionDefault(JsonManager jsonManager, SpincastSessionManager spincastSessionManager)
public SpincastSessionDefault(String sessionId, Instant creationDate, Instant modificationDate, @Nullable JsonObject attributes, JsonManager jsonManager, SpincastSessionManager spincastSessionManager)
public SpincastSessionDefault(String sessionId, Instant creationDate, Instant modificationDate, @Nullable JsonObject attributes, boolean setAsDirty, JsonManager jsonManager, SpincastSessionManager spincastSessionManager)
public SpincastSessionDefault(String sessionId, Instant creationDate, Instant modificationDate, JsonObject attributes, boolean setAsDirty, boolean isNew, JsonManager jsonManager, SpincastSessionManager spincastSessionManager)
protected JsonManager getJsonManager()
protected SpincastSessionManager getSpincastSessionManager()
protected String getAttributesHash()
protected String getAttributesInitialHash()
protected boolean isForcedAsDirty()
public String getId()
SpincastSessiongetId in interface SpincastSessionpublic boolean isNew()
SpincastSessiontrue if the session
has been created in the current request.isNew in interface SpincastSessionpublic JsonObject getAttributes()
SpincastSessionJsonObject representing the
attributes of the session. You can use this object
to get/retrieve/delete attributes.getAttributes in interface SpincastSessionpublic Instant getCreationDate()
SpincastSessiongetCreationDate in interface SpincastSessionpublic Instant getModificationDate()
SpincastSessiongetModificationDate in interface SpincastSessionpublic boolean isDirty()
SpincastSessionisDirty in interface SpincastSessionpublic void setDirty()
SpincastSessionsetDirty in interface SpincastSessionpublic void invalidate()
SpincastSessioninvalidate in interface SpincastSessionpublic boolean isInvalidated()
SpincastSessionisInvalidated in interface SpincastSessionCopyright © 2019. All rights reserved.