Class BinaryLogProviderImpl
java.lang.Object
io.grpc.BinaryLog
io.grpc.protobuf.services.BinaryLogProvider
io.grpc.protobuf.services.BinaryLogProviderImpl
- All Implemented Interfaces:
Closeable, AutoCloseable
The default implementation of a
BinaryLogProvider.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final AtomicLongprivate final BinlogHelper.Factoryprivate final BinaryLogSinkFields inherited from class BinaryLogProvider
BYTEARRAY_MARSHALLER -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.BinaryLogProviderImpl(BinaryLogSink sink, String configStr) Creates an instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()getClientInterceptor(String fullMethodName, CallOptions callOptions) Returns aClientInterceptorfor binary logging.getServerInterceptor(String fullMethodName) Returns aServerInterceptorfor binary logging.Methods inherited from class BinaryLogProvider
wrapChannel, wrapMethodDefinition
-
Field Details
-
counter
-
factory
-
sink
-
-
Constructor Details
-
BinaryLogProviderImpl
- Throws:
IOException
-
BinaryLogProviderImpl
-
BinaryLogProviderImpl
Creates an instance.- Parameters:
sink- ownership is transferred to this class.configStr- config string to parse to determine logged methods and msg size limits.- Throws:
IOException- if initialization failed.
-
-
Method Details
-
getServerInterceptor
Description copied from class:BinaryLogProviderReturns 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.- Specified by:
getServerInterceptorin classBinaryLogProvider
-
getClientInterceptor
@Nullable public ClientInterceptor getClientInterceptor(String fullMethodName, CallOptions callOptions) Description copied from class:BinaryLogProviderReturns 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.- Specified by:
getClientInterceptorin classBinaryLogProvider
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classBinaryLogProvider- Throws:
IOException
-