All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.binarywang.wx.miniapp.message.WxMaMessageInterceptor Maven / Gradle / Ivy

There is a newer version: 4.6.7.B
Show newest version
package cn.binarywang.wx.miniapp.message;

import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.bean.WxMaMessage;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.common.session.WxSessionManager;

import java.util.Map;

/**
 * 微信消息拦截器,可以用来做验证.
 *
 * @author Binary Wang
 */
public interface WxMaMessageInterceptor {

  /**
   * 拦截微信消息.
   *
   * @param wxMessage      .
   * @param context        上下文,如果handler或interceptor之间有信息要传递,可以用这个
   * @param wxMaService    .
   * @param sessionManager .
   * @return true代表OK,false代表不OK
   * @throws WxErrorException .
   */
  boolean intercept(WxMaMessage wxMessage,
                    Map context,
                    WxMaService wxMaService,
                    WxSessionManager sessionManager) throws WxErrorException;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy