(
ServerCall<ReqT, RespT> call, Metadata headers, ServerCallHandler<ReqT, RespT> next)
| 85 | public static ServerInterceptor newPeerIdentifyingServerInterceptor() { |
| 86 | return new ServerInterceptor() { |
| 87 | @Override |
| 88 | public <ReqT, RespT> ServerCall.Listener<ReqT> interceptCall( |
| 89 | ServerCall<ReqT, RespT> call, Metadata headers, ServerCallHandler<ReqT, RespT> next) { |
| 90 | Context context = Context.current(); |
| 91 | PeerUid client = |
| 92 | new PeerUid( |
| 93 | checkNotNull( |
| 94 | call.getAttributes().get(BinderTransport.REMOTE_UID), |
| 95 | "Expected BinderTransport attribute REMOTE_UID was missing. Is this " |
| 96 | + "interceptor installed on an unsupported type of Server?")); |
| 97 | return Contexts.interceptCall(context.withValue(REMOTE_PEER, client), call, headers, next); |
| 98 | } |
| 99 | }; |
| 100 | } |
| 101 |
nothing calls this directly
no test coverage detected