public class ReferenceClientImpl extends Object implements ReferenceClient
| 构造器和说明 |
|---|
ReferenceClientImpl(SofaRuntimeContext sofaRuntimeContext,
BindingConverterFactory bindingConverterFactory,
BindingAdapterFactory bindingAdapterFactory) |
| 限定符和类型 | 方法和说明 |
|---|---|
<T> T |
reference(ReferenceParam<T> referenceParam)
Create a SOFA reference, sample usage:
ReferenceParam<SampleService> referenceParam = new ReferenceParam<SampleService>();
referenceParam3.setInterfaceType(SampleService.class);
SampleService sampleService3 = referenceClient.reference(referenceParam);
|
void |
removeReference(Class<?> interfaceClass)
Remove SOFA references on service dimension
|
void |
removeReference(Class<?> interfaceClass,
String uniqueId)
Remove SOFA references on service dimension
|
<T> void |
removeReference(ReferenceParam<T> referenceParam)
Remove a specified SOFA reference
|
public ReferenceClientImpl(SofaRuntimeContext sofaRuntimeContext, BindingConverterFactory bindingConverterFactory, BindingAdapterFactory bindingAdapterFactory)
public <T> T reference(ReferenceParam<T> referenceParam)
ReferenceClientReferenceParam<SampleService> referenceParam = new ReferenceParam<SampleService>(); referenceParam3.setInterfaceType(SampleService.class); SampleService sampleService3 = referenceClient.reference(referenceParam);
reference 在接口中 ReferenceClientT - The type of the SOFA reference to create.referenceParam - The parameter of the SOFA reference to create.public <T> void removeReference(ReferenceParam<T> referenceParam)
ReferenceClientremoveReference 在接口中 ReferenceClientT - The type of the SOFA reference to removereferenceParam - The parameter of the SOFA reference to removepublic void removeReference(Class<?> interfaceClass)
ReferenceClientremoveReference 在接口中 ReferenceClientinterfaceClass - the interface type of the reference componentpublic void removeReference(Class<?> interfaceClass, String uniqueId)
ReferenceClientremoveReference 在接口中 ReferenceClientinterfaceClass - the interface type of the reference componentuniqueId - the uniqueId of the reference componentCopyright © 2019. All rights reserved.