mirror of
https://github.com/gmbrax/MediaManager-core.git
synced 2026-11-09 14:00:17 +00:00
Integrate DelegateActionManager for request handling and refactor IPC:
- Replaced `SimpleProtocol` with `TransportProtocol` in `IPCManager`. - Added `DelegateActionManager` to route requests to handlers, starting with `EchoHandler`. - Updated `MediaManagerApplication` to initialize and manage `DelegateActionManager`. - Extended Protocol Buffers schema with `Request` and `Response` definitions. - Enhanced logging for request processing and redesigned response flow.
This commit is contained in:
parent
23b6d54674
commit
a0ad10b1bc
@@ -1,5 +1,6 @@
|
||||
package com.mediamanager;
|
||||
|
||||
import com.mediamanager.service.delegate.DelegateActionManager;
|
||||
import com.mediamanager.service.ipc.IPCManager;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -14,6 +15,7 @@ public class MediaManagerApplication {
|
||||
private static final Logger logger = LogManager.getLogger(MediaManagerApplication.class);
|
||||
private static Properties config;
|
||||
private static DatabaseManager databaseManager;
|
||||
private static DelegateActionManager actionManager;
|
||||
private static IPCManager ipcManager;
|
||||
|
||||
public static void main(String[] args) {
|
||||
@@ -24,8 +26,9 @@ public class MediaManagerApplication {
|
||||
loadConfiguration();
|
||||
databaseManager = new DatabaseManager(config);
|
||||
databaseManager.init();
|
||||
|
||||
ipcManager = new IPCManager(config);
|
||||
actionManager = new DelegateActionManager();
|
||||
actionManager.start();
|
||||
ipcManager = new IPCManager(config,actionManager);
|
||||
ipcManager.init();
|
||||
|
||||
// TODO: Start application services
|
||||
@@ -51,6 +54,9 @@ public class MediaManagerApplication {
|
||||
}
|
||||
}
|
||||
|
||||
if (actionManager != null) {
|
||||
actionManager.stop();
|
||||
}
|
||||
|
||||
logger.info("MediaManager Core shutdown successfully");
|
||||
logger.info("Goodbye!");
|
||||
|
||||
Reference in New Issue
Block a user