Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想验证呼叫并可能在服务器拦截器中回答错误。有没有办法做到这一点?如果是,我该如何实现?
简单地从拦截器响应 RPC,可能通过调用close(),而不是调用next. 您仍然需要返回一个侦听器,但这可以简单地是new ServerCall.Listener() {}.
close()
next
new ServerCall.Listener() {}