Class SpincastSessionConfigDefault
java.lang.Object
org.spincast.plugins.session.config.SpincastSessionConfigDefault
- All Implemented Interfaces:
SpincastSessionConfig
Default configurations for Spincast Session plugin.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
When the session filters are added automatically, this would be the position of theafter
filter.int
When the session filters are added automatically, this would be the position of thebefore
filter.When the defaultSpincastSessionRepository
repository is used (we suggest you bind a custom one, based on a database though!), this will be the name of the cookie used to saved the session, on the client.int
The acheduled task to delete old sessions should run every X minutes.The name of the cookie used to store the Session id, by default.int
The number of minutes before an inactive session is deleted.int
The number of seconds between two updates of the modification date of a session, wheen the session is not dirty.boolean
Should the required before and after filters be added automatically?boolean
When a cookie is automatically added to a visitor, should it be permanent (10 years)? Otherwise, it will be browser-session long only (the default).
-
Constructor Details
-
SpincastSessionConfigDefault
public SpincastSessionConfigDefault()
-
-
Method Details
-
isSessionPermanentByDefault
public boolean isSessionPermanentByDefault()Description copied from interface:SpincastSessionConfig
When a cookie is automatically added to a visitor, should it be permanent (10 years)? Otherwise, it will be browser-session long only (the default).- Specified by:
isSessionPermanentByDefault
in interfaceSpincastSessionConfig
-
getDeleteOldSessionsScheduledTaskRunEveryNbrMinutes
public int getDeleteOldSessionsScheduledTaskRunEveryNbrMinutes()Description copied from interface:SpincastSessionConfig
The acheduled task to delete old sessions should run every X minutes.- Specified by:
getDeleteOldSessionsScheduledTaskRunEveryNbrMinutes
in interfaceSpincastSessionConfig
-
getSessionMaxInactiveMinutes
public int getSessionMaxInactiveMinutes()Description copied from interface:SpincastSessionConfig
The number of minutes before an inactive session is deleted.Defaults to 7 days.
- Specified by:
getSessionMaxInactiveMinutes
in interfaceSpincastSessionConfig
-
getSessionIdCookieName
Description copied from interface:SpincastSessionConfig
The name of the cookie used to store the Session id, by default.- Specified by:
getSessionIdCookieName
in interfaceSpincastSessionConfig
-
getUpdateNotDirtySessionPeriodInSeconds
public int getUpdateNotDirtySessionPeriodInSeconds()Description copied from interface:SpincastSessionConfig
The number of seconds between two updates of the modification date of a session, wheen the session is not dirty.This value must be less than
SpincastSessionConfig.getSessionMaxInactiveMinutes()
or active sessions will be deleted!Note that when something changes on the session the session becomes dirty and is always saved and an updated modification date.
- Specified by:
getUpdateNotDirtySessionPeriodInSeconds
in interfaceSpincastSessionConfig
-
isAutoAddSessionFilters
public boolean isAutoAddSessionFilters()Description copied from interface:SpincastSessionConfig
Should the required before and after filters be added automatically?If
false
, you will have to add them by yourself.- Specified by:
isAutoAddSessionFilters
in interfaceSpincastSessionConfig
-
getDefaultCookieRepositoryCookieName
Description copied from interface:SpincastSessionConfig
When the defaultSpincastSessionRepository
repository is used (we suggest you bind a custom one, based on a database though!), this will be the name of the cookie used to saved the session, on the client.- Specified by:
getDefaultCookieRepositoryCookieName
in interfaceSpincastSessionConfig
-
getAutoAddedFilterBeforePosition
public int getAutoAddedFilterBeforePosition()Description copied from interface:SpincastSessionConfig
When the session filters are added automatically, this would be the position of thebefore
filter.- Specified by:
getAutoAddedFilterBeforePosition
in interfaceSpincastSessionConfig
-
getAutoAddedFilterAfterPosition
public int getAutoAddedFilterAfterPosition()Description copied from interface:SpincastSessionConfig
When the session filters are added automatically, this would be the position of theafter
filter.- Specified by:
getAutoAddedFilterAfterPosition
in interfaceSpincastSessionConfig
-