shutdown Method
Advises the Listener that application shutdown is imminent. Calling this method ensures that any partial summary blocks get recorded and guarantees that the final gathered performance data will not be lost. However, it is not necessary for the application to directly call shutdown as the finalize method of the Listener object will also call shutdown, but the best practice is to always call shutdown before application exit.
Attention: If the application exits without
calling either the finalize method of the Listener or shutdown,
then the most recent performance data which was being added to
the current summary block will be lost, but there will be no other
negative consequences.
Syntax
void shutdown();
Parameters
- None.
Example
Listener listener = new Listener("sampleApp", "4.0");
listener.shutdown();
...