registerFactory<TResponse, TRequest extends Request<TResponse>> method

void registerFactory<TResponse, TRequest extends Request<TResponse>>(
  1. RequestHandlerFactory<TResponse, TRequest> factory
)

Registers the given factory.

This will create a factory based request handler. This factory will be resolved into an actual RequestHandler at request time.

See RequestHandler.factory.

Implementation

void registerFactory<TResponse, TRequest extends Request<TResponse>>(
  RequestHandlerFactory<TResponse, TRequest> factory,
) {
  register(RequestHandler.factory(factory));
}