Class DefaultRequestHandler.Builder
java.lang.Object
org.a2aproject.sdk.server.requesthandlers.DefaultRequestHandler.Builder
- Enclosing class:
- DefaultRequestHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionagentCompletionTimeoutSeconds(int seconds) Sets how long a blocking call waits for agent execution.agentExecutor(AgentExecutor agentExecutor) agentExecutorRouter(@Nullable AgentExecutorRouter agentExecutorRouter) Sets the optionalAgentExecutorRouterfor tenant-based executor resolution.authorizationProvider(@Nullable TaskAuthorizationProvider authorizationProvider) authorizationRequired(boolean authorizationRequired) build()consumptionCompletionTimeoutSeconds(int seconds) Sets how long a blocking call waits for event consumption.eventConsumerExecutor(Executor eventConsumerExecutor) mainEventBusProcessor(MainEventBusProcessor mainEventBusProcessor) populateReferredTasks(boolean populateReferredTasks) pushConfigStore(@Nullable PushNotificationConfigStore pushConfigStore) pushNotificationsEnabled(boolean pushNotificationsEnabled) Sets whether push notifications are enabled via the agent card capabilities.queueManager(QueueManager queueManager) reconciliationTimeoutSeconds(int seconds) Sets how long TaskStore reconciliation polls in blocking calls.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
agentExecutor
-
taskStore
-
queueManager
-
pushConfigStore
public DefaultRequestHandler.Builder pushConfigStore(@Nullable PushNotificationConfigStore pushConfigStore) -
mainEventBusProcessor
public DefaultRequestHandler.Builder mainEventBusProcessor(MainEventBusProcessor mainEventBusProcessor) -
executor
-
eventConsumerExecutor
-
agentCompletionTimeoutSeconds
Sets how long a blocking call waits for agent execution. Defaults to 30 seconds.- Parameters:
seconds- timeout in seconds; zero skips waiting- Returns:
- this builder for chaining
- Throws:
IllegalArgumentException- if the timeout is negative
-
consumptionCompletionTimeoutSeconds
Sets how long a blocking call waits for event consumption. Defaults to 5 seconds.- Parameters:
seconds- timeout in seconds; zero skips waiting- Returns:
- this builder for chaining
- Throws:
IllegalArgumentException- if the timeout is negative
-
reconciliationTimeoutSeconds
Sets how long TaskStore reconciliation polls in blocking calls. Defaults to 1 second.- Parameters:
seconds- timeout in seconds; zero disables reconciliation polling- Returns:
- this builder for chaining
- Throws:
IllegalArgumentException- if the timeout is negative
-
authorizationProvider
public DefaultRequestHandler.Builder authorizationProvider(@Nullable TaskAuthorizationProvider authorizationProvider) -
agentExecutorRouter
public DefaultRequestHandler.Builder agentExecutorRouter(@Nullable AgentExecutorRouter agentExecutorRouter) Sets the optionalAgentExecutorRouterfor tenant-based executor resolution.- Parameters:
agentExecutorRouter- the router, may benull- Returns:
- this builder for method chaining
-
authorizationRequired
-
populateReferredTasks
-
pushNotificationsEnabled
Sets whether push notifications are enabled via the agent card capabilities. When false, push notification configs embedded in sendMessage requests are ignored.- Parameters:
pushNotificationsEnabled- true if the agent supports push notifications- Returns:
- this builder for chaining
-
build
-