karsonto commented on code in PR #4739:
URL: https://github.com/apache/eventmesh/pull/4739#discussion_r1454615624
##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/admin/controller/ClientManageController.java:
##########
@@ -104,21 +101,26 @@ public ClientManageController(EventMeshTCPServer
eventMeshTCPServer,
public void start() throws IOException {
// Get the server's admin port.
int port =
eventMeshTCPServer.getEventMeshTCPConfiguration().getEventMeshServerAdminPort();
- // Create an HTTP server and bind it to the specified port.
- HttpServer server = HttpServer.create(new InetSocketAddress(port), 0);
-
HttpHandlerManager httpHandlerManager = new HttpHandlerManager();
+ HttpHandlerManagerAdapter adapter = new
HttpHandlerManagerAdapter(httpHandlerManager);
+ EventMeshAdminServer server = new EventMeshAdminServer(port, false,
eventMeshHTTPServer.getEventMeshHttpConfiguration(), adapter);
+ adapter.bind(server);
+ try {
+ server.init();
+ // TODO: Optimized for automatic injection
+
+ // Initialize the client handler and register it with the HTTP
handler manager.
+ initClientHandler(eventMeshTCPServer, eventMeshHTTPServer,
+ eventMeshGrpcServer, eventMeshMetaStorage, httpHandlerManager);
+
+ // Register the handlers from the HTTP handler manager with the
HTTP server.
+ httpHandlerManager.registerHttpWrapper(adapter);
+
+ server.start();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
Review Comment:
off course
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]