Reject

data class Reject(val code: RejectCode) : AdmissionDecision

Turn the newcomer away with code.

The joiner sees the code's RejectCode.id and its RejectCode.retryable: the wire carries both (v8, Decided 25), and the joiner rebuilds the code with RejectCode.fromWire. So kuilt's own codes arrive whole, and an app's own code — RejectCode is open, so a policy may refuse with one — arrives as RejectCode.Unknown with the same id and retryability: a terminal one stays terminal, and a reconnecting device stops saying Hello. An app code that reuses one of kuilt's ids arrives as kuilt's code, with kuilt's retryability.

Not RejectCode.Superseded. That code tells a joiner another process of its own device took its seat, and the room sends it only with the successor that took it (AdmitMessage.Reject.supersededBy), so a policy cannot. Refusing it here, at construction, keeps the room from building a refusal it could not send: a policy that tries throws inside decide, and the joiner hears RejectCode.AdmissionPolicyFailed. It is refused by id, so an app's own RejectCode.Unknown("superseded") is refused too.

Throws

when code's id is RejectCode.Superseded's, whatever its type.

Constructors

Link copied to clipboard
constructor(code: RejectCode)

Properties

Link copied to clipboard

Why, as the joiner will see it.