Class HandlerInvoker.DelegatingHandlerInvoker

java.lang.Object
io.fluxzero.common.handling.HandlerInvoker.DelegatingHandlerInvoker
All Implemented Interfaces:
HandlerDescriptor, HandlerInvoker
Enclosing interface:
HandlerInvoker

public abstract static class HandlerInvoker.DelegatingHandlerInvoker extends Object implements HandlerInvoker
A HandlerInvoker that delegates all behavior to another instance. This is commonly used to wrap or extend behavior without altering core logic.
  • Field Details

  • Constructor Details

    • DelegatingHandlerInvoker

      public DelegatingHandlerInvoker()
  • Method Details

    • requiresBatchSegmentOrder

      public boolean requiresBatchSegmentOrder()
      Description copied from interface: HandlerInvoker
      Whether asynchronous invocations in one tracked batch must retain the generic message-segment order.

      The default is true. Framework invokers may return false only when they own a stricter ordering mechanism based on the actual state read and written by the invocation.

      Specified by:
      requiresBatchSegmentOrder in interface HandlerInvoker
    • prepareAsyncInvocation

      public Registration prepareAsyncInvocation()
      Description copied from interface: HandlerInvoker
      Registers framework lifecycle state on the dispatching thread before this invocation moves to an asynchronous worker. The returned cleanup runs after invocation or when the worker handoff fails, and must leave lifecycle state that was consumed by the invocation untouched. Cleanup must not throw. The default returns null when no preparation is required. Preparation does not alter invocation-result or result-publication completion; an invoker must express those through its result and the owning publication mechanism.
      Specified by:
      prepareAsyncInvocation in interface HandlerInvoker
    • getTargetClass

      public Class<?> getTargetClass()
      Description copied from interface: HandlerInvoker
      The target class that contains the handler method.
      Specified by:
      getTargetClass in interface HandlerDescriptor
      Specified by:
      getTargetClass in interface HandlerInvoker
      Returns:
      the declaring class of the handler
    • getMethod

      public Executable getMethod()
      Description copied from interface: HandlerInvoker
      The Executable representing the handler method (can be a static or instance Method or Constructor).
      Specified by:
      getMethod in interface HandlerDescriptor
      Specified by:
      getMethod in interface HandlerInvoker
      Returns:
      the executable method
    • getMethodAnnotation

      public <A extends Annotation> A getMethodAnnotation()
      Description copied from interface: HandlerInvoker
      Retrieves a specific annotation from the handler method, if present.
      Specified by:
      getMethodAnnotation in interface HandlerDescriptor
      Specified by:
      getMethodAnnotation in interface HandlerInvoker
      Type Parameters:
      A - the annotation type
      Returns:
      the annotation instance, or null if not found
    • expectResult

      public boolean expectResult()
      Description copied from interface: HandlerInvoker
      Indicates whether the handler method has a return value.

      This is based on the method's signature: if it returns void, this returns false; otherwise, it returns true.

      Specified by:
      expectResult in interface HandlerDescriptor
      Specified by:
      expectResult in interface HandlerInvoker
      Returns:
      true if the method returns a value; false if it is void
    • isPassive

      public boolean isPassive()
      Description copied from interface: HandlerInvoker
      Indicates whether this handler operates in passive mode (i.e., results will not be published).
      Specified by:
      isPassive in interface HandlerDescriptor
      Specified by:
      isPassive in interface HandlerInvoker
      Returns:
      true if passive; otherwise false
    • wasSkipped

      public boolean wasSkipped()
      Description copied from interface: HandlerInvoker
      Indicates whether this invocation was deliberately skipped after handler selection.
      Specified by:
      wasSkipped in interface HandlerInvoker
      Returns:
      true if the underlying handler method was not invoked
    • toString

      public String toString()
      Overrides:
      toString in class Object