RequestManager class

Send requests through the mediator to be handled by a single handler.

Available extensions

Constructors

RequestManager({required RequestHandlerStore requestHandlerStore, required PipelineBehaviorStore pipelineBehaviorStore})
Creates a new RequestManager.
RequestManager.create()
Creates a default RequestManager.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
pipeline PipelineConfigurator
Configures the request pipeline.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register<TResponse, TRequest extends Request<TResponse>>(RequestHandler<TResponse, TRequest> handler) → void
Registers the request handler for the given TRequest.
registerFactory<TResponse, TRequest extends Request<TResponse>>(RequestHandlerFactory<TResponse, TRequest> factory) → void

Available on RequestManager, provided by the RequestManagerExtensions extension

Registers the given factory.
registerFunction<TResponse, TRequest extends Request<TResponse>>(FutureOr<TResponse> handler(TRequest)) → void

Available on RequestManager, provided by the RequestManagerExtensions extension

Registers the given handler.
send<TResponse extends Object?>(Request<TResponse> request) Future<TResponse>
Sends a request to a single RequestHandler.
sendStream<TResponse extends Object?>(Stream<Request<TResponse>> requestStream) Stream<TResponse>

Available on RequestManager, provided by the RequestManagerStreamExtensions extension

Sends a requestStream to a single RequestHandler.
toString() String
A string representation of this object.
inherited
unregister<TResponse, TRequest extends Request<TResponse>>(RequestHandler<TResponse, TRequest> handler) → void
Registers the request handler for the given TRequest.

Operators

operator ==(Object other) bool
The equality operator.
inherited