You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I code a simple http service using MultithreadedHttpServerLauncher, like the http docs. It just query a h2 database and sends a json response. Today I have a simple class that extends MultithreadedHttpServerLauncher and overrides servlet() method. In servlet() I use BasicAuth and RoutingServlet. There is a hikaricp pool for the database access.
Now I want to code two more services in that app. Each service will open a https connection to another host:port, gets the content, process and return a json.
I read tutorials, docs and examples but I could not understand how to structure that app with Launchers, Modules, Services...
How could I struture that app? (like, a HttpLauncher, a Service1Module, a Service2Module) And how to bind these classes?
How should I call the services in a RoutingServlet? I need to configure and use a AsyncHttpClient to connect to host:port, that's ok, but I don't know how the client can be injected?
Thanks in advance.
The text was updated successfully, but these errors were encountered:
romulloal
changed the title
(Question) How to structure the application?
How to structure the application?
Sep 19, 2022
Hi people, I'm learning ActiveJ.
I code a simple http service using MultithreadedHttpServerLauncher, like the http docs. It just query a h2 database and sends a json response. Today I have a simple class that extends MultithreadedHttpServerLauncher and overrides servlet() method. In servlet() I use BasicAuth and RoutingServlet. There is a hikaricp pool for the database access.
Now I want to code two more services in that app. Each service will open a https connection to another host:port, gets the content, process and return a json.
I read tutorials, docs and examples but I could not understand how to structure that app with Launchers, Modules, Services...
How could I struture that app? (like, a HttpLauncher, a Service1Module, a Service2Module) And how to bind these classes?
How should I call the services in a RoutingServlet? I need to configure and use a AsyncHttpClient to connect to host:port, that's ok, but I don't know how the client can be injected?
Thanks in advance.
The text was updated successfully, but these errors were encountered: