HandlerObject class abstract
An abstract base class for classes that behave like Handlers.
Instances of HandlerObject are callable as Handlers, and
can be passed as handlers via a call tear-off.
Overriding call is mandatory.
If the handler requires special path parameters, or supports other methods than Method.get, then you should override injectIn.
- Implemented types
- Implementers
Constructors
- HandlerObject()
-
const
Properties
- asHandler → Handler
-
Returns this HandlerObject as a Handler.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
Request req) → FutureOr< Result> - The implementation of this HandlerObject
-
injectIn(
RelicRouter router) → void -
Adds this handler to the given
routerwith Method.get and path '/' Override to add differently.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited