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
- Alphabetic
- By Inheritance
- InvocationInterceptor
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def intercept[T](request: HttpRequest, method: String, call: Supplier[T]): T
Implementations must invoke
callexactly once and return its result.Implementations must invoke
callexactly once and return its result. An exception thrown bycallmust be propagated unchanged. Any thread local state set up aroundcallmust be restored in afinally, 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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)