Here's an overview of the main Ratpack classes. Will be added at any time.
A basic class for starting a server.
A class that organizes settings (ports, etc.) related to the server.
An interface that provides hooks in the life cycle of a Ratpack server.
Note that there is an interface with the same name that is @Deprecated.
A class used to pass information between Handlers.
... it doesn't seem to be very important to write this, but the server itself also gets each dependency through Registry (server registry in the official manual).
Therefore, each function such as Handler itself and Renderer is acquired through Registry, which is an important class that supports the flexibility of Ratpack.
An extension (https://ratpack.io/manual/current/guice.html) using Google Guice is available.
It is a general-purpose functional interface for setting and so on.
For example, RatpackServer.start () takes ʻAction as an argument, andRatpackServerSpec.handlers () takes ʻAction <Chain> as an argument.
A class that groups multiple handlers together. It also routes each handler.
A functional interface with a handle (Context) method that models receiving a request and returning a response.
Is it something like the Java EE HttpServlet as an image?
We will create a response by describing the process in the passed Context.
A class that provides the "context" that accompanies each Handler call.
Information such as HTTP requests is also held by this object.
By calling Context.render (Object), the contents of the returned response will be created.
A class that supports asynchronous processing. Similar to JavaScript Promise. A detailed commentary article will be created.
This version does not return the value of Promise.
A utility class for creating Promise and ʻOperation`. It is used when doing blocking IO.
You need ratpack-session. This class supports sessions in Ratpack communication.
Get it from Registry.get ().
BaseDir
A class used to serve static assets.
Recommended Posts