Class HandlerMethod.DelegatingHandlerMethod<M>

java.lang.Object
io.fluxzero.common.handling.HandlerMethod.DelegatingHandlerMethod<M>
Type Parameters:
M - the message type
All Implemented Interfaces:
HandlerDescriptor, HandlerMethod<M>
Enclosing interface:
HandlerMethod<M>

public abstract static class HandlerMethod.DelegatingHandlerMethod<M> extends Object implements HandlerMethod<M>
A HandlerMethod that delegates all behavior to another instance.
  • Field Details

  • Constructor Details

    • DelegatingHandlerMethod

      public DelegatingHandlerMethod()
  • Method Details

    • getTargetClass

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

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

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

      public boolean expectResult()
      Description copied from interface: HandlerDescriptor
      Indicates whether the handler method has a return value.
      Specified by:
      expectResult in interface HandlerDescriptor
      Returns:
      true if the method returns a value; false if it is void
    • isPassive

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

      public boolean canHandle(M message)
      Description copied from interface: HandlerMethod
      Returns whether this method can handle the supplied message.
      Specified by:
      canHandle in interface HandlerMethod<M>
      Parameters:
      message - the message to check
      Returns:
      true if this handler method can handle the message
    • toString

      public String toString()
      Overrides:
      toString in class Object