zoukankan      html  css  js  c++  java
  • 【DUBBO】Dubbo:monitor的配置

    【一】:配置项

    <dubbo:monitor protocol="registry"/>
    View Code


    【二】:配置解析器
    -->具体解析器为com.alibaba.dubbo.config.spring.schema.DubboNamespaceHandler配置的com.alibaba.dubbo.config.spring.schema.DubboBeanDefinitionParser、

    【三】:配置目标
    -->这个配置会向IOC容器中注册一个bean,该class为com.alibaba.dubbo.config.MonitorConfig
    -->这个bean描述的是监控的相关配置信息
    -->描述属性:id,protocol(传输协议),address(地址),username(用户名),password( 密码),group(分组),version(版本号),parameters(自定义参数),isDefault(是否缺省)

    【四】类

    /*
     * Copyright 1999-2011 Alibaba Group.
     *  
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *  
     *      http://www.apache.org/licenses/LICENSE-2.0
     *  
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package com.alibaba.dubbo.config;
    
    import java.util.Map;
    
    import com.alibaba.dubbo.config.support.Parameter;
    
    /**
     * MonitorConfig
     * 
     * @author william.liangf
     * @export
     */
    public class MonitorConfig extends AbstractConfig {
        
        private static final long serialVersionUID = -1184681514659198203L;
        
        private String protocol;
        
        private String address;
    
        private String username;
    
        private String password;
    
        private String group;
    
        private String version;
    
        // 自定义参数
        private Map<String, String> parameters;
    
        // 是否为缺省
        private Boolean isDefault;
        
        public MonitorConfig() {
        }
    
        public MonitorConfig(String address) {
            this.address = address;
        }
    
        @Parameter(excluded = true)
        public String getAddress() {
            return address;
        }
    
        public void setAddress(String address) {
            this.address = address;
        }
    
        @Parameter(excluded = true)
        public String getProtocol() {
            return protocol;
        }
    
        public void setProtocol(String protocol) {
            this.protocol = protocol;
        }
    
        @Parameter(excluded = true)
        public String getUsername() {
            return username;
        }
    
        public void setUsername(String username) {
            this.username = username;
        }
    
        @Parameter(excluded = true)
        public String getPassword() {
            return password;
        }
    
        public void setPassword(String password) {
            this.password = password;
        }
    
        public String getGroup() {
            return group;
        }
    
        public void setGroup(String group) {
            this.group = group;
        }
    
        public String getVersion() {
            return version;
        }
    
        public void setVersion(String version) {
            this.version = version;
        }
    
        public Map<String, String> getParameters() {
            return parameters;
        }
    
        public void setParameters(Map<String, String> parameters) {
            checkParameterName(parameters);
            this.parameters = parameters;
        }
    
        public Boolean isDefault() {
            return isDefault;
        }
    
        public void setDefault(Boolean isDefault) {
            this.isDefault = isDefault;
        }
    
    }
    View Code
  • 相关阅读:
    线性代数学习笔记
    机器学习基石笔记
    how to design Programs 学习笔记
    programming-languages学习笔记--第2部分
    P6859 蝴蝶与花 思维 + 数据结构优化
    P6429 [COCI2010-2011#6] STEP 线段树维护最长01
    P1637 三元上升子序列 树状数组优化DP
    线段树模板3.0 区间乘
    CodeForces Global Round 11 B. Chess Cheater 贪心,处理技巧
    CodeForces Global Round 11 A. Avoiding Zero 构造
  • 原文地址:https://www.cnblogs.com/shangxiaofei/p/7803553.html
Copyright © 2011-2022 走看看