|
32 | 32 | import java.util.concurrent.Executor; |
33 | 33 |
|
34 | 34 | /** |
35 | | - * An {@link ActionListener} to which other {@link ActionListener} instances can subscribe, such that when this listener is |
36 | | - * completed it fans-out its result to the subscribed listeners. |
| 35 | + * An {@link ActionListener} to which other {@link ActionListener} instances can subscribe, such that when this listener is completed it |
| 36 | + * fans-out its result to the subscribed listeners. |
37 | 37 | * <p> |
38 | | - * If this listener is complete, {@link #addListener} completes the subscribing listener immediately |
39 | | - * with the result with which this listener was completed. Otherwise, the subscribing listener is retained |
40 | | - * and completed when this listener is completed. |
| 38 | + * If this listener is complete, {@link #addListener} completes the subscribing listener immediately with the result with which this |
| 39 | + * listener was completed. Otherwise, the subscribing listener is retained and completed when this listener is completed. |
41 | 40 | * <p> |
42 | | - * Exceptions are passed to subscribed listeners without modification. {@link ListenableActionFuture} and {@link ListenableFuture} are child |
43 | | - * classes that provide additional exception handling. |
| 41 | + * Exceptions are passed to subscribed listeners without modification. {@link ListenableActionFuture} and {@link ListenableFuture} are |
| 42 | + * subclasses which modify the exceptions passed to subscribed listeners. |
| 43 | + * <p> |
| 44 | + * If this listener is completed more than once then all results other than the first (whether successful or otherwise) are silently |
| 45 | + * discarded. All subscribed listeners will be notified of the same result, exactly once, even if several completions occur concurrently. |
44 | 46 | * <p> |
45 | 47 | * A sequence of async steps can be chained together using a series of {@link SubscribableListener}s, similar to {@link CompletionStage} |
46 | 48 | * (without the {@code catch (Throwable t)}). Listeners can be created for each step, where the next step subscribes to the result of the |
|
0 commit comments