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.

@FunctionalInterface public interface StubTransformer
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 AbstractStubs and NOT Channels. To configure channels use the GrpcChannelFactory.

  • Method Summary

    Modifier and Type
    Method
    Description
    transform(String name, AbstractStub<?> stub)
    Transform the given stub using AbstractStub#with... methods.
  • Method Details

    • transform

      AbstractStub<?> transform(String name, AbstractStub<?> stub)
      Transform the given stub using AbstractStub#with... methods.
      Parameters:
      name - The name that was used to create the stub.
      stub - The stub that should be transformed.
      Returns:
      The transformed stub.