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

me.chanjar.weixin.cp.api.WxCpMessageInterceptor Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
package me.chanjar.weixin.cp.api;

import me.chanjar.weixin.common.exception.WxErrorException;
import me.chanjar.weixin.common.session.WxSessionManager;
import me.chanjar.weixin.cp.bean.WxCpXmlMessage;

import java.util.Map;

/**
 * 微信消息拦截器,可以用来做验证
 *
 * @author Daniel Qian
 */
public interface WxCpMessageInterceptor {

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

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy