统计方法耗时

This commit is contained in:
Guoqs
2024-11-22 09:48:52 +08:00
parent 34b096b2fb
commit 3cd5bb3201
4 changed files with 11 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
package com.jsowell.netty.factory;
import com.jsowell.netty.handler.yunkuaichongV2.AbstractYkcHandlerV2;
import com.jsowell.netty.strategy.ykc.AbstractYkcStrategy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -15,14 +15,14 @@ import java.util.Map;
public class YKCOperateFactoryV2 {
@Autowired
private Map<String, AbstractYkcHandlerV2> strategyMap;
private Map<String, AbstractYkcStrategy> strategyMap;
private static Map<String, String> operationMap = new HashMap<>();
static {
//初始化实现类
operationMap.put("0x01", "loginRequestHandlerV2");
operationMap.put("0x05", "billingTemplateValidateRequestHandlerV2");
operationMap.put("0x01", "loginRequestStrategy");
operationMap.put("0x05", "billingTemplateValidateRequestStrategy");
// more operators
}
@@ -41,7 +41,7 @@ public class YKCOperateFactoryV2 {
/**
* 获取
*/
public AbstractYkcHandlerV2 getInvokeStrategy(String frameType) {
public AbstractYkcStrategy getInvokeStrategy(String frameType) {
String s = operationMap.get(frameType);
return strategyMap.get(s);
}