Package dev.restate.sdk.interceptor
Interface RunInterceptor.Factory
- All Known Implementing Classes:
GlobalOpenTelemetryInterceptorFactory,MicrometerInterceptorFactory,OpenTelemetryInterceptorFactory
- Enclosing interface:
RunInterceptor
- 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
RunInterceptor.
Factories are discovered via ServiceLoader (global defaults) or registered
explicitly via HandlerRunner.Options.addRunInterceptorFactory(RunInterceptor.Factory).
-
Method Summary
Modifier and TypeMethodDescriptionstatic RunInterceptorcombine(Collection<? extends RunInterceptor.Factory> factories) static RunInterceptorcombine(Stream<? extends RunInterceptor.Factory> factories) Combine multiple factories into a singleRunInterceptor.@Nullable RunInterceptorCreateRunInterceptor.
-
Method Details
-
createRunInterceptor
@Nullable RunInterceptor createRunInterceptor()CreateRunInterceptor. 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 singleRunInterceptor.The first is outermost, the last is innermost.
-
combine
-