Package com.baidu.disconf.client.common.annotations

Examples of com.baidu.disconf.client.common.annotations.DisconfUpdateService


        //
        Set<Class<?>> disconfUpdateServiceSet = scanModel
                .getDisconfUpdateService();
        for (Class<?> disconfUpdateServiceClass : disconfUpdateServiceSet) {

            DisconfUpdateService disconfUpdateService = disconfUpdateServiceClass
                    .getAnnotation(DisconfUpdateService.class);

            //
            // 校验是否有继承正确,是否继承IDisconfUpdate
            //
            if (!ScanVerify.hasIDisconfUpdate(disconfUpdateServiceClass)) {
                continue;
            }

            //
            // 回调函数需要实例化出来,这里
            // 非Spring直接New
            // Spring要GetBean
            //

            IDisconfUpdate iDisconfUpdate = null;

            //
            // Spring方式
            try {

                iDisconfUpdate = getSpringBean(disconfUpdateServiceClass);

            } catch (Exception e) {
                LOGGER.warn(e.toString());
            }

            //
            // 非Spring方式
            if (iDisconfUpdate == null) {
                try {

                    iDisconfUpdate = (IDisconfUpdate) disconfUpdateServiceClass
                            .newInstance();

                } catch (Exception e) {

                    LOGGER.error("Your class "
                            + disconfUpdateServiceClass.toString()
                            + " cannot new instance. " + e.toString());
                    continue;
                }
            }

            //
            // 配置项
            //
            List<String> itemKeys = Arrays.asList(disconfUpdateService
                    .itemKeys());

            // 反索引
            for (String key : itemKeys) {

                DisconfKey disconfKey = new DisconfKey(DisConfigTypeEnum.ITEM,
                        key);
                addOne2InverseMap(disconfKey, inverseMap, iDisconfUpdate);
            }

            //
            // 配置文件
            //
            List<Class<?>> classes = Arrays.asList(disconfUpdateService
                    .classes());

            // 反索引
            for (Class<?> curClass : classes) {
View Full Code Here


        //
        Set<Class<?>> disconfUpdateServiceSet = scanModel
                .getDisconfUpdateService();
        for (Class<?> disconfUpdateServiceClass : disconfUpdateServiceSet) {

            DisconfUpdateService disconfUpdateService = disconfUpdateServiceClass
                    .getAnnotation(DisconfUpdateService.class);

            //
            // 校验是否有继承正确,是否继承IDisconfUpdate
            //
            if (!ScanVerify.hasIDisconfUpdate(disconfUpdateServiceClass)) {
                continue;
            }

            //
            // 回调函数需要实例化出来,这里
            // 非Spring直接New
            // Spring要GetBean
            //

            IDisconfUpdate iDisconfUpdate = null;

            //
            // Spring方式
            try {

                iDisconfUpdate = getSpringBean(disconfUpdateServiceClass);

            } catch (Exception e) {
                LOGGER.warn(e.toString());
            }

            //
            // 非Spring方式
            if (iDisconfUpdate == null) {
                try {

                    iDisconfUpdate = (IDisconfUpdate) disconfUpdateServiceClass
                            .newInstance();

                } catch (Exception e) {

                    LOGGER.error("Your class "
                            + disconfUpdateServiceClass.toString()
                            + " cannot new instance. " + e.toString());
                    continue;
                }
            }

            //
            // 配置项
            //
            List<String> itemKeys = Arrays.asList(disconfUpdateService
                    .itemKeys());

            // 反索引
            for (String key : itemKeys) {

                DisconfKey disconfKey = new DisconfKey(DisConfigTypeEnum.ITEM,
                        key);
                addOne2InverseMap(disconfKey, inverseMap, iDisconfUpdate);
            }

            //
            // 配置文件
            //
            List<Class<?>> classes = Arrays.asList(disconfUpdateService
                    .classes());

            // 反索引
            for (Class<?> curClass : classes) {
View Full Code Here

        //
        Set<Class<?>> disconfUpdateServiceSet = scanModel
                .getDisconfUpdateService();
        for (Class<?> disconfUpdateServiceClass : disconfUpdateServiceSet) {

            DisconfUpdateService disconfUpdateService = disconfUpdateServiceClass
                    .getAnnotation(DisconfUpdateService.class);

            //
            // 校验是否有继承正确,是否继承IDisconfUpdate
            //
            if (!ScanVerify.hasIDisconfUpdate(disconfUpdateServiceClass)) {
                continue;
            }

            //
            // 回调函数需要实例化出来,这里
            // 非Spring直接New
            // Spring要GetBean
            //

            IDisconfUpdate iDisconfUpdate = null;

            //
            // Spring方式
            try {

                iDisconfUpdate = getSpringBean(disconfUpdateServiceClass);

            } catch (Exception e) {
                LOGGER.warn(e.toString());
            }

            //
            // 非Spring方式
            if (iDisconfUpdate == null) {
                try {

                    iDisconfUpdate = (IDisconfUpdate) disconfUpdateServiceClass
                            .newInstance();

                } catch (Exception e) {

                    LOGGER.error("Your class "
                            + disconfUpdateServiceClass.toString()
                            + " cannot new instance. " + e.toString());
                    continue;
                }
            }

            //
            // 配置项
            //
            List<String> itemKeys = Arrays.asList(disconfUpdateService
                    .itemKeys());

            // 反索引
            for (String key : itemKeys) {

                DisconfKey disconfKey = new DisconfKey(DisConfigTypeEnum.ITEM,
                        key);
                addOne2InverseMap(disconfKey, inverseMap, iDisconfUpdate);
            }

            //
            // 配置文件
            //
            List<Class<?>> classes = Arrays.asList(disconfUpdateService
                    .classes());

            // 反索引
            for (Class<?> curClass : classes) {
View Full Code Here

        Map<String, List<IDisconfUpdate>> inverseMap = new HashMap<String, List<IDisconfUpdate>>();
        Set<Class<?>> disconfUpdateServiceSet = scanModel
                .getDisconfUpdateService();
        for (Class<?> disconfUpdateServiceClass : disconfUpdateServiceSet) {

            DisconfUpdateService disconfUpdateService = disconfUpdateServiceClass
                    .getAnnotation(DisconfUpdateService.class);
            List<String> keysList = Arrays.asList(disconfUpdateService.keys());

            //
            // 校验是否有继承正确,是否继承IDisconfUpdate
            //
            if (!ScanVerify.hasIDisconfUpdate(disconfUpdateServiceClass)) {
View Full Code Here

TOP

Related Classes of com.baidu.disconf.client.common.annotations.DisconfUpdateService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.