Interface DestroyListener
-
@Contract @ConstrainedTo(SERVER) public interface DestroyListener
A listener contract that allows any registered implementation class to receive application destroy events.The
onDestroy()
method is called when application is being destroyed and after all the pendingmonitoring statistics events
have been dispatched and processed.The advantage of using
DestroyListener
over usingApplicationEventListener
directly to check for theApplicationEvent.Type.DESTROY_FINISHED
event is, that theonDestroy()
method is guaranteed to be called only AFTER all theMonitoringStatisticsListener#onStatistics()
events have been dispatched and processed, as opposed to using theApplicationEventListener
directly, in which case some monitoring statistics events may still be concurrently fired after theDESTROY_FINISHED
event has been dispatched (due to potential race conditions).- Since:
- 2.12
- See Also:
MonitoringStatisticsListener
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onDestroy()
The method is called when application is destroyed.
-
-
-
Method Detail
-
onDestroy
void onDestroy()
The method is called when application is destroyed. Use this method release resources of the listener. This method will be called in the thread safe way (synchronously and by a single thread) according to other methods from the relatedMonitoringStatisticsListener
interface.
-
-