shikeying
2024-01-11 3b67e947e36133e2a40eb2737b15ea375e157ea0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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;
    }
}