View Javadoc
1   package com.zone.weixin4j.response;
2   
3   /**
4    * 回复文本消息
5    * 
6    * @className TextResponse
7    * @author jinyu(foxinmy@gmail.com)
8    * @date 2015年5月5日
9    * @since JDK 1.6
10   * @see
11   */
12  public class TextResponse implements WeixinResponse {
13  
14  	/**
15  	 * 回复的消息内容(换行:在content中能够换行,微信客户端就支持换行显示)
16  	 */
17  	private String content;
18  
19  	public TextResponse(String content) {
20  		this.content = content;
21  	}
22  
23  	@Override
24  	public String toContent() {
25  		return String.format("<Content><![CDATA[%s]]></Content>", content);
26  	}
27  
28  	@Override
29  	public String getMsgType() {
30  		return "text";
31  	}
32  
33  	public String getContent() {
34  		return content;
35  	}
36  }