---
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>

[(constructor)(context, interceptors)](./context.genericinterceptorchain._constructor_.md)


</td><td>


</td><td>

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


</td></tr>
<tr><td>

[(constructor)(context, filter, comparator)](./context.genericinterceptorchain._constructor__1.md)


</td><td>


</td><td>

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>

[getInterceptors](./context.genericinterceptorchain.getinterceptors.md)


</td><td>

`protected`


</td><td>

() =&gt; [GenericInterceptorOrKey](./context.genericinterceptororkey.md)<!-- -->&lt;C&gt;\[\]


</td><td>

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>

[asInterceptor()](./context.genericinterceptorchain.asinterceptor.md)


</td><td>


</td><td>

Use the interceptor chain as an interceptor


</td></tr>
<tr><td>

[invokeInterceptors(finalHandler)](./context.genericinterceptorchain.invokeinterceptors.md)


</td><td>


</td><td>

Invoke the interceptor chain


</td></tr>
</tbody></table>


