public class ServerInterceptorAdapter extends Object implements io.grpc.ServerInterceptor
This is implemented as a single gRPC interceptor that runs all Flight server middleware sequentially. Flight middleware instances are stored in the gRPC Context so their state is accessible later.
Modifier and Type | Class and Description |
---|---|
static class |
ServerInterceptorAdapter.KeyFactory<T extends FlightServerMiddleware>
A combination of a middleware Key and factory.
|
Modifier and Type | Field and Description |
---|---|
static io.grpc.Context.Key<Map<FlightServerMiddleware.Key<?>,FlightServerMiddleware>> |
SERVER_MIDDLEWARE_KEY
The
Context.Key that stores the Flight middleware active for a particular call. |
Constructor and Description |
---|
ServerInterceptorAdapter(List<ServerInterceptorAdapter.KeyFactory<?>> factories) |
Modifier and Type | Method and Description |
---|---|
<ReqT,RespT> |
interceptCall(io.grpc.ServerCall<ReqT,RespT> call,
io.grpc.Metadata headers,
io.grpc.ServerCallHandler<ReqT,RespT> next) |
public static final io.grpc.Context.Key<Map<FlightServerMiddleware.Key<?>,FlightServerMiddleware>> SERVER_MIDDLEWARE_KEY
Context.Key
that stores the Flight middleware active for a particular call.
Applications should not use this directly. Instead, see CallContext#getMiddleware(Key)
.
public ServerInterceptorAdapter(List<ServerInterceptorAdapter.KeyFactory<?>> factories)
Copyright © 2023 The Apache Software Foundation. All rights reserved.