class RPCMessage
(source)
Decoded RPC message, making elements of the message available directly.
RPCMessage(messageBytes: Bytes)
Default constructor |
fun <T : Any> asJSON(objectMapper: ObjectMapper, clazz: Class<T>): T
Provides the body of the message, marshalled as a JSON object. |
|
fun asString(): String
Provides the body of the message as a UTF-8 string. |
|
fun body(): Bytes
Provides the body of the message. |
|
fun bodyType(): BodyType
Provides the type of the body of the message: a binary message, a UTF-8 string or a JSON message. |
|
fun getErrorBody(objectMapper: ObjectMapper): Optional<RPCErrorBody> |
|
fun getException(objectMapper: ObjectMapper): Optional<RPCRequestFailedException> |
|
fun isErrorMessage(): Boolean |
|
fun isSuccessfulLastMessage(): Boolean |
|
fun lastMessageOrError(): Boolean
Indicates if the message is either the last in the stream or an error message. |
|
fun requestNumber(): Int
Provides the request number of the message. |
|
fun rpcFlags(): Byte
Provide the RPC flags set on the message. |
|
fun stream(): Boolean
Indicates if the message is part of a stream. |