Interface HandlerDefinition.Evaluator

All Known Implementing Classes:
Handler.Evaluator, RequestHandler.Evaluator
Enclosing class:
HandlerDefinition

public static interface HandlerDefinition.Evaluator
This interface allows access to the properties defined by arbitrary handler annotations in a uniform way.

Handler annotations must specify the scope of a handler, i.e. for which events and channels the handler should be invoked, and the priority of the handler.

  • Method Details

    • scope

      Returns the information about the events and channels handled by the handler that annotates the given method of the given comonent as a HandlerScope object.

      This method is invoked during object initialization. It may return null if a handler is not supposed to be added for this method during initialization (dynamic handler, see Handler.dynamic()).

      Parameters:
      component - the component
      method - the annotated method
      channelReplacements - replacements for channel classes in the annotation’s channels element
      Returns:
      the scope or null if a handler for the method should not be created
    • priority

      int priority(Annotation annotation)
      Returns the priority defined by the annotation
      Parameters:
      annotation - the annotation
      Returns:
      the priority
    • checkMethodSignature

      static boolean checkMethodSignature(Method method)
      Utility method for checking if the method can be used as handler.
      Parameters:
      method - the method
      Returns:
      the result