Pipeline class
A helper that makes it easy to compose a set of Middleware and a Handler.
var handler = const Pipeline()
.addMiddleware(loggingMiddleware)
.addMiddleware(cachingMiddleware)
.addHandler(application);
Note: this package also provides addMiddleware
and addHandler
extensions
members on Middleware, which may be easier to use.
Constructors
- Pipeline()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- middleware → Middleware
-
Exposes this pipeline of Middleware as a single middleware instance.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addHandler(
Handler handler) → Handler -
Returns a new Handler with
handler
as the final processor of a Request if all of the middleware in the pipeline have passed the request through. -
addMiddleware(
Middleware middleware) → Pipeline -
Returns a new Pipeline with
middleware
added to the existing set of Middleware. -
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