public abstract class MetadataInterceptor extends Object implements ServerInterceptor
| Constructor and Description |
|---|
MetadataInterceptor(@NonNull List<String> affectedCalls) |
MetadataInterceptor(@NonNull String affectedCall) |
| Modifier and Type | Method and Description |
|---|---|
abstract <ReqT,RespT> |
intercept(ServerCall<ReqT,RespT> call,
ServerMetadataContainer metadata)
Handle received SiLA Client Metadata
|
<ReqT,RespT> |
interceptCall(ServerCall<ReqT,RespT> call,
Metadata headers,
ServerCallHandler<ReqT,RespT> next)
The actual interception logic: Calls
intercept(ServerCall, ServerMetadataContainer)
and forwards the returned context to the next call handler. |
public MetadataInterceptor(@NonNull
@NonNull String affectedCall)
public abstract <ReqT,RespT> Context intercept(ServerCall<ReqT,RespT> call, ServerMetadataContainer metadata)
ReqT - request typeRespT - response typecall - incoming callmetadata - received SiLA Client MetadataContext.current())Context is ignored when handling metadata during SiLA Binary Uploadpublic final <ReqT,RespT> ServerCall.Listener<ReqT> interceptCall(ServerCall<ReqT,RespT> call, Metadata headers, ServerCallHandler<ReqT,RespT> next)
intercept(ServerCall, ServerMetadataContainer)
and forwards the returned context to the next call handler. On error, the appropriate SiLA Error is issued.interceptCall in interface ServerInterceptorReqT - request typeRespT - response typecall - object to receive response messagesheaders - which can contain extra call metadata from ClientCall.start(io.grpc.ClientCall.Listener<RespT>, io.grpc.Metadata), e.g. authentication
credentials.next - next processor in the interceptor chainCopyright © 2022 SiLA Java Developers. All rights reserved.