RefreshScreenEventSchema

@Serializable
@SerialName(value = "RefreshScreen")
data class RefreshScreenEventSchema(val id: String, val trigger: EventTrigger, val events: SerializableImmutableList<EventSchema>?, val method: HttpMethod = HttpMethod.GET, val body: AnySerializable?, val headers: Map<String, String>?, val timeoutMillis: Long? = null) : EventSchema

Refetches the screen this event lives in and applies the result to it. The screen is moved to its initial (loading) state, then to success with the new content or to its failure state — unlike GetScreen, no extra event is needed to install what came back.

The request targets the screen's own id; method (default GET), body, headers and timeoutMillis shape it.

incomingData consumed: not used.

Triggers fired:

  • OnSuccessEventTrigger — when the screen was fetched and applied; the ScreenModel is passed as incomingData.

  • OnNetworkFailureEventTrigger — when the request failed with an HTTP status and this event declares an event wired to that exact status; the failure is passed as incomingData.

  • OnFailureEventTrigger — every other failure, and also HTTP failures with no status-specific event declared; the Throwable is passed as incomingData. Only one of this and the trigger above fires per failure. Failures are logged, and the screen is left in its failure state either way.

Constructors

Link copied to clipboard
constructor(id: String, trigger: EventTrigger, events: SerializableImmutableList<EventSchema>?, method: HttpMethod = HttpMethod.GET, body: AnySerializable?, headers: Map<String, String>?, timeoutMillis: Long? = null)

Properties

Link copied to clipboard
@SerialName(value = "body")
val body: AnySerializable?
Link copied to clipboard
@SerialName(value = "events")
open override val events: SerializableImmutableList<EventSchema>?

This event's own children — each declaring, via its own trigger, which of this event's outgoing triggers runs it. null when this event declares no children.

Link copied to clipboard
@SerialName(value = "headers")
val headers: Map<String, String>?
Link copied to clipboard
@SerialName(value = "id")
open override val id: String

Unique identifier — how TriggerEvent/UpdateEvents address this event by id. Defaults to a random id when omitted from the DSL.

Link copied to clipboard
@SerialName(value = "method")
val method: HttpMethod
Link copied to clipboard
@SerialName(value = "timeoutMillis")
val timeoutMillis: Long?
Link copied to clipboard
@SerialName(value = "trigger")
open override val trigger: EventTrigger

The condition that must occur for this event to run — matched by structural equality (data class/data object equality) against whatever trigger value fired, never by any kind of subscription or listener registry.