grpc / grpc/grpc-java

Tracking Issue for setOnCloseHandler being Experimental

Aperta
#8,467 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
experimental API
Lingua principale
Java
Stelle
12.1k
Fork
4k
Merge medio
2g 17h
PR unite (30g)
37

Descrizione

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 from `Listener`'s method but causes confusion with `StreamObserver.onCompleted()`
- `onSuccessHandler` : my initial idea, yet also confusing as it can be called also after `StreamObserver.onError(...)`
- `onFinishHandler` : current approach, matches well the verb from method's javadoc
- `onFinalizeHandler` : would also probably do well

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.