• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

TAKETODAY / today-infrastructure / 18154768944

01 Oct 2025 07:26AM UTC coverage: 81.882% (-0.005%) from 81.887%
18154768944

push

github

web-flow
Merge pull request #290 from TAKETODAY/dev/jspecify

jspecify

59788 of 78013 branches covered (76.64%)

Branch coverage included in aggregate %.

141239 of 167496 relevant lines covered (84.32%)

3.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
today-context/src/main/java/infra/scheduling/annotation/AsyncConfigurer.java
1
/*
2
 * Copyright 2017 - 2025 the original author or authors.
3
 *
4
 * This program is free software: you can redistribute it and/or modify
5
 * it under the terms of the GNU General Public License as published by
6
 * the Free Software Foundation, either version 3 of the License, or
7
 * (at your option) any later version.
8
 *
9
 * This program is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 * GNU General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU General Public License
15
 * along with this program. If not, see [https://www.gnu.org/licenses/]
16
 */
17

18
package infra.scheduling.annotation;
19

20
import org.jspecify.annotations.Nullable;
21

22
import java.util.concurrent.Executor;
23

24
import infra.aop.interceptor.AsyncUncaughtExceptionHandler;
25
import infra.context.annotation.Configuration;
26

27
/**
28
 * Interface to be implemented by @{@link Configuration
29
 * Configuration} classes annotated with @{@link EnableAsync} that wish to customize the
30
 * {@link Executor} instance used when processing async method invocations or the
31
 * {@link AsyncUncaughtExceptionHandler} instance used to process exception thrown from
32
 * async method with {@code void} return type.
33
 *
34
 * <p>See @{@link EnableAsync} for usage examples.
35
 *
36
 * @author Chris Beams
37
 * @author Stephane Nicoll
38
 * @see AbstractAsyncConfiguration
39
 * @see EnableAsync
40
 * @since 4.0
41
 */
42
public interface AsyncConfigurer {
43

44
  /**
45
   * The {@link Executor} instance to be used when processing async
46
   * method invocations.
47
   */
48
  @Nullable
49
  default Executor getAsyncExecutor() {
50
    return null;
2✔
51
  }
52

53
  /**
54
   * The {@link AsyncUncaughtExceptionHandler} instance to be used
55
   * when an exception is thrown during an asynchronous method execution
56
   * with {@code void} return type.
57
   */
58
  @Nullable
59
  default AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
60
    return null;
×
61
  }
62

63
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc