Class MultipleMessageHandlerAdapter

    • Constructor Detail

      • MultipleMessageHandlerAdapter

        public MultipleMessageHandlerAdapter​(Class<? extends WeixinMessage>... messageClasses)
    • Method Detail

      • canHandle0

        protected boolean canHandle0​(WeixinRequest request,
                                     WeixinMessage message)
        能否处理请求
        Parameters:
        request - 微信请求
        message - 微信消息
        Returns:
        true则执行doHandler
        Throws:
        WeixinException
      • weight

        public int weight()
        Description copied from interface: WeixinMessageHandler
        用于匹配到多个MessageHandler时权重降序排列,数字越大优先级越高
        Specified by:
        weight in interface WeixinMessageHandler
        Returns:
        权重