A2uiActionInterceptor


fun interface A2uiActionInterceptor


Intercepts, transforms, or drops A2uiUserActions before they are processed by the core layer.

This acts as a middleware pipeline. Multiple interceptors can be registered. The output of one interceptor is passed as the input to the next in the chain. The order of registration dictates the order of execution. It can process both local function actions and server event actions.

Summary

Public functions

suspend A2uiUserAction?

Called before a user action is handled by the core layer.

Public functions

onInterceptAction

suspend fun onInterceptAction(action: A2uiUserAction): A2uiUserAction?

Called before a user action is handled by the core layer.

Note: This method blocks the processing pipeline for the surface. Implementations should be lightweight.

Parameters
action: A2uiUserAction

the incoming user action details.

Returns
A2uiUserAction?

The original action, a transformed/modified action to pass to the next interceptor, or null to consume the action entirely and stop further processing.