Package io.deephaven.server.arrow
Class ClientAcceptCompressionInterceptor
java.lang.Object
io.deephaven.server.arrow.ClientAcceptCompressionInterceptor
- All Implemented Interfaces:
io.grpc.ServerInterceptor
@Singleton
public class ClientAcceptCompressionInterceptor
extends Object
implements io.grpc.ServerInterceptor
Captures the compression types a client accepts, as listed in its
grpc-accept-encoding header, so that
Barrage handlers can pick a response compression once they know which table is being sent.
The value lives in the call's gRPC Context, which gRPC attaches only on the thread that handles the call. A
handler that picks the compression on another thread captures Context.current() at entry and calls
acceptedCompression() within it, for example with Context.run(Runnable).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<ReqT,RespT>
io.grpc.ServerCall.Listener<ReqT> interceptCall(io.grpc.ServerCall<ReqT, RespT> call, io.grpc.Metadata headers, io.grpc.ServerCallHandler<ReqT, RespT> next)
-
Constructor Details
-
ClientAcceptCompressionInterceptor
@Inject public ClientAcceptCompressionInterceptor()
-
-
Method Details
-
acceptedCompression
- Returns:
- the compression types the current call's client accepts, or an empty set if it listed none or no call's
Contextis attached
-
interceptCall
public <ReqT,RespT> io.grpc.ServerCall.Listener<ReqT> interceptCall(io.grpc.ServerCall<ReqT, RespT> call, io.grpc.Metadata headers, io.grpc.ServerCallHandler<ReqT, RespT> next) - Specified by:
interceptCallin interfaceio.grpc.ServerInterceptor
-