@@ -23,36 +23,30 @@ import { provide } from "inversify-binding-decorators";
23
23
@provide ( ApplicationBase )
24
24
export abstract class ApplicationBase {
25
25
/**
26
- * Method to configure services that should be initialized
27
- * before the server starts. It must be implemented by the
28
- * extending class to set up necessary services or configurations.
29
- * Can return a Promise for async configuration.
26
+ * Implement this method to set up required services or configurations before
27
+ * the server starts. This is essential for initializing dependencies or settings
28
+ * necessary for server operation. Supports asynchronous setup with a Promise.
30
29
*
31
30
* @abstract
32
31
* @returns {void | Promise<void> }
33
32
*/
34
33
protected abstract configureServices ( ) : void | Promise < void > ;
35
34
36
35
/**
37
- * Method to configure services or actions that should be executed
38
- * after the server starts. It allows the extending class to perform
39
- * any necessary operations once the server is up and running.
40
- * Can return a Promise for async execution.
36
+ * Implement this method to execute actions or configurations after the server
37
+ * has started. Use this for operations that need to run once the server is
38
+ * operational. Supports asynchronous execution with a Promise.
41
39
*
42
40
* @abstract
43
41
* @returns {void | Promise<void> }
44
42
*/
45
43
protected abstract postServerInitialization ( ) : void | Promise < void > ;
46
44
47
45
/**
48
- * Method to perform any necessary actions or cleanup after the server
49
- * is shutting down. This might include closing database connections,
50
- * stopping background tasks, or other cleanup activities. It provides
51
- * a clean exit point for the server.
52
- * Can return a Promise for async cleanup.
53
- *
54
- * @abstract
55
- * @returns {void | Promise<void> }
46
+ * Implement this method to handle cleanup and final actions when the server
47
+ * is shutting down. Ideal for closing resources, stopping tasks, or other
48
+ * cleanup procedures to ensure a graceful server shutdown. Supports asynchronous
49
+ * cleanup with a Promise.
56
50
*/
57
51
protected abstract serverShutdown ( ) : void | Promise < void > ;
58
52
}
0 commit comments