There is no guaranteed ordering of execution of listeners, but any listener added through this method is guaranteed to be called whenever there is a state change.
Exceptions thrown by a listener will be propagated up to the executor. Any exception thrown during {@code Executor.execute} (e.g., a {@code RejectedExecutionException} or an exceptionthrown by {@linkplain MoreExecutors#sameThreadExecutor inline execution}) will be caught and logged. @param listener the listener to run when the service changes state is complete @param executor the executor in which the listeners callback methods will be run. For fast,lightweight listeners that would be safe to execute in any thread, consider {@link MoreExecutors#sameThreadExecutor}. @since 13.0
|
|
|
|