@Internal public abstract class BinaryLogProvider extends BinaryLog
Modifier and Type | Field and Description |
---|---|
static MethodDescriptor.Marshaller<byte[]> |
BYTEARRAY_MARSHALLER |
Constructor and Description |
---|
BinaryLogProvider() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected abstract ClientInterceptor |
getClientInterceptor(String fullMethodName,
CallOptions callOptions)
Returns a
ClientInterceptor for binary logging. |
protected abstract ServerInterceptor |
getServerInterceptor(String fullMethodName)
Returns a
ServerInterceptor for binary logging. |
Channel |
wrapChannel(Channel channel)
Wraps a channel to provide binary logging on
ClientCall s as needed. |
<ReqT,RespT> |
wrapMethodDefinition(ServerMethodDefinition<ReqT,RespT> oMethodDef)
Wraps a
ServerMethodDefinition such that it performs binary logging if needed. |
public static final MethodDescriptor.Marshaller<byte[]> BYTEARRAY_MARSHALLER
public final Channel wrapChannel(Channel channel)
ClientCall
s as needed.wrapChannel
in class BinaryLog
public final <ReqT,RespT> ServerMethodDefinition<?,?> wrapMethodDefinition(ServerMethodDefinition<ReqT,RespT> oMethodDef)
ServerMethodDefinition
such that it performs binary logging if needed.wrapMethodDefinition
in class BinaryLog
@Nullable protected abstract ServerInterceptor getServerInterceptor(String fullMethodName)
ServerInterceptor
for binary logging. gRPC is free to cache the interceptor,
so the interceptor must be reusable across calls. At runtime, the request and response
marshallers are always Marshaller<InputStream>
.
Returns null
if this method is not binary logged.@Nullable protected abstract ClientInterceptor getClientInterceptor(String fullMethodName, CallOptions callOptions)
ClientInterceptor
for binary logging. gRPC is free to cache the interceptor,
so the interceptor must be reusable across calls. At runtime, the request and response
marshallers are always Marshaller<InputStream>
.
Returns null
if this method is not binary logged.public void close() throws IOException
IOException