Package net.devh.boot.grpc.client.inject
Interface StubTransformer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A stub transformer will be used by the
GrpcClientBeanPostProcessor
to configure the stubs before they are
assigned to their fields. Implementations should only call the AbstractStub#with...
methods on the given
stubs and return that result. Implementations should not use this transformer to replace the stub with a unrelated
other instance.
Note: StubTransformer will only transform AbstractStub
s and NOT Channel
s. To configure
channels use the GrpcChannelFactory
.
-
Method Summary
Modifier and TypeMethodDescriptionAbstractStub<?>
transform
(String name, AbstractStub<?> stub) Transform the given stub usingAbstractStub#with...
methods.
-
Method Details
-
transform
Transform the given stub usingAbstractStub#with...
methods.- Parameters:
name
- The name that was used to create the stub.stub
- The stub that should be transformed.- Returns:
- The transformed stub.
-