Expose Server.SERVER_CONTEXT_KEY so that users can implement a Server

Offen
#12,402 4 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@shivaspeaks arbeitet bereits daran.

Seit 03.12.2025.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

api-review enhancement

It seems like a valid goal to want to implement (extend) a Server - there are only a few implementations in grpc-java and I can imagine quite a few alternatives that I wouldn't expect the grpc-java community to want to support. But if you try it you find that the reflection service doesn't work (and therefore I assume potentially other services) because it accesses the current Server via the Server.SERVER_CONTEXT_KEY. If you don't have access to that key you can't set up the context for the reflection service. There is an escape hatch via InternalServer.SERVER_CONTEXT_KEY but that is clearly documented as "not for use outside grpc-java" and annotated with @Internal.

Vorherrschende Sprache
Java
Sterne
12.1k
Forks
4k
Ø Merge
1 T. 20 Std.
Gemergte PRs (30 T.)
43

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus grpc/grpc-java

Alle Issues in grpc/grpc-java

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

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