Package com.qq.weixin.sdk.message

Examples of com.qq.weixin.sdk.message.MessageResultText


    return handleSpecialMessage(message);
  }

  // build result message text
  protected Message buildMessageResultText(String content) {
    MessageResultText messageResultText = new MessageResultText();
    messageResultText.setMsgType(MESSAGE_RESULT_TEXT);
    messageResultText.setContent(content);
    messageResultText.setFromUserName(message.getToUserName());
    messageResultText.setToUserName(message.getFromUserName());
    messageResultText.setFuncFlag(1);//
    messageResultText.setCreateTime(getCurrentUnixTimestamp());
    return messageResultText;
  }
View Full Code Here


*/
public class MessageResultHandlerText extends MessageResultHandlerHelper {

  @Override
  public String buildMessageResult(Message message) {
    MessageResultText messageResultText = (MessageResultText) message;
    StringBuffer buffer = new StringBuffer();
    buffer.append(wrapperContent(TAG_TOUSERNAME, messageResultText.getToUserName(), true))
        .append(wrapperContent(TAG_FROMUSERNAME, messageResultText.getFromUserName(), true))
        .append(wrapperContent(TAG_CREATETIME, messageResultText.getCreateTime() + "", false))
        .append(wrapperContent(TAG_MSGTYPE, messageResultText.getMsgType(), true))
        .append(wrapperContent(TAG_CONTENT, messageResultText.getContent(), true))
        .append(wrapperContent(TAG_FUNCFLAG, messageResultText.getFuncFlag() + "", false));
    return wrapperXmlContent(buffer.toString());
  }
View Full Code Here

TOP

Related Classes of com.qq.weixin.sdk.message.MessageResultText

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.