grpc-java
grpc-java copied to clipboard
Tracking Issue for setOnCloseHandler being Experimental
To resolve issue #5895 PR #8452 has been created that adds new ServerCallStreamObserver.setOnFinishHandler(...)
method.
The handler is called by Listener.onComplete
when the call is finished correctly from the server's point of view: either onCompleted()
or onError(Throwable)
has been called, all the messages and trailing metadata have been put on the wire and the stream has been closed.
Several names were proposed for the handler:
-
onCompleteHandler
: derives name fromListener
's method but causes confusion withStreamObserver.onCompleted()
-
onSuccessHandler
: my initial idea, yet also confusing as it can be called also afterStreamObserver.onError(...)
-
onFinishHandler
: current approach, matches well the verb from method's javadoc -
onFinalizeHandler
: would also probably do well