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

TAKETODAY / today-infrastructure / 16164694424

09 Jul 2025 08:46AM UTC coverage: 81.772% (-0.002%) from 81.774%
16164694424

push

github

TAKETODAY
:sparkles: Introduce ConfigurableApplicationContext.restart() method

59417 of 77611 branches covered (76.56%)

Branch coverage included in aggregate %.

140692 of 167106 relevant lines covered (84.19%)

3.6 hits per line

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

0.0
today-context/src/main/java/infra/context/LifecycleProcessor.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.context;
19

20
/**
21
 * Strategy interface for processing Lifecycle beans within the ApplicationContext.
22
 *
23
 * @author Mark Fisher
24
 * @author Juergen Hoeller
25
 * @author <a href="https://github.com/TAKETODAY">Harry Yang</a>
26
 * @since 4.0
27
 */
28
public interface LifecycleProcessor extends Lifecycle {
29

30
  /**
31
   * Notification of context refresh for auto-starting components.
32
   *
33
   * @see ConfigurableApplicationContext#refresh()
34
   */
35
  default void onRefresh() {
36
    start();
×
37
  }
×
38

39
  /**
40
   * Notification of context close phase for auto-stopping components
41
   * before destruction.
42
   *
43
   * @see ConfigurableApplicationContext#close()
44
   */
45
  default void onClose() {
46
    stop();
×
47
  }
×
48

49
  /**
50
   * Notification of context restart for auto-stopping and subsequently
51
   * auto-starting components.
52
   *
53
   * @see ConfigurableApplicationContext#restart()
54
   * @since 5.0
55
   */
56
  default void onRestart() {
57
    stop();
×
58
    start();
×
59
  }
×
60

61
}
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