open class AnnotationAsyncExecutionInterceptor : AsyncExecutionInterceptor
Specialization of AsyncExecutionInterceptor that delegates method execution to an |
|
open class AsyncAnnotationAdvisor : AbstractPointcutAdvisor, BeanFactoryAware
Advisor that activates asynchronous method execution through the Async annotation. This annotation can be used at the method and type level in implementation classes as well as in service interfaces. This advisor detects the EJB 3.1 |
|
open class AsyncConfigurerSupport : AsyncConfigurer
A convenience AsyncConfigurer that implements all methods so that the defaults are used. Provides a backward compatible alternative of implementing AsyncConfigurer directly. |
|
open class AsyncResult<V : Any> : ListenableFuture<V>
A pass-through As of Spring 4.1, this class implements ListenableFuture, not just plain java.util.concurrent.Future, along with the corresponding support in As of Spring 4.2, this class also supports passing execution exceptions back to the caller. |
|
open class ProxyAsyncConfiguration : AbstractAsyncConfiguration
|
|
open class SchedulingConfiguration
This configuration class is automatically imported when using the EnableScheduling annotation. See |
|
interface SchedulingConfigurer
Optional interface to be implemented by @ classes annotated with @EnableScheduling. Typically used for setting a specific org.springframework.scheduling.TaskScheduler bean to be used when executing scheduled tasks or for registering scheduled tasks in a programmatic fashion as opposed to the declarative approach of using the @Scheduled annotation. For example, this may be necessary when implementing -based tasks, which are not supported by the See @EnableScheduling for detailed usage examples. |
class EnableAsync
Enables Spring's asynchronous method execution capability, similar to functionality found in Spring's To be used together with @Configuration classes as follows, enabling annotation-driven async processing for an entire Spring application context: MyAsyncBean is a user-defined type with one or more methods annotated with either Spring's @Async annotation, the EJB 3.1 @javax.ejb.Asynchronous annotation, or any custom annotation specified via the #annotation attribute. The aspect is added transparently for any registered bean, for instance via this configuration:
By default, Spring will be searching for an associated thread pool definition: either a unique org.springframework.core.task.TaskExecutor bean in the context, or an java.util.concurrent.Executor bean named "taskExecutor" otherwise. If neither of the two is resolvable, a org.springframework.core.task.SimpleAsyncTaskExecutor will be used to process async method invocations. Besides, annotated methods having a To customize all this, implement AsyncConfigurer and provide:
If only one item needs to be customized, Note: In the above example the For reference, the example above can be compared to the following Spring XML configuration: The above XML-based and JavaConfig-based examples are equivalent except for the setting of the thread name prefix of the Executor ; this is because the <task:executor> element does not expose such an attribute. This demonstrates how the JavaConfig-based approach allows for maximum configurability through direct access to actual componentry.
The Note that if the #mode is set to |
|
class EnableScheduling
Enables Spring's scheduled task execution capability, similar to functionality found in Spring's This enables detection of @Scheduled annotations on any Spring-managed bean in the container. For example, given a class MyTask the following configuration would ensure that MyTask.work() is called once every 1000 ms: Alternatively, if MyTask were annotated with @Component , the following configuration would ensure that its @Scheduled method is invoked at the desired interval: Methods annotated with @Scheduled may even be declared directly within @Configuration classes:
By default, will be searching for an associated scheduler definition: either a unique org.springframework.scheduling.TaskScheduler bean in the context, or a When more control is desired, a
Note in the example above the use of Implementing
For reference, the example above can be compared to the following Spring XML configuration: The examples are equivalent save that in XML a fixed-rate period is used instead of a custom Trigger implementation; this is because the task: namespace scheduled cannot easily expose such support. This is but one demonstration how the code-based approach allows for maximum configurability through direct access to actual componentry.
|
|
class Schedules
Container annotation that aggregates several Scheduled annotations. Can be used natively, declaring several nested Scheduled annotations. Can also be used in conjunction with Java 8's support for repeatable annotations, where Scheduled can simply be declared several times on the same method, implicitly generating this container annotation. This annotation may be used as a meta-annotation to create custom composed annotations. |