注释类型 DubboReference
-
@Documented @Retention(RUNTIME) @Target({FIELD,METHOD,ANNOTATION_TYPE}) public @interface DubboReference
An annotation used for referencing a Dubbo service- 从以下版本开始:
- 2.7.7
-
-
可选元素概要
可选元素 修饰符和类型 可选元素 说明 intactivesMaximum active requests allowed, default value is 0StringapplicationApplication associated namebooleanasyncWhether to enable async invocation, default value is falseStringcacheSpecify cache implementation for service invocation, legal values include: lru, threadlocal, jcacheintcallbacksThe callback instance limit peer connectionbooleancheckCheck if service provider is available during boot up, default value is trueStringclientClient transport type, default value is "netty"StringclusterCluster strategy, you can useClusterRules.FAIL_FAST……intconnectionsMaximum connections service provider can accept, default value is 0 - connection is sharedStringconsumerConsumer associated nameString[]filterFilters for service invocationbooleangenericWhether to enable generic invocation, default value is falseStringgroupService group, default value is empty stringStringidThe idbooleaninitWhether eager initialize the reference bean when all properties are set, default value is falsebooleaninjvmWhen enable, prefer to call local service in the same JVM if it's present, default value is trueClass<?>interfaceClassInterface class, default value is void.classStringinterfaceNameInterface class name, default value is empty stringStringlayerService layer, default value is empty stringbooleanlazyWhether to make connection when the client is created, the default value is falseString[]listenerListeners for service exporting and unexportingStringloadbalanceLoad balance strategy, you can useLoadbalanceRules.RANDOM……StringmergerService mergerMethod[]methodsmethods supportStringmockService mock name, use interface name + Mock if not setStringmoduleModule associated nameStringmonitorMonitor associated nameStringonconnectCallback method name when connected, default value is empty stringStringondisconnectCallback method name when disconnected, default value is empty stringStringownerService owner, default value is empty stringString[]parametersCustomized parameter key-value pair, for example: {key1, value1, key2, value2}StringprotocolThe communication protocol of Dubbo ServiceString[]providedBydeclares which app or service this interface belongs toStringproxyHow the proxy is generated, legal values include: jdk, javassistStringreconnectWhether to reconnect if connection is lost, if not specify, reconnect is enabled by default, and the interval for retry connecting is 2000 msString[]registryRegistry associated nameintretriesService invocation retry timesbooleansentWhether the async request has already been sent, the default value is falseString[]services已过时。usingprovidedBy()booleanstickyWhether to stick to the same node in the cluster, the default value is falseStringstubService stub name, use interface name + Local if not setbooleanstubeventExport an stub service for event dispatch, default value is false.StringtagService tag nameinttimeoutTimeout value for service invocation, default value is 0StringurlService target URL for direct invocation, if this is specified, then registry center takes no effect.StringvalidationWhether to use JSR303 validation, legal values are: true, falseStringversionService version, default value is empty string
-
-
-
元素详细资料
-
interfaceClass
Class<?> interfaceClass
Interface class, default value is void.class- 默认值:
- void.class
-
-
-
interfaceName
String interfaceName
Interface class name, default value is empty string- 默认值:
- ""
-
-
-
version
String version
Service version, default value is empty string- 默认值:
- ""
-
-
-
group
String group
Service group, default value is empty string- 默认值:
- ""
-
-
-
url
String url
Service target URL for direct invocation, if this is specified, then registry center takes no effect.- 默认值:
- ""
-
-
-
client
String client
Client transport type, default value is "netty"- 默认值:
- ""
-
-
-
reconnect
String reconnect
Whether to reconnect if connection is lost, if not specify, reconnect is enabled by default, and the interval for retry connecting is 2000 mssee org.apache.dubbo.remoting.Constants#DEFAULT_RECONNECT_PERIOD
- 默认值:
- ""
-
-
-
proxy
String proxy
How the proxy is generated, legal values include: jdk, javassist- 默认值:
- ""
-
-
-
stub
String stub
Service stub name, use interface name + Local if not set- 默认值:
- ""
-
-
-
cluster
String cluster
Cluster strategy, you can useClusterRules.FAIL_FAST……- 默认值:
- ""
-
-
-
onconnect
String onconnect
Callback method name when connected, default value is empty string- 默认值:
- ""
-
-
-
ondisconnect
String ondisconnect
Callback method name when disconnected, default value is empty string- 默认值:
- ""
-
-
-
owner
String owner
Service owner, default value is empty string- 默认值:
- ""
-
-
-
layer
String layer
Service layer, default value is empty string- 默认值:
- ""
-
-
-
loadbalance
String loadbalance
Load balance strategy, you can useLoadbalanceRules.RANDOM……- 默认值:
- ""
-
-
-
mock
String mock
Service mock name, use interface name + Mock if not set- 默认值:
- ""
-
-
-
validation
String validation
Whether to use JSR303 validation, legal values are: true, false- 默认值:
- ""
-
-
-
cache
String cache
Specify cache implementation for service invocation, legal values include: lru, threadlocal, jcache- 默认值:
- ""
-
-
-
filter
String[] filter
Filters for service invocationsee Filter
- 默认值:
- {}
-
-
-
listener
String[] listener
Listeners for service exporting and unexportingsee ExporterListener
- 默认值:
- {}
-
-
-
parameters
String[] parameters
Customized parameter key-value pair, for example: {key1, value1, key2, value2}- 默认值:
- {}
-
-
-
application
String application
Application associated name- 默认值:
- ""
-
-
-
module
String module
Module associated name- 默认值:
- ""
-
-
-
consumer
String consumer
Consumer associated name- 默认值:
- ""
-
-
-
monitor
String monitor
Monitor associated name- 默认值:
- ""
-
-
-
registry
String[] registry
Registry associated name- 默认值:
- {}
-
-
-
protocol
String protocol
The communication protocol of Dubbo Service- 返回:
- the default value is ""
- 从以下版本开始:
- 2.6.6
- 默认值:
- ""
-
-
-
tag
String tag
Service tag name- 默认值:
- ""
-
-
-
merger
String merger
Service merger- 默认值:
- ""
-
-
-
methods
Method[] methods
methods support- 默认值:
- {}
-
-
-
id
String id
The id- 返回:
- default value is empty
- 从以下版本开始:
- 2.7.3
- 默认值:
- ""
-
-
-
services
String[] services
已过时。usingprovidedBy()- 返回:
- The service names that the Dubbo interface subscribed
- 从以下版本开始:
- 2.7.8
- 另请参阅:
RegistryConstants.SUBSCRIBED_SERVICE_NAMES_KEY
- 默认值:
- {}
-
-
-
providedBy
String[] providedBy
declares which app or service this interface belongs to- 默认值:
- {}
-
-