Class MessageHandlerAdapter<M extends WeixinMessage>

    • Constructor Detail

      • MessageHandlerAdapter

        public MessageHandlerAdapter()
    • Method Detail

      • canHandle0

        protected boolean canHandle0​(WeixinRequest request,
                                     M message)
        能否处理请求
        Parameters:
        request - 微信请求
        message - 微信消息
        Returns:
        true则执行doHandler0 @
      • doHandle0

        protected abstract WeixinResponse doHandle0​(M message)
        处理请求
        Parameters:
        message - 微信消息
        Returns:
      • weight

        public int weight()
        缺省值为1,存在多个匹配到的MessageHandler则比较weight大小
        Specified by:
        weight in interface WeixinMessageHandler
        Returns:
        权重