public abstract class AbstractJSONObjectConvert extends AbstractWeiXinConvert
clazz
Constructor and Description |
---|
AbstractJSONObjectConvert(Class<?> clazz) |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
checkMatch(com.alibaba.fastjson.JSONObject input,
WeiXinContext context)
根据报文内容进行判断
|
<OUTPUT,INPUT> |
convert(INPUT input,
WeiXinContext context)
转换消息(微信报文会出现不同类型报文字段一致的情况,需要根据上下文判断)
|
protected <OUTPUT> OUTPUT |
convertJSON(com.alibaba.fastjson.JSONObject input,
WeiXinContext context)
转换JSONObject为业务对象
|
protected void |
init()
初始化方法
|
<INPUT> boolean |
isMatch(INPUT input,
WeiXinContext context)
判断转换接口能否处理输入信息(微信报文会出现不同类型报文字段一致的情况,需要根据上下文判断)
|
checkResultType, compareTo, getCalssType, getPriority, setPriority
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getWeiXinConvertMode
public AbstractJSONObjectConvert(Class<?> clazz)
protected void init()
public <INPUT> boolean isMatch(INPUT input, WeiXinContext context)
WeiXinConvert
public <OUTPUT,INPUT> OUTPUT convert(INPUT input, WeiXinContext context)
WeiXinConvert
protected abstract boolean checkMatch(com.alibaba.fastjson.JSONObject input, WeiXinContext context)
input
- context
- protected <OUTPUT> OUTPUT convertJSON(com.alibaba.fastjson.JSONObject input, WeiXinContext context)
OUTPUT
- input
- context
- Copyright © 2006–2018 TinyGroup. All rights reserved.