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 exception thrown by {@linkplain MoreExecutors#sameThreadExecutor inline execution}) will be caught and logged.
For fast, lightweight listeners that would be safe to execute in any thread, consider calling {@link #addListener(Listener)}. @param listener the listener to run when the manager changes state @param executor the executor in which the listeners callback methods will be run.
|
|