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.annotation;
017
018import java.lang.annotation.*;
019
020@Inherited
021@Retention(RetentionPolicy.RUNTIME)
022@Target({ElementType.TYPE})
023public @interface RPCBean {
024
025    /**
026     * Service version, default value is empty string
027     */
028    String version() default "";
029
030    /**
031     * Service group, default value is empty string
032     */
033    String group() default "";
034
035    /**
036     * Service path, default value is empty string
037     */
038    String path() default "";
039
040    /**
041     * Whether to export service, default value is true
042     */
043    boolean export() default true;
044
045    /**
046     * Service token, default value is false
047     */
048    String token() default "";
049
050    /**
051     * Whether the service is deprecated, default value is false
052     */
053    boolean deprecated() default false;
054
055
056    /**
057     * Whether to register the service to register center, default value is true
058     */
059    boolean register() default true;
060
061    /**
062     * Service weight value, default value is 0
063     */
064    int weight() default 0;
065
066    /**
067     * Service doc, default value is ""
068     */
069    String document() default "";
070
071
072    /**
073     * Service invocation retry times
074     *
075     */
076    int retries() default 2;
077
078    /**
079     * Load balance strategy, legal values include: random, roundrobin, leastactive
080     *
081     */
082    String loadbalance() default "random";
083
084
085    /**
086     * Application bean name
087     */
088    String application() default "";
089
090    /**
091     * Module bean name
092     */
093    String module() default "";
094
095    /**
096     * Provider bean name
097     */
098    String provider() default "";
099
100    /**
101     * Protocol bean names
102     */
103    String[] protocol() default {};
104
105    /**
106     * Monitor bean name
107     */
108    String monitor() default "";
109
110    /**
111     * Registry bean name
112     */
113    String[] registry() default {};
114
115    /**
116     * Service tag name
117     */
118    String tag() default "";
119
120
121    //当一个Service类实现对个接口的时候,可以通过这个排除不暴露某个实现接口
122    Class[] exclude() default Void.class;
123}