Package org.alfresco.util
Class VmShutdownListener
java.lang.Object
org.alfresco.util.VmShutdownListener
A class that keeps track of the VM shutdown status. It can be
used by threads as a singleton to check if the
VM shutdown status has been activated.
NOTE: In order to prevent a proliferation of shutdown hooks, it is advisable to use instances as singletons only.
This component should be used by long-running, but interruptable processes.
- Author:
- Derek Hulley
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Message carrier to break out of loops using the callback. -
Constructor Summary
ConstructorsConstructorDescriptionVmShutdownListener
(String name) Constructs this instance to listen to the VM shutdown call. -
Method Summary
-
Constructor Details
-
VmShutdownListener
Constructs this instance to listen to the VM shutdown call.
-
-
Method Details
-
isVmShuttingDown
public boolean isVmShuttingDown()- Returns:
- Returns true if the VM shutdown signal was detected.
-