You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/07/13 23:20:43 UTC

[GitHub] ralf0131 closed pull request #2076: [dubbo-2072]: need javadoc and articles for spring annotation use.

ralf0131 closed pull request #2076: [dubbo-2072]: need javadoc and articles for spring annotation use.
URL: https://github.com/apache/incubator-dubbo/pull/2076
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/annotation/Service.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/annotation/Service.java
index bd47849d8f..de81633d68 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/annotation/Service.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/annotation/Service.java
@@ -16,6 +16,10 @@
  */
 package org.apache.dubbo.config.annotation;
 
+import org.apache.dubbo.common.Constants;
+import org.apache.dubbo.rpc.ExporterListener;
+import org.apache.dubbo.rpc.Filter;
+
 import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Inherited;
@@ -24,7 +28,7 @@
 import java.lang.annotation.Target;
 
 /**
- * Service
+ * Service annotation
  *
  * @export
  */
@@ -34,90 +38,230 @@
 @Inherited
 public @interface Service {
 
+    /**
+     * Interface class, default value is void.class
+     */
     Class<?> interfaceClass() default void.class;
 
+    /**
+     * Interface class name, default value is empty string
+     */
     String interfaceName() default "";
 
+    /**
+     * Service version, default value is empty string
+     */
     String version() default "";
 
+    /**
+     * Service group, default value is empty string
+     */
     String group() default "";
 
+    /**
+     * Service path, default value is empty string
+     */
     String path() default "";
 
-    boolean export() default false;
+    /**
+     * Whether to export service, default value is true
+     */
+    boolean export() default true;
 
+    /**
+     * Service token, default value is false
+     */
     String token() default "";
 
+    /**
+     * Whether the service is deprecated, default value is false
+     */
     boolean deprecated() default false;
 
+    /**
+     * Whether the service is dynamic, default value is false
+     */
     boolean dynamic() default false;
 
+    /**
+     * Access log for the service, default value is ""
+     */
     String accesslog() default "";
 
+    /**
+     * Maximum concurrent executes for the service, default value is 0 - no limits
+     */
     int executes() default 0;
 
+    /**
+     * Whether to register the service to register center, default value is true
+     */
     boolean register() default true;
 
+    /**
+     * Service weight value, default value is 0
+     */
     int weight() default 0;
 
+    /**
+     * Service doc, default value is ""
+     */
     String document() default "";
 
+    /**
+     * Delay time for service registration, default value is 0
+     */
     int delay() default 0;
 
+    /**
+     * @see Service#stub()
+     * @deprecated
+     */
     String local() default "";
 
+    /**
+     * Service stub name, use interface name + Local if not set
+     */
     String stub() default "";
 
+    /**
+     * Cluster strategy, legal values include: failover, failfast, failsafe, failback, forking
+     */
     String cluster() default "";
 
+    /**
+     * How the proxy is generated, legal values include: jdk, javassist
+     */
     String proxy() default "";
 
+    /**
+     * Maximum connections service provider can accept, default value is 0 - connection is shared
+     */
     int connections() default 0;
 
-    int callbacks() default 0;
+    /**
+     * The callback instance limit peer connection
+     *
+     * @see Constants#DEFAULT_CALLBACK_INSTANCES
+     */
+    int callbacks() default Constants.DEFAULT_CALLBACK_INSTANCES;
 
+    /**
+     * Callback method name when connected, default value is empty string
+     */
     String onconnect() default "";
 
+    /**
+     * Callback method name when disconnected, default value is empty string
+     */
     String ondisconnect() default "";
 
+    /**
+     * Service owner, default value is empty string
+     */
     String owner() default "";
 
+    /**
+     * Service layer, default value is empty string
+     */
     String layer() default "";
 
-    int retries() default 0;
-
-    String loadbalance() default "";
-
+    /**
+     * Service invocation retry times
+     *
+     * @see Constants#DEFAULT_RETRIES
+     */
+    int retries() default Constants.DEFAULT_RETRIES;
+
+    /**
+     * Load balance strategy, legal values include: random, roundrobin, leastactive
+     *
+     * @see Constants#DEFAULT_LOADBALANCE
+     */
+    String loadbalance() default Constants.DEFAULT_LOADBALANCE;
+
+    /**
+     * Whether to enable async invocation, default value is false
+     */
     boolean async() default false;
 
+    /**
+     * Maximum active requests allowed, default value is 0
+     */
     int actives() default 0;
 
+    /**
+     * Whether the async request has already been sent, the default value is false
+     */
     boolean sent() default false;
 
+    /**
+     * Service mock name, use interface name + Mock if not set
+     */
     String mock() default "";
 
+    /**
+     * Whether to use JSR303 validation, legal values are: true, false
+     */
     String validation() default "";
 
+    /**
+     * Timeout value for service invocation, default value is 0
+     */
     int timeout() default 0;
 
+    /**
+     * Specify cache implementation for service invocation, legal values include: lru, threadlocal, jcache
+     */
     String cache() default "";
 
+    /**
+     * Filters for service invocation
+     *
+     * @see Filter
+     */
     String[] filter() default {};
 
+    /**
+     * Listeners for service exporting and unexporting
+     *
+     * @see ExporterListener
+     */
     String[] listener() default {};
 
+    /**
+     * Customized parameter key-value pair, for example: {key1, value1, key2, value2}
+     */
     String[] parameters() default {};
 
+    /**
+     * Application spring bean name
+     */
     String application() default "";
 
+    /**
+     * Module spring bean name
+     */
     String module() default "";
 
+    /**
+     * Provider spring bean name
+     */
     String provider() default "";
 
+    /**
+     * Protocol spring bean names
+     */
     String[] protocol() default {};
 
+    /**
+     * Monitor spring bean name
+     */
     String monitor() default "";
 
+    /**
+     * Registry spring bean name
+     */
     String[] registry() default {};
 
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org