public class ReferenceClientImpl extends Object implements ReferenceClient
| Constructor and Description |
|---|
ReferenceClientImpl(SofaRuntimeContext sofaRuntimeContext,
BindingConverterFactory bindingConverterFactory,
BindingAdapterFactory bindingAdapterFactory) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
reference(ReferenceParam<T> referenceParam)
Create a SOFA reference, sample usage:
|
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 in interface 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 in interface ReferenceClientT - The type of the SOFA reference to removereferenceParam - The parameter of the SOFA reference to removepublic void removeReference(Class<?> interfaceClass)
ReferenceClientremoveReference in interface ReferenceClientinterfaceClass - the interface type of the reference componentpublic void removeReference(Class<?> interfaceClass, String uniqueId)
ReferenceClientremoveReference in interface ReferenceClientinterfaceClass - the interface type of the reference componentuniqueId - the uniqueId of the reference componentCopyright © 2021. All rights reserved.