From 272f14513215150dbc104fdb4b67c0e07cb28370 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Wed, 3 Aug 2011 06:01:20 +0000 Subject: [PATCH] Clarify Lifecycle#stop documentation Issue: SPR-8570 --- .../org/springframework/context/SmartLifecycle.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/org.springframework.context/src/main/java/org/springframework/context/SmartLifecycle.java b/org.springframework.context/src/main/java/org/springframework/context/SmartLifecycle.java index 8ee94816b7..5306652438 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/SmartLifecycle.java +++ b/org.springframework.context/src/main/java/org/springframework/context/SmartLifecycle.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ package org.springframework.context; /** - * An extension of the Lifecycle interface for those objects that require to be + * An extension of the {@link Lifecycle} interface for those objects that require to be * started upon ApplicationContext refresh and/or shutdown in a particular order. * The {@link #isAutoStartup()} return value indicates whether this object should * be started at the time of a context refresh. The callback-accepting @@ -67,10 +67,14 @@ public interface SmartLifecycle extends Lifecycle, Phased { /** * Indicates that a Lifecycle component must stop if it is currently running. - *

The provided callback is used by the LifecycleProcessor to support an + *

The provided callback is used by the {@link LifecycleProcessor} to support an * ordered, and potentially concurrent, shutdown of all components having a * common shutdown order value. The callback must be executed after * the SmartLifecycle component does indeed stop. + *

The {@code LifecycleProcessor} will call only this variant of the + * {@code stop} method; i.e. {@link Lifecycle#stop()} will not be called for + * {@link SmartLifecycle} implementations unless explicitly delegated to within the + * this method. */ void stop(Runnable callback);