Interface HandlerInterceptor.PreparedHandlerInterceptor
- 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.
A handler-method-specific interceptor plan. Plans are created once and may be invoked concurrently.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HandlerInterceptor.PreparedHandlerInterceptorA prepared no-op policy that proceeds directly to the next function. -
Method Summary
Modifier and TypeMethodDescriptioninterceptHandling(DeserializingMessage message, HandlerDescriptor handler, BiFunction<Object, Object, Object> combiner, HandlerInterceptor.PreparedHandlerFunction next) Intercepts one handling operation using previously prepared handler metadata.default Function<DeserializingMessage, Object> interceptHandling(Function<DeserializingMessage, Object> function, HandlerInvoker invoker) Adapts this prepared interceptor to the original function-based interceptor contract.default booleanWhether this plan can safely wrap a reusableHandlerMethod.
-
Field Details
-
noOp
A prepared no-op policy that proceeds directly to the next function.
-
-
Method Details
-
interceptHandling
Object interceptHandling(DeserializingMessage message, HandlerDescriptor handler, BiFunction<Object, Object, Object> combiner, HandlerInterceptor.PreparedHandlerFunction next) Intercepts one handling operation using previously prepared handler metadata.- Parameters:
message- current messagehandler- the resolved per-message invoker or reusable handler methodcombiner- result combiner supplied to the handlernext- the remaining prepared handling chain- Returns:
- the handling result
-
interceptHandling
default Function<DeserializingMessage, Object> interceptHandling(Function<DeserializingMessage, Object> function, HandlerInvoker invoker) Adapts this prepared interceptor to the original function-based interceptor contract.- Parameters:
function- next handling functioninvoker- resolved handler invoker- Returns:
- an intercepted handling function
-
supportsHandlerMethod
default boolean supportsHandlerMethod()Whether this plan can safely wrap a reusableHandlerMethod. Implementations returningtruemust depend only on the supplied descriptor and message, not on mutable state of a per-message invoker.- Returns:
truewhen the plan supports reusable handler methods
-