Skip to content

Commit 6ee17d2

Browse files
committed
SPR-5507 javadoc
1 parent 568e6a3 commit 6ee17d2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

org.springframework.context/src/main/java/org/springframework/context/SmartLifecycle.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,30 @@
2525
*/
2626
public interface SmartLifecycle extends Lifecycle {
2727

28+
/**
29+
* Return whether this Lifecycle component should be started automatically
30+
* by the container when the ApplicationContext is refreshed. A value of
31+
* "false" indicates that the component is intended to be started manually.
32+
*/
2833
boolean isAutoStartup();
2934

35+
/**
36+
* Return the order in which this Lifecycle component should be stopped.
37+
* The shutdown process begins with the component(s) having the <i>lowest</i>
38+
* value and ends with the highest value (Integer.MIN_VALUE is the lowest
39+
* possible, and Integer.MAX_VALUE is the highest possible). Any Lifecycle
40+
* components within the context that do not also implement SmartLifecycle
41+
* will be treated as if they have a value of Integer.MAX_VALUE.
42+
*/
3043
int getShutdownOrder();
3144

45+
/**
46+
* Indicates that a Lifecycle component must stop if it is currently running.
47+
* The provided callback is used by the LifecycleProcessor to support an
48+
* ordered, and potentially concurrent, shutdown of all components having a
49+
* common shutdown order value. The callback <b>must</b> be executed after
50+
* the SmartLifecycle component does indeed stop.
51+
*/
3252
void stop(Runnable callback);
3353

3454
}

0 commit comments

Comments
 (0)