AbstractUrlHandlerAdapter class abstract
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);
- Implemented types
- Implementers
- Annotations
-
- @Author.new("Evaristus Adimonyemma")
Constructors
- AbstractUrlHandlerAdapter(MethodArgumentResolverManager methodArgumentResolver, ReturnValueHandlerManager methodReturnValueHandler)
- Creates a new AbstractUrlHandlerAdapter with the provided resolvers.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- methodArgumentResolver → MethodArgumentResolverManager
-
The composite argument resolver responsible for resolving method parameters
dynamically during handler invocation.
final
- methodReturnValueHandler → ReturnValueHandlerManager
-
The composite return value handler that processes and writes handler results
(e.g., JSON serialization, view rendering, redirects).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
doHandle(
HandlerMethod handler, Object target, ServerHttpRequest request, ServerHttpResponse response, Method method) → Future< void> - Executes the given handler method for the current HTTP request lifecycle.
-
handle(
ServerHttpRequest request, ServerHttpResponse response, HandlerMethod handler) → Future< void> -
Handles the given HandlerMethod for the provided HTTP
requestandresponse.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
supports(
HandlerMethod handler) → bool -
Determines whether this adapter supports the given HandlerMethod.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited