Class BinaryLogProviderImpl

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    class BinaryLogProviderImpl
    extends BinaryLogProvider
    The default implementation of a BinaryLogProvider.
    • Constructor Detail

      • BinaryLogProviderImpl

        public BinaryLogProviderImpl()
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • BinaryLogProviderImpl

        @Deprecated
        public BinaryLogProviderImpl​(BinaryLogSink sink)
                              throws java.io.IOException
        Deprecated.
        Deprecated and will be removed in a future version of gRPC.
        Throws:
        java.io.IOException
      • BinaryLogProviderImpl

        public BinaryLogProviderImpl​(BinaryLogSink sink,
                                     java.lang.String configStr)
                              throws java.io.IOException
        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:
        java.io.IOException - if initialization failed.
    • Method Detail

      • getServerInterceptor

        @Nullable
        public ServerInterceptor getServerInterceptor​(java.lang.String fullMethodName)
        Description copied from class: BinaryLogProvider
        Returns a 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.
        Specified by:
        getServerInterceptor in class BinaryLogProvider
      • getClientInterceptor

        @Nullable
        public ClientInterceptor getClientInterceptor​(java.lang.String fullMethodName,
                                                      CallOptions callOptions)
        Description copied from class: BinaryLogProvider
        Returns a 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.
        Specified by:
        getClientInterceptor in class BinaryLogProvider
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class BinaryLogProvider
        Throws:
        java.io.IOException