Class CredentialMonitorScheduler
java.lang.Object
se.swedenconnect.security.credential.spring.autoconfigure.CredentialMonitorScheduler
- All Implemented Interfaces:
Lifecycle, Phased, SmartLifecycle
Schedules a
CredentialMonitorBean to run periodically. If a TaskScheduler is supplied, it is used,
otherwise a dedicated single-thread scheduler is created (and shut down when the application stops). This means that
the application does not need to enable Spring scheduling for credential monitoring to work.- Author:
- Martin Lindström
-
Field Summary
Fields inherited from interface SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsConstructorDescriptionCredentialMonitorScheduler(CredentialMonitorBean monitorBean, Duration testInterval, TaskScheduler taskScheduler) Constructor. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SmartLifecycle
getPhase, isAutoStartup, isPauseable, stop
-
Constructor Details
-
CredentialMonitorScheduler
public CredentialMonitorScheduler(@Nonnull CredentialMonitorBean monitorBean, @Nonnull Duration testInterval, @Nullable TaskScheduler taskScheduler) Constructor.- Parameters:
monitorBean- the monitor to runtestInterval- the delay between test runstaskScheduler- the scheduler to use, ornullfor a dedicated scheduler
-
-
Method Details
-
start
-
stop
-
isRunning
-