Class UnitOfWorkJavalinHandlers
java.lang.Object
com.kingsrook.qqq.middleware.javalin.UnitOfWorkJavalinHandlers
Javalin before/after handlers that make each HTTP request a core
UnitOfWork (kind HTTP_REQUEST), so statement listeners can
attribute database work to routes. The unit is named "METHOD /route/{template}"
once Javalin has matched the route (concrete paths are never used, so ids
and other path values do not enter the name). Both handlers do nothing
while no statement listener is registered.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidafter(io.javalin.http.Context context) After every request: name the unit by its matched route template and end it.static voidbefore(io.javalin.http.Context context) Before every request: drop anything a previous request left on this thread, and begin the request's unit.
-
Method Details
-
before
public static void before(io.javalin.http.Context context) Before every request: drop anything a previous request left on this thread, and begin the request's unit. -
after
public static void after(io.javalin.http.Context context) After every request: name the unit by its matched route template and end it.
-