public class GrpcClientBeanPostProcessor extends Object implements org.springframework.beans.factory.config.BeanPostProcessor
| 构造器和说明 |
|---|
GrpcClientBeanPostProcessor(org.springframework.context.ApplicationContext applicationContext) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected List<io.grpc.ClientInterceptor> |
interceptorsFromAnnotation(GrpcClient annotation) |
Object |
postProcessBeforeInitialization(Object bean,
String beanName) |
protected <T> T |
processInjectionPoint(Member injectionTarget,
Class<T> injectionType,
GrpcClient annotation)
Processes the given injection point and computes the appropriate value for the injection.
|
protected <T> T |
valueForMember(Member injectionTarget,
Class<T> injectionType,
io.grpc.Channel channel)
Creates the instance to be injected for the given member.
|
public GrpcClientBeanPostProcessor(org.springframework.context.ApplicationContext applicationContext)
public Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessBeforeInitialization 在接口中 org.springframework.beans.factory.config.BeanPostProcessororg.springframework.beans.BeansExceptionprotected <T> T processInjectionPoint(Member injectionTarget, Class<T> injectionType, GrpcClient annotation)
T - The type of the value to be injected.injectionTarget - The target of the injection.injectionType - The class that will be used to compute injection.annotation - The annotation on the target with the metadata for the injection.protected List<io.grpc.ClientInterceptor> interceptorsFromAnnotation(GrpcClient annotation) throws org.springframework.beans.BeansException
org.springframework.beans.BeansExceptionprotected <T> T valueForMember(Member injectionTarget, Class<T> injectionType, io.grpc.Channel channel) throws org.springframework.beans.BeansException
T - The type of the instance to be injected.injectionTarget - The target member for the injection.injectionType - The class that should injected.channel - The channel that should be used to create the instance.org.springframework.beans.BeansException - If the value of the field could not be created or the type of the field is unsupported.Copyright © 2019 Nity. All rights reserved.