001/** 002 * Copyright (c) 2015-2022, Michael Yang 杨福海 (fuhai999@gmail.com). 003 * <p> 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * <p> 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * <p> 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package io.jboot.components.rpc; 017 018import io.jboot.components.rpc.annotation.RPCBean; 019 020import java.io.Serializable; 021 022/** 023 * @author Michael Yang 杨福海 (fuhai999@gmail.com) 024 * @version V1.0 025 */ 026public class JbootrpcServiceConfig implements Serializable { 027 028 /** 029 * Service version, default value is empty string 030 */ 031 private String version; 032 033 /** 034 * Service group, default value is empty string 035 */ 036 private String group; 037 038 /** 039 * Service path, default value is empty string 040 */ 041 private String path; 042 043 /** 044 * Whether to export service, default value is true 045 */ 046 private Boolean export; 047 048 /** 049 * Service token, default value is false 050 */ 051 private String token; 052 053 /** 054 * Whether the service is deprecated, default value is false 055 */ 056 private Boolean deprecated; 057 058 059 /** 060 * Whether to register the service to register center, default value is true 061 */ 062 private Boolean register; 063 064 /** 065 * Service weight value, default value is 0 066 */ 067 private Integer weight; 068 069 /** 070 * Service doc, default value is "" 071 */ 072 private String document; 073 074 075 /** 076 * Service invocation retry times 077 */ 078 private int retries; 079 080 /** 081 * Load balance strategy, legal values include: random, roundrobin, leastactive 082 */ 083 private String loadbalance; 084 085 086 /** 087 * Application bean name 088 */ 089 private String application; 090 091 /** 092 * Module bean name 093 */ 094 private String module; 095 096 /** 097 * Provider bean name 098 */ 099 private String provider; 100 101 /** 102 * Protocol bean names 103 */ 104 private String protocol; 105 106 /** 107 * Monitor bean name 108 */ 109 private String monitor; 110 111 /** 112 * Registry bean name 113 */ 114 private String registry; 115 116 /** 117 * Service tag name 118 */ 119 private String tag; 120 121 122 public JbootrpcServiceConfig() { 123 } 124 125 public JbootrpcServiceConfig(RPCBean bean) { 126 RPCUtil.appendAnnotation(RPCBean.class, bean, this); 127 } 128 129 public String getVersion() { 130 return version; 131 } 132 133 public void setVersion(String version) { 134 this.version = version; 135 } 136 137 public String getGroup() { 138 return group; 139 } 140 141 public void setGroup(String group) { 142 this.group = group; 143 } 144 145 public String getPath() { 146 return path; 147 } 148 149 public void setPath(String path) { 150 this.path = path; 151 } 152 153 public boolean isExport() { 154 return export; 155 } 156 157 public void setExport(boolean export) { 158 this.export = export; 159 } 160 161 public String getToken() { 162 return token; 163 } 164 165 public void setToken(String token) { 166 this.token = token; 167 } 168 169 public boolean isDeprecated() { 170 return deprecated; 171 } 172 173 public void setDeprecated(boolean deprecated) { 174 this.deprecated = deprecated; 175 } 176 177 public boolean isRegister() { 178 return register; 179 } 180 181 public void setRegister(boolean register) { 182 this.register = register; 183 } 184 185 public int getWeight() { 186 return weight; 187 } 188 189 public void setWeight(int weight) { 190 this.weight = weight; 191 } 192 193 public String getDocument() { 194 return document; 195 } 196 197 public void setDocument(String document) { 198 this.document = document; 199 } 200 201 public int getRetries() { 202 return retries; 203 } 204 205 public void setRetries(int retries) { 206 this.retries = retries; 207 } 208 209 public String getLoadbalance() { 210 return loadbalance; 211 } 212 213 public void setLoadbalance(String loadbalance) { 214 this.loadbalance = loadbalance; 215 } 216 217 public String getApplication() { 218 return application; 219 } 220 221 public void setApplication(String application) { 222 this.application = application; 223 } 224 225 public String getModule() { 226 return module; 227 } 228 229 public void setModule(String module) { 230 this.module = module; 231 } 232 233 public String getProvider() { 234 return provider; 235 } 236 237 public void setProvider(String provider) { 238 this.provider = provider; 239 } 240 241 public String getProtocol() { 242 return protocol; 243 } 244 245 public void setProtocol(String protocol) { 246 this.protocol = protocol; 247 } 248 249 public String getMonitor() { 250 return monitor; 251 } 252 253 public void setMonitor(String monitor) { 254 this.monitor = monitor; 255 } 256 257 public String getRegistry() { 258 return registry; 259 } 260 261 public void setRegistry(String registry) { 262 this.registry = registry; 263 } 264 265 public String getTag() { 266 return tag; 267 } 268 269 public void setTag(String tag) { 270 this.tag = tag; 271 } 272}