public class Housekeeper extends Object
deleteOnExit() shutdown hooks or finalize()for
cleanup. Because shutDown() uses System.exit() to terminate, these
methods will not work at all or will not work reliably.| Constructor and Description |
|---|
Housekeeper()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
registerForCleanup(CleanupClient client)
Use to register objects that need to perform cleanup operations before the application shuts
down.
|
void |
shutDown(int exitCode)
This methods shuts the application down.
|
void |
shutDown(int exitCode,
boolean reboot) |
protected void |
terminate(int exitCode,
boolean reboot) |
public void registerForCleanup(CleanupClient client)
client - reference of to an object that needs to perform cleanup operations.public void shutDown(int exitCode)
exitCode - the exit code that should be returned to the calling process.public void shutDown(int exitCode,
boolean reboot)
protected void terminate(int exitCode,
boolean reboot)
Copyright © 2001–2025. All rights reserved.