interceptAgentBeforeClosed
fun <TFeature : Any> interceptAgentBeforeClosed(context: InterceptContext<TFeature>, handle: suspend TFeature.(eventContext: AgentBeforeCloseContext) -> Unit)(source)
Intercepts and sets a handler to be invoked before an agent is closed.
Parameters
TFeature
The type of feature this handler is associated with.
context
The context containing details about the feature and its implementation.
handle
A suspendable function that is executed during the agent's pre-close phase. The function receives the feature instance and the event context as parameters.
Example:
pipeline.interceptAgentBeforeClosed(InterceptContext) { eventContext ->
// Handle agent run before close event.
}
Content copied to clipboard