Package io.grpc.protobuf.services
Class BinaryLogProvider
- java.lang.Object
-
- io.grpc.BinaryLog
-
- io.grpc.protobuf.services.BinaryLogProvider
-
-
Field Summary
Fields Modifier and Type Field Description static MethodDescriptor.Marshaller<byte[]>BYTEARRAY_MARSHALLER
-
Constructor Summary
Constructors Constructor Description BinaryLogProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()protected abstract ClientInterceptorgetClientInterceptor(java.lang.String fullMethodName, CallOptions callOptions)Returns aClientInterceptorfor binary logging.protected abstract ServerInterceptorgetServerInterceptor(java.lang.String fullMethodName)Returns aServerInterceptorfor binary logging.ChannelwrapChannel(Channel channel)Wraps a channel to provide binary logging onClientCalls as needed.<ReqT,RespT>
ServerMethodDefinition<?,?>wrapMethodDefinition(ServerMethodDefinition<ReqT,RespT> oMethodDef)Wraps aServerMethodDefinitionsuch that it performs binary logging if needed.
-
-
-
Field Detail
-
BYTEARRAY_MARSHALLER
public static final MethodDescriptor.Marshaller<byte[]> BYTEARRAY_MARSHALLER
-
-
Method Detail
-
wrapChannel
public final Channel wrapChannel(Channel channel)
Wraps a channel to provide binary logging onClientCalls as needed.- Specified by:
wrapChannelin classBinaryLog
-
wrapMethodDefinition
public final <ReqT,RespT> ServerMethodDefinition<?,?> wrapMethodDefinition(ServerMethodDefinition<ReqT,RespT> oMethodDef)
Wraps aServerMethodDefinitionsuch that it performs binary logging if needed.- Specified by:
wrapMethodDefinitionin classBinaryLog
-
getServerInterceptor
@Nullable protected abstract ServerInterceptor getServerInterceptor(java.lang.String fullMethodName)
Returns aServerInterceptorfor 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 alwaysMarshaller<InputStream>. Returnsnullif this method is not binary logged.
-
getClientInterceptor
@Nullable protected abstract ClientInterceptor getClientInterceptor(java.lang.String fullMethodName, CallOptions callOptions)
Returns aClientInterceptorfor 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 alwaysMarshaller<InputStream>. Returnsnullif this method is not binary logged.
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-
-