View Javadoc
1   package com.foxinmy.weixin4j.qy.model;
2   
3   import java.io.Serializable;
4   
5   import com.alibaba.fastjson.annotation.JSONCreator;
6   import com.alibaba.fastjson.annotation.JSONField;
7   
8   /**
9    * 调用某些接口时填入的回调信息
10   *
11   * @className Callback
12   * @author jinyu(foxinmy@gmail.com)
13   * @date 2015年3月30日
14   * @since JDK 1.6
15   * @see
16   */
17  public class Callback implements Serializable {
18  
19  	private static final long serialVersionUID = 8575808461248605317L;
20  
21  	/**
22  	 * 企业应用接收企业号推送请求的访问协议和地址,支持http或https协议
23  	 */
24  	private String url;
25  	/**
26  	 * 用于生成签名
27  	 */
28  	private String token;
29  	/**
30  	 * 用于消息体的加密,是AES密钥的Base64编码
31  	 */
32  	@JSONField(name = "encodingaeskey")
33  	private String aesKey;
34  
35  	@JSONCreator
36  	public Callback(@JSONField(name = "url") String url,
37  			@JSONField(name = "token") String token,
38  			@JSONField(name = "aesKey") String aesKey) {
39  		this.url = url;
40  		this.token = token;
41  		this.aesKey = aesKey;
42  	}
43  
44  	public String getUrl() {
45  		return url;
46  	}
47  
48  	public String getToken() {
49  		return token;
50  	}
51  
52  	public String getAesKey() {
53  		return aesKey;
54  	}
55  
56  	@Override
57  	public String toString() {
58  		return "Callback [url=" + url + ", token=" + token + ", aesKey="
59  				+ aesKey + "]";
60  	}
61  }