Annotation Interface Grpc.Bidirectional

Enclosing interface:
Grpc

@Target(METHOD) @Retention(RUNTIME) @GrpcMethod(BIDI_STREAMING) @Documented @Inherited public static @interface Grpc.Bidirectional
An annotation to mark a method as representing a bi-directional streaming gRPC method.

Declarative gRPC methods support these signatures:

  • Stream<Res> method(Stream<Req>)
  • StreamObserver<Req> method(StreamObserver<Res>)
Declarative streaming methods use resource-owning streams with transport backpressure and cancellation. The runtime owns and closes request streams supplied to server endpoints and generated clients. A response stream returned by a server endpoint transfers ownership to the runtime. A generated-client caller owns a returned response stream and must close it when it stops before normal exhaustion.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Obtain the name of the method.
  • Element Details

    • value

      String value
      Obtain the name of the method.

      If not set the name of the actual annotated method is used.

      Returns:
      name of the method
      Default:
      ""