1 Star 5 Fork 2

easy4use / hub-link

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
AbstractHubDataHandler.java 1.44 KB
一键复制 编辑 原始数据 按行查看 历史
easy4use 提交于 2021-03-10 00:21 . no commit message
/**
* Project: yui3-common-hub
* Class AbstractHubDataHandler
* Version 1.0
* File Created at 2018年8月14日
* $Id$
*
* Copyright 2010-2015 Yui.com Corporation Limited.
* All rights reserved.
*
* This software is the confidential and proprietary information of
* Yui Personal. ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with Yui.com.
*/
package yui.comn.hub.data.handler;
import java.util.Map;
import javax.annotation.PostConstruct;
import org.apache.commons.lang3.StringUtils;
import yui.comn.hub.model.HubXmlHandlerConfig;
/**
* 抽象数据中转处理
* @author yuyi (1060771195@qq.com)
*/
public abstract class AbstractHubDataHandler implements IHubDataHandler{
protected abstract void doHandle(HubXmlHandlerConfig dataConfig, Map<String, Object> dataMap);
@PostConstruct
public void init() {
if (StringUtils.isNotBlank(getRegisterName())) {
HubDataHandlerRegister.registerHandler(getRegisterName(), this);
}
}
@Override
public Object handle(HubXmlHandlerConfig dataConfig, Map<String, Object> dataMap) {
doHandle(dataConfig, dataMap);
return null;
}
//也可以在类中直接注册
protected String getRegisterName() {
return null;
}
}
Java
1
https://gitee.com/easy4use/hub-link.git
git@gitee.com:easy4use/hub-link.git
easy4use
hub-link
hub-link
master

搜索帮助