Page Contents

Home > @loopback/context > GenericInterceptorChain

GenericInterceptorChain class

A chain of generic interceptors to be invoked for the given context

Signature:

export declare class GenericInterceptorChain<C extends Context = Context> 

Constructors

Constructor Modifiers Description

(constructor)(context, interceptors)

Create an invocation chain with a list of interceptor functions or binding keys

(constructor)(context, filter, comparator)

Create an invocation interceptor chain with a binding filter and comparator. The interceptors are discovered from the context using the binding filter and sorted by the comparator (if provided).

Properties

Property Modifiers Type Description

getInterceptors

protected

() => GenericInterceptorOrKey<C>[]

A getter for an array of interceptor functions or binding keys

Methods

Method Modifiers Description

asInterceptor()

Use the interceptor chain as an interceptor

invokeInterceptors(finalHandler)

Invoke the interceptor chain