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:
@@ -0,0 +1,39 @@
|
||||
package com.jsowell.netty.factory;
|
||||
|
||||
import com.jsowell.netty.handler.yunkuaichongV2.AbstractYkcHandlerV2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 工厂设计模式
|
||||
* 云快充操作
|
||||
*/
|
||||
@Component
|
||||
public class YKCOperateFactoryV2 {
|
||||
|
||||
@Autowired
|
||||
private Map<String, AbstractYkcHandlerV2> strategyMap;
|
||||
|
||||
/**
|
||||
* 注册
|
||||
* @param str
|
||||
* @param handler
|
||||
*/
|
||||
// public void register(String str, AbstractYkcHandlerV2 handler) {
|
||||
// if (StringUtils.isBlank(str) || Objects.isNull(handler)) {
|
||||
// return;
|
||||
// }
|
||||
// strategyMap.put(str, handler);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
public AbstractYkcHandlerV2 getInvokeStrategy(String name) {
|
||||
return strategyMap.get(name);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user