|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.shiro.session.mgt.ExecutorServiceSessionValidationScheduler
public class ExecutorServiceSessionValidationScheduler
SessionValidationScheduler implementation that uses a
ScheduledExecutorService
to call ValidatingSessionManager.validateSessions()
every
interval
milliseconds.
Constructor Summary | |
---|---|
ExecutorServiceSessionValidationScheduler()
|
|
ExecutorServiceSessionValidationScheduler(ValidatingSessionManager sessionManager)
|
Method Summary | |
---|---|
void |
disableSessionValidation()
Disables the session validation job. |
void |
enableSessionValidation()
Creates a single thread ScheduledExecutorService to validate sessions at fixed intervals
and enables this scheduler. |
long |
getInterval()
|
ValidatingSessionManager |
getSessionManager()
|
boolean |
isEnabled()
Returns true if this Scheduler is enabled and ready to begin validation at the appropriate time,
false otherwise. |
void |
run()
|
void |
setInterval(long interval)
|
void |
setSessionManager(ValidatingSessionManager sessionManager)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExecutorServiceSessionValidationScheduler()
public ExecutorServiceSessionValidationScheduler(ValidatingSessionManager sessionManager)
Method Detail |
---|
public ValidatingSessionManager getSessionManager()
public void setSessionManager(ValidatingSessionManager sessionManager)
public long getInterval()
public void setInterval(long interval)
public boolean isEnabled()
SessionValidationScheduler
true
if this Scheduler is enabled and ready to begin validation at the appropriate time,
false
otherwise.
It does not indicate if the validation is actually executing at that instant - only that it is prepared
to do so at the appropriate time.
isEnabled
in interface SessionValidationScheduler
true
if this Scheduler is enabled and ready to begin validation at the appropriate time,
false
otherwise.public void enableSessionValidation()
ScheduledExecutorService
to validate sessions at fixed intervals
and enables this scheduler. The executor is created as a daemon thread to allow JVM to shut down
enableSessionValidation
in interface SessionValidationScheduler
public void run()
run
in interface Runnable
public void disableSessionValidation()
SessionValidationScheduler
disableSessionValidation
in interface SessionValidationScheduler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |