Add WebSocketInterceptor

See gh-162
This commit is contained in:
Rossen Stoyanchev
2021-10-20 21:21:31 +01:00
parent 811d32b647
commit 20bae75ed8
23 changed files with 361 additions and 70 deletions

View File

@@ -34,9 +34,9 @@ public class SampleApplication {
@Bean
public WebInterceptor interceptor() {
return (input, next) -> {
return (webInput, interceptorChain) -> {
// Switch threads to prove ThreadLocal context propagation works
return Mono.delay(Duration.ofMillis(10)).flatMap(aLong -> next.handle(input));
return Mono.delay(Duration.ofMillis(10)).flatMap(aLong -> interceptorChain.next(webInput));
};
}