CallData
Wrapper around data being serialized through calls.
Has three variants:
Serialized — a normal successful payload encoded in the wire format
T.Binary — a binary payload (streamed via RpcBinaryData).
Error — an error response carrying an integer code, a human-readable message, and an optional typed payload encoded in
T(matching the successful-payload encoding so a transport can reuse the same serialization machinery for both).
The variant is the discriminator. Transports must natively encode and decode each variant rather than smuggling errors through Serialized with out-of-band markers.
Inheritors
Types
Error response. errorCode discriminates the error type — typically a @KsError-bound user code, with sentinels com.monkopedia.ksrpc.KsrpcException.ENDPOINT_NOT_FOUND_CODE and com.monkopedia.ksrpc.KsrpcException.INTERNAL_ERROR_CODE for the built-in cases. errorMessage is human-readable. errorData is the optional typed payload encoded in the wire format's native type T — null when no @KsError binding matched. readSerialized returns errorData (it is the same wire-format T as a Serialized payload — naturally reusable by transports / serializers).
Properties
Functions
Get the RpcBinaryData for the binary data held by this call. If this is not binary data then throws IllegalStateException.
Read the serialized content of this object. If this is binary data then throws IllegalStateException.