mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
统计方法耗时
This commit is contained in:
@@ -4,6 +4,7 @@ import com.jsowell.netty.handler.yunkuaichongV2.AbstractYkcHandlerV2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -16,6 +17,15 @@ public class YKCOperateFactoryV2 {
|
||||
@Autowired
|
||||
private Map<String, AbstractYkcHandlerV2> strategyMap;
|
||||
|
||||
private static Map<String, String> operationMap = new HashMap<>();
|
||||
|
||||
static {
|
||||
//初始化实现类
|
||||
operationMap.put("0x01", "loginRequestHandlerV2");
|
||||
operationMap.put("0x05", "billingTemplateValidateRequestHandlerV2");
|
||||
// more operators
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册
|
||||
* @param str
|
||||
@@ -30,10 +40,9 @@ public class YKCOperateFactoryV2 {
|
||||
|
||||
/**
|
||||
* 获取
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
public AbstractYkcHandlerV2 getInvokeStrategy(String name) {
|
||||
return strategyMap.get(name);
|
||||
public AbstractYkcHandlerV2 getInvokeStrategy(String frameType) {
|
||||
String s = operationMap.get(frameType);
|
||||
return strategyMap.get(s);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user