Constructor and Description |
---|
Contexts() |
Modifier and Type | Method and Description |
---|---|
static <ReqT,RespT> |
interceptCall(Context context,
MethodDescriptor<ReqT,RespT> method,
ServerCall<RespT> call,
Metadata headers,
ServerCallHandler<ReqT,RespT> next)
Make the provided
Context Context.current() for the creation of a listener
to a received call and for all events received by that listener. |
public static <ReqT,RespT> ServerCall.Listener<ReqT> interceptCall(Context context, MethodDescriptor<ReqT,RespT> method, ServerCall<RespT> call, Metadata headers, ServerCallHandler<ReqT,RespT> next)
Context
Context.current()
for the creation of a listener
to a received call and for all events received by that listener.
This utility is expected to be used by ServerInterceptor
implementations that need
to augment the Context
in which the application does work when receiving events from
the client.
context
- to make Context.current()
.method
- being requested by the client.call
- used to send responses to client.headers
- received from client.next
- handler used to create the listener to be wrapped.