Package io.grpc

Class ClientTransportFilter


  • @ExperimentalApi("https://gitub.com/grpc/grpc-java/issues/10652")
    public abstract class ClientTransportFilter
    extends Object
    Listens on the client transport life-cycle events. These filters do not have the capability to modify the channels or transport life-cycle event behavior, but they can be useful hooks for transport observability. Multiple filters may be registered to the client.
    Since:
    1.62.0
    • Constructor Detail

      • ClientTransportFilter

        public ClientTransportFilter()
    • Method Detail

      • transportReady

        public Attributes transportReady​(Attributes transportAttrs)
        Called when a transport is ready to accept traffic (when a connection has been established). The default implementation is a no-op.
        Parameters:
        transportAttrs - current transport attributes
        Returns:
        new transport attributes. Default implementation returns the passed-in attributes intact.
      • transportTerminated

        public void transportTerminated​(Attributes transportAttrs)
        Called when a transport completed shutting down. All resources have been released. All streams have either been closed or transferred off this transport. Default implementation is a no-op
        Parameters:
        transportAttrs - the effective transport attributes, which is what is returned by transportReady(io.grpc.Attributes) of the last executed filter.