@Contract @ConstrainedTo(value=SERVER) public interface DestroyListener
The advantage of using
DestroyListener over using
ApplicationEventListener directly to check for the
ApplicationEvent.Type.DESTROY_FINISHED event is, that the
method is guaranteed to be called only AFTER all the
MonitoringStatisticsListener#onStatistics() events have been
dispatched and processed, as opposed to using the
ApplicationEventListener directly, in which case some monitoring
statistics events may still be concurrently fired after the
DESTROY_FINISHED event has been dispatched
(due to potential race conditions).
Copyright © 2007-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.