---
lang: en
title: 'API docs: context.genericinterceptorchain'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/context
permalink: /doc/en/lb4/apidocs.context.genericinterceptorchain.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [GenericInterceptorChain](./context.genericinterceptorchain.md)

## GenericInterceptorChain class

A chain of generic interceptors to be invoked for the given context

**Signature:**

```typescript
export declare class GenericInterceptorChain<C extends Context = Context> 
```

## Constructors

<table><thead><tr><th>

Constructor


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td markdown="1">

[(constructor)(context, interceptors)](./context.genericinterceptorchain._constructor_.md)


</td><td markdown="1">


</td><td markdown="1">

Create an invocation chain with a list of interceptor functions or binding keys


</td></tr>
<tr><td markdown="1">

[(constructor)(context, filter, comparator)](./context.genericinterceptorchain._constructor__1.md)


</td><td markdown="1">


</td><td markdown="1">

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).


</td></tr>
</tbody></table>

## Properties

<table><thead><tr><th>

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td markdown="1">

[getInterceptors](./context.genericinterceptorchain.getinterceptors.md)


</td><td markdown="1">

`protected`


</td><td markdown="1">

() =&gt; [GenericInterceptorOrKey](./context.genericinterceptororkey.md)<!-- -->&lt;C&gt;\[\]


</td><td markdown="1">

A getter for an array of interceptor functions or binding keys


</td></tr>
</tbody></table>

## Methods

<table><thead><tr><th>

Method


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td markdown="1">

[asInterceptor()](./context.genericinterceptorchain.asinterceptor.md)


</td><td markdown="1">


</td><td markdown="1">

Use the interceptor chain as an interceptor


</td></tr>
<tr><td markdown="1">

[invokeInterceptors(finalHandler)](./context.genericinterceptorchain.invokeinterceptors.md)


</td><td markdown="1">


</td><td markdown="1">

Invoke the interceptor chain


</td></tr>
</tbody></table>


