grpc / grpc/grpc-java

Tracking Issue for setOnCloseHandler being Experimental

Offen
#8,467 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
experimental API
Vorherrschende Sprache
Java
Sterne
12.1k
Forks
4k
Ø Merge
2 T. 17 Std.
Gemergte PRs (30 T.)
37

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start with issue #5895 and PR #8452, then inspect the proposed ServerCallStreamObserver.setOnFinishHandler(...) API and its discussion of alternative names. Confirm the experimental API's final naming and status, and update this tracking issue only if the linked work leaves a remaining decision or follow-up.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
grpc, java
Bereich
api, backend
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
20/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.