Interface ResponseAction<RespT>

All Known Subinterfaces:
TerminatingResponseAction<RespT>

public interface ResponseAction<RespT>
Interface defining a single action, which can interact with the StreamObserver.
Author:
Fadelis
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(io.grpc.stub.StreamObserver<RespT> responseObserver)
    Execute a response action on the StreamObserver.
    default boolean
    Determines if the ResponseAction is a terminating action.
  • Method Details

    • execute

      void execute(@Nonnull io.grpc.stub.StreamObserver<RespT> responseObserver)

      Execute a response action on the StreamObserver.

      It can be either sending a response via StreamObserver.onNext(V) or returning an error via StreamObserver.onError(java.lang.Throwable).

    • isTerminating

      default boolean isTerminating()
      Determines if the ResponseAction is a terminating action. By default it is false and will be true for exception actions, which terminate the gRPC call.