Class HandlerInterceptor.InterceptedHandler
java.lang.Object
io.fluxzero.sdk.tracking.handling.HandlerInterceptor.InterceptedHandler
- All Implemented Interfaces:
Handler<DeserializingMessage>
- Enclosing interface:
HandlerInterceptor
public static class HandlerInterceptor.InterceptedHandler
extends Object
implements Handler<DeserializingMessage>
Implementation of
Handler that delegates to another handler and applies a HandlerInterceptor.-
Nested Class Summary
Nested classes/interfaces inherited from interface Handler
Handler.DelegatingHandler<M> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInvoker(DeserializingMessage message) Returns aHandlerInvokercapable of processing the given message, if available.getInvokerOrNull(DeserializingMessage message) Returns aHandlerInvokercapable of processing the given message, ornullwhen unavailable.Class<?> Returns the class of the handler's target object.toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Handler
getHandlerMethodOrNull, or
-
Constructor Details
-
InterceptedHandler
public InterceptedHandler()
-
-
Method Details
-
getInvoker
Description copied from interface:HandlerReturns aHandlerInvokercapable of processing the given message, if available.- Specified by:
getInvokerin interfaceHandler<DeserializingMessage>- Parameters:
message- the message to be handled- Returns:
- an optional
HandlerInvokerif this handler can handle the message; otherwiseOptional.empty()
-
getInvokerOrNull
Description copied from interface:HandlerReturns aHandlerInvokercapable of processing the given message, ornullwhen unavailable.This is a lower-allocation counterpart to
Handler.getInvoker(Object)for internal hot paths. Implementations that can resolve an invoker without creating anOptionalshould override this method.- Specified by:
getInvokerOrNullin interfaceHandler<DeserializingMessage>- Parameters:
message- the message to be handled- Returns:
- an invoker if this handler can handle the message;
nullotherwise
-
getTargetClass
Description copied from interface:HandlerReturns the class of the handler's target object. This may be used for reflective operations, logging, or framework-level behavior.- Specified by:
getTargetClassin interfaceHandler<DeserializingMessage>- Returns:
- the class of the handler's target
-
toString
-