Class AsyncManagedExecutorProducer
java.lang.Object
org.a2aproject.sdk.server.common.quarkus.AsyncManagedExecutorProducer
@ApplicationScoped
@Alternative
@Priority(20)
public class AsyncManagedExecutorProducer
extends Object
Alternative executor producer that provides a ManagedExecutor with CDI context propagation.
This producer replaces the default AsyncExecutorProducer so that CDI request context
(and any other registered thread context types) are propagated to the agent executor thread.
This allows @RequestScoped beans to be injected and used inside
AgentExecutor.execute(RequestContext, AgentEmitter).
Priority 20 ensures this alternative takes precedence over the default producer (priority 10).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AsyncManagedExecutorProducer
public AsyncManagedExecutorProducer()
-
-
Method Details
-
init
@PostConstruct public void init() -
produce
-