接口 CommandHandlerInterceptor<R>


public interface CommandHandlerInterceptor<R>
Intercepts specified command, and can be extended using SPI.
从以下版本开始:
1.8.4
作者:
icodening
另请参阅:
  • SpiLoader
  • Spi
  • 方法详细资料

    • shouldIntercept

      boolean shouldIntercept(String commandName)
      whether to intercept the specified command
      参数:
      commandName - command name, eg. getRules
      返回:
      "true" means intercept, "false" means skip
    • intercept

      CommandResponse<R> intercept(CommandRequest request, CommandRequestExecution<R> execution)
      intercept the given command request, and return a command response
      参数:
      request - commandRequest
      execution - interceptor chain execution
      返回:
      command response