public class MacaroonClientInterceptor
extends java.lang.Object
implements io.grpc.ClientInterceptor
Created by Philip Vendil on 2018-02-03.
Constructor and Description |
---|
MacaroonClientInterceptor(MacaroonContext macaroonContext) |
Modifier and Type | Method and Description |
---|---|
<ReqT,RespT> |
interceptCall(io.grpc.MethodDescriptor<ReqT,RespT> method,
io.grpc.CallOptions callOptions,
io.grpc.Channel next)
Intercept
ClientCall creation by the next Channel . |
public MacaroonClientInterceptor(MacaroonContext macaroonContext)
public <ReqT,RespT> io.grpc.ClientCall<ReqT,RespT> interceptCall(io.grpc.MethodDescriptor<ReqT,RespT> method, io.grpc.CallOptions callOptions, io.grpc.Channel next)
ClientCall
creation by the next
Channel
.
Many variations of interception are possible. Complex implementations may return a wrapper
around the result of next.newCall()
, whereas a simpler implementation may just modify
the header metadata prior to returning the result of next.newCall()
.
next.newCall()
must not be called under a different Context
other than the current Context
. The outcome of such usage is undefined and may cause
memory leak due to unbounded chain of Context
s.
interceptCall
in interface io.grpc.ClientInterceptor
method
- the remote method to be called.callOptions
- the runtime options to be applied to this call.next
- the channel which is being intercepted.null
.