Interface Agent<TMeans>

Request processing agent interface.

It is extended by request processing context in order the handlers to be able to delegate processing to other handlers.

Type Parameters

  • TMeans

    A type of request processing means.

Hierarchy

  • Agent

Methods

Methods

  • Delegates request processing to the next handler and optionally modifies processing means by creating a new context with the given modifications applied. The rest of the properties remain unchanged.

    Type Parameters

    • TExt extends object = object

    Parameters

    • this: void
    • handler: RequestHandler<TMeans & TExt>

      Target handler to delegate request processing to.

    • Optional modification: RequestModification<TMeans, TExt>

      Request processing means modification. this context will be passed to the next handler when omitted.

    Returns Promise<boolean>

    A promise resolved when request processing finishes. Resolves to true when request is responded, or to false otherwise.

Generated using TypeDoc