package com.walker.tcp.protocol;
|
|
import com.walker.tcp.AuthenticateException;
|
import com.walker.tcp.Message;
|
import com.walker.tcp.ProtocolException;
|
import com.walker.tcp.Request;
|
import com.walker.tcp.Response;
|
|
/**
|
* 描述:通过消息对象实现的协议解析器
|
* @author 时克英
|
* @date 2020年8月21日 上午9:18:49
|
*/
|
|
public class MessageProtocolResolver extends AbstractProtocolResolver<Message> {
|
|
@Override
|
public String getAuthenticateInfo(Request<?> request) throws AuthenticateException {
|
return null;
|
}
|
|
@Override
|
protected String onResolve(Message data, int size) throws ProtocolException {
|
throw new UnsupportedOperationException("还未写代码呢");
|
}
|
|
@Override
|
protected Response<?> doCreateOneResponse() {
|
return null;
|
}
|
|
@Override
|
public boolean isOnlyMatchFeature(){
|
// 目前知道的充电设备使用短报文,通过特征获得报文信息
|
return true;
|
}
|
}
|