trait InvocationInterceptor extends AnyRef

INTERNAL API

Wraps the invocation of each user service method in the generated SDK ScalaHandlerFactory, run synchronously inside intercept on the same thread. Picked up from the request attribute InvocationInterceptor.Key, when not present InvocationInterceptor.NoOp is used. The service instance is created before the request is unmarshalled, outside of the interceptor.

Only that synchronous part is covered. User code that runs later, on other threads, runs outside of the interceptor: continuations of a returned CompletionStage, the stages of a returned Source and the processing of the incoming Source for client and bidirectional streaming methods.

Only called when a user method is invoked. It is not called for an unknown method, an unsupported content type, a unary or server streaming request body that cannot be decoded, or when the instance factory denies the request. For client and bidirectional streaming it is called also when the body is malformed, since the method receives the incoming Source before any element is decoded.

Code generated by 2.5.13 and earlier never calls the interceptor.

Annotations
@InternalStableApi()
Source
InvocationInterceptor.scala
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InvocationInterceptor
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def intercept[T](request: HttpRequest, method: String, call: Supplier[T]): T

    Implementations must invoke call exactly once and return its result.

    Implementations must invoke call exactly once and return its result. An exception thrown by call must be propagated unchanged. Any thread local state set up around call must be restored in a finally, since the thread is shared with other requests.

    request

    the incoming request, its entity is already consumed, or being consumed, and must not be read

    method

    the gRPC method name, without the service name, for example SayHello

    call

    invokes the user service method

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped