SimpleLoggingWorkflowInterceptor

A WorkflowInterceptor that just prints all method calls using log.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun <P, S> onInitialState(props: P, snapshot: Snapshot?, workflowScope: CoroutineScope, proceed: (P, Snapshot?, CoroutineScope) -> S, session: WorkflowInterceptor.WorkflowSession): S

Intercepts calls to StatefulWorkflow.initialState.

Link copied to clipboard
open override fun <P, S> onPropsChanged(old: P, new: P, state: S, proceed: (P, P, S) -> S, session: WorkflowInterceptor.WorkflowSession): S

Intercepts calls to StatefulWorkflow.onPropsChanged.

Link copied to clipboard
open override fun <P, S, O, R> onRender(renderProps: P, renderState: S, context: BaseRenderContext<P, S, O>, proceed: (P, S, WorkflowInterceptor.RenderContextInterceptor<P, S, O>?) -> R, session: WorkflowInterceptor.WorkflowSession): R

Intercepts calls to StatefulWorkflow.render.

Link copied to clipboard

Intercept a full rendering pass which involves rendering then snapshotting the workflow tree. This is useful for tracing purposes.

Link copied to clipboard

Called to report the outcome of each tick of the runtime loop. In the simplest case this is the application of one action and one render pass, but optimizations can change that:

Link copied to clipboard
open override fun onSessionStarted(workflowScope: CoroutineScope, session: WorkflowInterceptor.WorkflowSession)

Called when the session is starting, before onInitialState.

Link copied to clipboard
open override fun <S> onSnapshotState(state: S, proceed: (S) -> Snapshot?, session: WorkflowInterceptor.WorkflowSession): Snapshot?

Intercepts calls to StatefulWorkflow.snapshotState.

Link copied to clipboard

Intercept calls to StatefulWorkflow.snapshotState including the children calls. This is useful to intercept a rendering + snapshot traversal for tracing purposes.