Package-level declarations
Functions
Moves the screen this event lives in to another state — initialState (its loading state), failureState (its failure state), or successState with the content to display. For success, the content comes from the data passed to successState when set, otherwise from incomingData, which must then be a ScreenModel — typically the one produced by a preceding GetScreen. Dispatches onSuccess (no data) when the state was applied; onFailure (no data, logged) when applying it throws, including a success state with no declared data and no ScreenModel in incomingData.
Screen's failure state — its failureTiles/failureEvents are shown.
Fetches the payload of the screen this event lives in and emits it downstream, without applying it — pair it with ChangeScreenState to decide when and how the fetched content is installed, which is what makes custom loading and error flows possible. The request targets the screen's own id, shaped by method, body, headers and timeoutMillis. Does not consume incomingData. Dispatches onStart before the request is sent; onSuccess (carrying the fetched ScreenModel, ready for ChangeScreenState) when the screen was fetched; onNetworkFailure(status) (carrying the failure) when the request failed with an HTTP status and a child event is wired to that exact status; onFailure (carrying the Throwable, logged) for every other failure and for HTTP failures with no status-specific event declared — only one of the latter two fires per failure.
Screen's loading state — its initialTiles/initialEvents are shown.
Refetches the screen this event lives in and applies the result to it directly — the screen moves to its initial (loading) state, then to success with the new content or to its failure state, unlike GetScreen, which needs a separate event to install what came back. The request targets the screen's own id, shaped by method, body, headers and timeoutMillis. Does not consume incomingData. Dispatches onSuccess (carrying the fetched ScreenModel) when the screen was fetched and applied; onNetworkFailure(status) (carrying the failure) when the request failed with an HTTP status and a child event is wired to that exact status; onFailure (carrying the Throwable, logged) for every other failure and for HTTP failures with no status-specific event declared — only one of the latter two fires per failure, and the screen is left in its failure state either way.
Screen's success state, showing data's content — or, when null, incomingData as the ScreenModel instead.