object GrpcProtocol
INTERNAL API
Core definitions for gRPC protocols.
- Annotations
- @InternalApi()
- Source
- GrpcProtocol.scala
- Alphabetic
- By Inheritance
- GrpcProtocol
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
case class
DataFrame(data: ByteString) extends Frame with Product with Serializable
A data (or message) frame in a gRPC protocol stream.
-
sealed
trait
Frame extends AnyRef
A frame in a logical gRPC protocol stream
-
case class
GrpcProtocolReader(messageEncoding: Codec, decodeSingleFrame: (ByteString) ⇒ ByteString, frameDecoder: Flow[ByteString, Frame, NotUsed]) extends Product with Serializable
Implements the decoding of the gRPC framing from a physical/transport layer.
-
case class
GrpcProtocolWriter(contentType: ContentType, messageEncoding: Codec, encodeFrame: (Frame) ⇒ ChunkStreamPart, encodeDataToResponse: (ByteString, Seq[HttpHeader], Trailer) ⇒ HttpResponse, frameEncoder: Flow[Frame, ChunkStreamPart, NotUsed]) extends Product with Serializable
Implements the encoding of a stream of gRPC Frames into a physical/transport layer.
Implements the encoding of a stream of gRPC Frames into a physical/transport layer.
This maps the logical gRPC frames into a stream of chunks that can be handled by the HTTP/2 or HTTP/1.1 transport layer.
-
case class
TrailerFrame(trailers: List[HttpHeader]) extends Frame with Product with Serializable
A trailer (status headers) frame in a gRPC protocol stream
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( ... ) @native()
-
def
detect(mediaType: MediaType): Option[GrpcProtocol]
Detects which gRPC protocol variant is indicated by a mediatype.
Detects which gRPC protocol variant is indicated by a mediatype.
- returns
a GrpcProtocol matching the request mediatype if known.
-
def
detect(request: HttpRequest): Option[GrpcProtocol]
Detects which gRPC protocol variant is indicated in a request.
Detects which gRPC protocol variant is indicated in a request.
- returns
a GrpcProtocol matching the request mediatype if specified and known.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- 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
-
def
negotiate(request: HttpRequest): Option[(Try[GrpcProtocolReader], GrpcProtocolWriter)]
Calculates the gRPC protocol encoding to use for an interaction with a gRPC client.
Calculates the gRPC protocol encoding to use for an interaction with a gRPC client.
- request
the client request to respond to.
- returns
the protocol reader for the request, and a protocol writer for the response.
-
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( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()