Class DelegatingSecurityContextSchedulingTaskExecutor
java.lang.Object
org.springframework.security.concurrent.DelegatingSecurityContextExecutor
org.springframework.security.task.DelegatingSecurityContextTaskExecutor
org.springframework.security.task.DelegatingSecurityContextAsyncTaskExecutor
org.springframework.security.scheduling.DelegatingSecurityContextSchedulingTaskExecutor
ubic.gemma.core.security.concurrent.DelegatingSecurityContextSchedulingTaskExecutor
- All Implemented Interfaces:
Executor, EventListener, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>, org.springframework.core.task.AsyncTaskExecutor, org.springframework.core.task.TaskExecutor, org.springframework.scheduling.SchedulingTaskExecutor, DelegatingAsyncTaskExecutor, DelegatingSchedulingTaskExecutor, DelegatingTaskExecutor
public class DelegatingSecurityContextSchedulingTaskExecutor
extends org.springframework.security.scheduling.DelegatingSecurityContextSchedulingTaskExecutor
implements DelegatingSchedulingTaskExecutor, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>
-
Field Summary
Fields inherited from interface org.springframework.core.task.AsyncTaskExecutor
TIMEOUT_IMMEDIATE, TIMEOUT_INDEFINITE -
Constructor Summary
ConstructorsConstructorDescriptionDelegatingSecurityContextSchedulingTaskExecutor(org.springframework.scheduling.SchedulingTaskExecutor delegate) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.scheduling.SchedulingTaskExecutorThe task executor this is delegating for.voidonApplicationEvent(org.springframework.context.event.ContextClosedEvent event) Spring's pool-backed executors (ExecutorConfigurationSupport, the base ofThreadPoolTaskExecutor/ThreadPoolTaskScheduler) shut their thread pool down onContextClosedEventby implementingApplicationListener.protected final Runnableprotected final <T> Callable<T> Methods inherited from class org.springframework.security.scheduling.DelegatingSecurityContextSchedulingTaskExecutor
prefersShortLivedTasksMethods inherited from class org.springframework.security.task.DelegatingSecurityContextAsyncTaskExecutor
execute, submit, submitMethods inherited from class org.springframework.security.concurrent.DelegatingSecurityContextExecutor
execute, getDelegateExecutor, setSecurityContextHolderStrategyMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecutionMethods inherited from interface org.springframework.core.task.AsyncTaskExecutor
execute, submit, submit, submitCompletable, submitCompletableMethods inherited from interface org.springframework.scheduling.SchedulingTaskExecutor
prefersShortLivedTasksMethods inherited from interface org.springframework.core.task.TaskExecutor
execute
-
Constructor Details
-
DelegatingSecurityContextSchedulingTaskExecutor
public DelegatingSecurityContextSchedulingTaskExecutor(org.springframework.scheduling.SchedulingTaskExecutor delegate)
-
-
Method Details
-
getDelegate
public org.springframework.scheduling.SchedulingTaskExecutor getDelegate()Description copied from interface:DelegatingAsyncTaskExecutorThe task executor this is delegating for.- Specified by:
getDelegatein interfaceDelegatingAsyncTaskExecutor- Specified by:
getDelegatein interfaceDelegatingSchedulingTaskExecutor- Specified by:
getDelegatein interfaceDelegatingTaskExecutor
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ContextClosedEvent event) Spring's pool-backed executors (ExecutorConfigurationSupport, the base ofThreadPoolTaskExecutor/ThreadPoolTaskScheduler) shut their thread pool down onContextClosedEventby implementingApplicationListener. Wrapping such a bean hid that interface, which both dropped the context-close shutdown propagation and made the event multicaster throwBeanNotOfRequiredTypeExceptionat shutdown — the bean was registered as a listener by its pre-wrapping type but resolved to this wrapper, which was not anApplicationListener. Re-expose the contract and forward the event so both are restored; a no-op when the delegate is not itself a listener.- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>
-
wrap
-
wrap
-