@Contract @ConstrainedTo(value=SERVER) public interface DestroyListener
onDestroy() method is called when application is being destroyed and after all the pending
monitoring statistics events have been
dispatched and processed.
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).
|Modifier and Type||Method and Description|
The method is called when application is destroyed.
Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.