Package io.grpc

Interface ServerInterceptor

  • All Known Implementing Classes:
    OrcaMetricReportingServerInterceptor, TransmitStatusRuntimeExceptionInterceptor

    public interface ServerInterceptor
    Interface for intercepting incoming calls before they are dispatched by ServerCallHandler.

    Implementers use this mechanism to add cross-cutting behavior to server-side calls. Common example of such behavior include:

    • Enforcing valid authentication credentials
    • Logging and monitoring call behavior
    • Delegating calls to other servers

    The interceptor may be called for multiple calls by one or more threads without completing the previous ones first. Refer to the ServerCall.Listener docs for more details regarding thread safety of the returned listener.