Package org.apache.dubbo.config
Class ReferenceConfigBase<T>
java.lang.Object
org.apache.dubbo.config.AbstractConfig
org.apache.dubbo.config.AbstractMethodConfig
org.apache.dubbo.config.AbstractInterfaceConfig
org.apache.dubbo.config.AbstractReferenceConfig
org.apache.dubbo.config.ReferenceConfigBase<T>
- All Implemented Interfaces:
Serializable
Base configuration for the service reference.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionReferenceConfigBase(Reference reference) ReferenceConfigBase(ModuleModel moduleModel) ReferenceConfigBase(ModuleModel moduleModel, Reference reference) -
Method Summary
Modifier and TypeMethodDescriptionabstract voidcheckOrDestroy(long timeout) voiddestroy()static Class<?> determineInterfaceClass(String generic, String interfaceName) Determine the interface of the proxy classstatic Class<?> determineInterfaceClass(String generic, String interfaceName, ClassLoader classLoader) final Tget()abstract Tget(boolean check) getGroup()Class<?> Get proxy interface class of this reference.The new instance of the AbstractConfig subclass should return empty metadata. The purpose is to get the attributes set by the user instead of the default value when theAbstractConfig.refresh()method handles attribute overrides.getMetaData(String prefix) Class<?> Get service interface class of this reference.getUrl()voidsetConsumer(ConsumerConfig consumer) voidsetInterface(Class<?> interfaceClass) voidsetUnloadClusterRelated(Boolean unloadClusterRelated) voidbooleanbooleanMethods inherited from class org.apache.dubbo.config.AbstractReferenceConfig
getClient, getFilter, getGeneric, getLazy, getListener, getProtocol, getProvidedBy, getProviderNamespace, getProviderPort, getReconnect, getReferAsync, getRouter, getSticky, getStubevent, isCheck, isGeneric, isInit, isInjvm, setCheck, setClient, setGeneric, setGeneric, setInit, setInjvm, setLazy, setListener, setOnconnect, setOndisconnect, setProtocol, setProvidedBy, setProviderNamespace, setProviderPort, setReconnect, setReferAsync, setRouter, setStickyMethods inherited from class org.apache.dubbo.config.AbstractInterfaceConfig
addMethod, appendRuntimeParameters, getApplication, getAuth, getAuthenticator, getCallbacks, getCluster, getConfigCenter, getConnections, getExportedUrls, getGroup, getInterface, getInterfaceClassLoader, getLayer, getLocal, getMetadataReportConfig, getMethods, getModule, getMonitor, getOnconnect, getOndisconnect, getOwner, getPassword, getProxy, getRegistries, getRegistry, getRegistryIds, getScope, getSingleton, getSslConfig, getStub, getTag, getUsername, getVersion, setApplication, setAuth, setAuthenticator, setCallbacks, setCluster, setConfigCenter, setConnections, setFilter, setGroup, setInterface, setInterfaceClassLoader, setLayer, setLocal, setLocal, setMetadataReportConfig, setMethods, setMethodsJson, setModule, setMonitor, setMonitor, setOwner, setPassword, setProxy, setRegistries, setRegistry, setRegistryIds, setScope, setSingleton, setStub, setStub, setTag, setUsername, setVersion, toUrl, toUrlsMethods inherited from class org.apache.dubbo.config.AbstractMethodConfig
getActives, getCache, getForks, getLoadbalance, getMerger, getMock, getParameters, getRetries, getScopeModel, getSent, getTimeout, getValidation, isAsync, setActives, setAsync, setCache, setForks, setLoadbalance, setMerger, setMock, setMock, setParameters, setRetries, setSent, setTimeout, setValidationMethods inherited from class org.apache.dubbo.config.AbstractConfig
appendAttributes, appendAttributes, appendParameters, appendParameters, equals, getApplicationModel, getConfigMode, getId, getPluralTagName, getTagName, getTypePrefix, hashCode, isDefault, isNeedRefresh, isRefreshed, isValid, overrideWithConfig, refresh, setDefault, setId, setNeedRefresh, setScopeModel, toString
-
Constructor Details
-
ReferenceConfigBase
public ReferenceConfigBase() -
ReferenceConfigBase
-
ReferenceConfigBase
-
ReferenceConfigBase
-
-
Method Details
-
shouldCheck
public boolean shouldCheck() -
shouldInit
public boolean shouldInit() -
getPrefixes
- Overrides:
getPrefixesin classAbstractConfig
-
getMetaData
Description copied from class:AbstractConfigThe new instance of the AbstractConfig subclass should return empty metadata. The purpose is to get the attributes set by the user instead of the default value when the
AbstractConfig.refresh()method handles attribute overrides.The default value of the field should be set in the
Should be called after Config was fully initialized.AbstractConfig.checkDefault()method, which will be called at the end ofAbstractConfig.refresh(), so that it will not affect the behavior of attribute overrides.Notice! This method should include all properties in the returning map, treat @Parameter differently compared to appendParameters?
// FIXME: this method should be completely replaced by appendParameters? // -- Url parameter may use key, but props override only use property name. So replace it with appendAttributes().- Overrides:
getMetaDatain classAbstractConfig- See Also:
-
getMetaData
- Overrides:
getMetaDatain classAbstractConfig
-
getServiceInterfaceClass
Get service interface class of this reference. The actual service type of remote provider.- Returns:
-
getInterfaceClass
Get proxy interface class of this reference. The proxy interface class is used to create proxy instance.- Returns:
-
determineInterfaceClass
Determine the interface of the proxy class- Parameters:
generic-interfaceName-- Returns:
-
determineInterfaceClass
public static Class<?> determineInterfaceClass(String generic, String interfaceName, ClassLoader classLoader) -
setInterface
-
getUrl
-
setUrl
-
getConsumer
-
setConsumer
-
getUnloadClusterRelated
-
setUnloadClusterRelated
-
getServiceMetadata
-
getUniqueServiceName
-
getVersion
- Overrides:
getVersionin classAbstractInterfaceConfig
-
getGroup
- Overrides:
getGroupin classAbstractInterfaceConfig
-
shouldReferAsync
-
get
-
checkOrDestroy
public abstract void checkOrDestroy(long timeout) -
get
-
destroy
public void destroy()
-