@ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/2132") public abstract class ServerTransportFilter extends Object
Multiple filters maybe registered to a server, in which case the output of a filter is the
input of the next filter. For example, what returned by
transportReady(io.grpc.Attributes) of a filter is
passed to the same method of the next filter, and the last filter's return value is the effective
Grpc defines commonly used attributes.
|Constructor and Description|
|Modifier and Type||Method and Description|
Called when a transport is ready to process streams.
Called when a transport is terminated.
public Attributes transportReady(Attributes transportAttrs)
Note the implementation should always inherit the passed-in attributes using
Attributes.newBuilder(transportAttrs), instead of creating one from scratch.
transportAttrs- current transport attributes
public void transportTerminated(Attributes transportAttrs)
transportAttrs- the effective transport attributes, which is what returned by
transportReady(io.grpc.Attributes)of the last executed filter.