public class ExecutorServiceSessionValidationScheduler extends Object implements SessionValidationScheduler, Runnable
ScheduledExecutorService to call ValidatingSessionManager.validateSessions() every
interval milliseconds.| Constructor and Description |
|---|
ExecutorServiceSessionValidationScheduler() |
ExecutorServiceSessionValidationScheduler(ValidatingSessionManager sessionManager) |
| Modifier and Type | Method and Description |
|---|---|
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() |
String |
getThreadNamePrefix() |
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) |
void |
setThreadNamePrefix(String threadNamePrefix) |
public ExecutorServiceSessionValidationScheduler()
public ExecutorServiceSessionValidationScheduler(ValidatingSessionManager sessionManager)
public ValidatingSessionManager getSessionManager()
public void setSessionManager(ValidatingSessionManager sessionManager)
public long getInterval()
public void setInterval(long interval)
public boolean isEnabled()
SessionValidationSchedulertrue 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 SessionValidationSchedulertrue if this Scheduler is enabled and ready to begin validation at the appropriate time,
false otherwise.public void setThreadNamePrefix(String threadNamePrefix)
public String getThreadNamePrefix()
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 downenableSessionValidation in interface SessionValidationSchedulerpublic void disableSessionValidation()
SessionValidationSchedulerdisableSessionValidation in interface SessionValidationSchedulerCopyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.