Package dev.restate.sdk.interceptor
Interface HandlerInterceptor.Factory
- All Known Implementing Classes:
GlobalOpenTelemetryInterceptorFactory,MicrometerInterceptorFactory,OpenTelemetryInterceptorFactory
- Enclosing interface:
HandlerInterceptor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Factory for
HandlerInterceptor.
Factories are discovered via ServiceLoader (global defaults) or registered
explicitly via HandlerRunner.Options.addHandlerInterceptorFactory(Factory).
-
Method Summary
Modifier and TypeMethodDescriptionstatic HandlerInterceptorcombine(Collection<? extends HandlerInterceptor.Factory> factories) static HandlerInterceptorcombine(Stream<? extends HandlerInterceptor.Factory> factories) Combine multiple factories into a singleHandlerInterceptor.@Nullable HandlerInterceptorCreateHandlerInterceptor.
-
Method Details
-
createHandlerInterceptor
@Nullable HandlerInterceptor createHandlerInterceptor()CreateHandlerInterceptor. Invoked once at endpoint initialization, hence the resulting interceptor is cached and reused across all invocations.Return
nullto skip this factory. -
combine
Combine multiple factories into a singleHandlerInterceptor.The first is outermost, the last is innermost.
-
combine
-