AbstractUrlHandlerAdapter constructor
AbstractUrlHandlerAdapter(
- MethodArgumentResolverManager methodArgumentResolver,
- ReturnValueHandlerManager methodReturnValueHandler
Creates a new AbstractUrlHandlerAdapter with the provided resolvers.
Parameters
methodArgumentResolver: The resolver used to resolve handler arguments.methodReturnValueHandler: The handler used to process return values.
Abstract base implementation of HandlerAdapter for URL-based handler methods.
The AbstractUrlHandlerAdapter provides common invocation logic shared by all concrete handler adapters in the Jetleaf Web framework. It is responsible for managing:
- Argument resolution for reflective method calls.
- Handler invocation for DSL-defined routes and annotated controllers.
- Return value processing via composite return value handlers.
Responsibilities
- Handle invocation of:
- RouteDslHandlerMethod — Jetleaf routing DSL functions.
- AnnotatedHandlerMethod — Annotated controller methods.
- FrameworkHandlerMethod — Internal Jetleaf framework endpoints.
- Integrate with argument and return value resolver strategies.
- Allow subclasses to extend behavior for custom handler types.
Lifecycle
Each request execution:
- Resolves handler arguments (if applicable).
- Invokes the underlying handler function or reflective method.
- Delegates the result to the configured return value handler.
Example
final adapter = AnnotatedHandlerAdapter(argResolver, returnHandler);
await adapter.handle(request, response, controllerHandler);
Implementation
AbstractUrlHandlerAdapter(this.methodArgumentResolver, this.methodReturnValueHandler);