Class BackgroundProcessManager
java.lang.Object
org.apache.tomcat.websocket.BackgroundProcessManager
Provides a background processing mechanism that triggers roughly once a second. The class maintains a thread that
only runs when there is at least one instance of
BackgroundProcess registered.-
Method Summary
Modifier and TypeMethodDescriptionstatic BackgroundProcessManagerReturns the singleton instance of the BackgroundProcessManager.voidregister(BackgroundProcess process) Registers a background process for periodic execution.voidunregister(BackgroundProcess process) Unregisters a previously registered background process.
-
Method Details
-
getInstance
Returns the singleton instance of the BackgroundProcessManager.- Returns:
- the singleton instance
-
register
Registers a background process for periodic execution.- Parameters:
process- the background process to register
-
unregister
Unregisters a previously registered background process.- Parameters:
process- the background process to unregister
-