Class DelegatingSecurityContextTaskScheduler
- java.lang.Object
- 
- org.springframework.security.scheduling.DelegatingSecurityContextTaskScheduler
 
- 
- All Implemented Interfaces:
- org.springframework.scheduling.TaskScheduler
 
 public class DelegatingSecurityContextTaskScheduler extends java.lang.Object implements org.springframework.scheduling.TaskSchedulerAn implementation ofTaskSchedulerinvoking it whenever the trigger indicates a next execution time.- Since:
- 5.1
 
- 
- 
Constructor SummaryConstructors Constructor Description DelegatingSecurityContextTaskScheduler(org.springframework.scheduling.TaskScheduler delegate)Creates a newDelegatingSecurityContextTaskSchedulerthat uses the currentSecurityContextfrom theSecurityContextHolder.DelegatingSecurityContextTaskScheduler(org.springframework.scheduling.TaskScheduler delegateTaskScheduler, SecurityContext securityContext)Creates a newDelegatingSecurityContextTaskSchedulerthat uses the specifiedSecurityContext.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.ScheduledFuture<?>schedule(java.lang.Runnable task, java.util.Date startTime)java.util.concurrent.ScheduledFuture<?>schedule(java.lang.Runnable task, org.springframework.scheduling.Trigger trigger)java.util.concurrent.ScheduledFuture<?>scheduleAtFixedRate(java.lang.Runnable task, long period)java.util.concurrent.ScheduledFuture<?>scheduleAtFixedRate(java.lang.Runnable task, java.util.Date startTime, long period)java.util.concurrent.ScheduledFuture<?>scheduleWithFixedDelay(java.lang.Runnable task, long delay)java.util.concurrent.ScheduledFuture<?>scheduleWithFixedDelay(java.lang.Runnable task, java.util.Date startTime, long delay)
 
- 
- 
- 
Constructor Detail- 
DelegatingSecurityContextTaskSchedulerpublic DelegatingSecurityContextTaskScheduler(org.springframework.scheduling.TaskScheduler delegateTaskScheduler, SecurityContext securityContext)Creates a newDelegatingSecurityContextTaskSchedulerthat uses the specifiedSecurityContext.- Parameters:
- delegateTaskScheduler- the- TaskSchedulerto delegate to. Cannot be null.
- securityContext- the- SecurityContextto use for each- DelegatingSecurityContextRunnableor null to default to the current- SecurityContext
- Since:
- 5.6
 
 - 
DelegatingSecurityContextTaskSchedulerpublic DelegatingSecurityContextTaskScheduler(org.springframework.scheduling.TaskScheduler delegate) Creates a newDelegatingSecurityContextTaskSchedulerthat uses the currentSecurityContextfrom theSecurityContextHolder.- Parameters:
- delegate- the- TaskExecutorto delegate to. Cannot be null.
 
 
- 
 - 
Method Detail- 
schedulepublic java.util.concurrent.ScheduledFuture<?> schedule(java.lang.Runnable task, org.springframework.scheduling.Trigger trigger)- Specified by:
- schedulein interface- org.springframework.scheduling.TaskScheduler
 
 - 
schedulepublic java.util.concurrent.ScheduledFuture<?> schedule(java.lang.Runnable task, java.util.Date startTime)- Specified by:
- schedulein interface- org.springframework.scheduling.TaskScheduler
 
 - 
scheduleAtFixedRatepublic java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable task, java.util.Date startTime, long period)- Specified by:
- scheduleAtFixedRatein interface- org.springframework.scheduling.TaskScheduler
 
 - 
scheduleAtFixedRatepublic java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable task, long period)- Specified by:
- scheduleAtFixedRatein interface- org.springframework.scheduling.TaskScheduler
 
 - 
scheduleWithFixedDelaypublic java.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable task, java.util.Date startTime, long delay)- Specified by:
- scheduleWithFixedDelayin interface- org.springframework.scheduling.TaskScheduler
 
 - 
scheduleWithFixedDelaypublic java.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable task, long delay)- Specified by:
- scheduleWithFixedDelayin interface- org.springframework.scheduling.TaskScheduler
 
 
- 
 
-