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)](/doc/en/lb4/apidocs.context.genericinterceptorchain._constructor_.html) Create an invocation chain with a list of interceptor functions or binding keys
[(constructor)(context, filter, comparator)](/doc/en/lb4/apidocs.context.genericinterceptorchain._constructor__1.html) 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](/doc/en/lb4/apidocs.context.genericinterceptorchain.getinterceptors.html) `protected` () => [GenericInterceptorOrKey](/doc/en/lb4/apidocs.context.genericinterceptororkey.html)<C>\[\] A getter for an array of interceptor functions or binding keys

Methods

Method Modifiers Description
[asInterceptor()](/doc/en/lb4/apidocs.context.genericinterceptorchain.asinterceptor.html) Use the interceptor chain as an interceptor
[invokeInterceptors(finalHandler)](/doc/en/lb4/apidocs.context.genericinterceptorchain.invokeinterceptors.html) Invoke the interceptor chain