Skip to main content

HandlerManager

Stentor API Reference


Stentor API Reference / stentor-handler-manager/src / HandlerManager

Class: HandlerManager

Defined in: packages/stentor-handler-manager/src/HandlerManager.ts:12

Constructors​

Constructor​

new HandlerManager(props): HandlerManager

Defined in: packages/stentor-handler-manager/src/HandlerManager.ts:17

Parameters​

props​
service​

HandlerService

factory​

HandlerFactory

Returns​

HandlerManager

Methods​

from()​

from(request, context): Promise\<AbstractHandler\<Content, Data, Forward, Redirect>>

Defined in: packages/stentor-handler-manager/src/HandlerManager.ts:45

Build the request handler, either from what is on storage or requests the appropriate handler from the request handler service.

TODO: This method is huge, it could use some refactoring. One odd thing we will want to address is the fact it modifies the request & context that is passed in instead of making new ones and passing them out as well.

Parameters​

request​

Request

Current request

context​

Context

Current context

Returns​

Promise\<AbstractHandler\<Content, Data, Forward, Redirect>>