問題タブ [proto]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
java - Java gRPC は ServerInterceptor からサービス名を取得します
私は gRPC を使用しており、ServerInterceptor からリクエストのサービスの名前を取得する必要がありますが、それは不可能のようです。
基本的にServerInterceptorの実装から、呼び出される ServiceGrpc の名前を (文字列として) 知る必要があります。
serverCall.getMethodDescriptor()を試してみましたが、(Java) サービスの実際の名前ではなく、 protoサービスの名前が返されることに注意してください。
戻り値:
しかし、私はこれが必要です:
ありがとう