Package org.a2aproject.sdk.spec
Class MessageSendConfiguration.Builder
java.lang.Object
org.a2aproject.sdk.spec.MessageSendConfiguration.Builder
- Enclosing class:
- MessageSendConfiguration
Builder for constructing
MessageSendConfiguration instances.
Provides a fluent API for configuring message send behavior with sensible defaults.
-
Method Summary
Modifier and TypeMethodDescriptionacceptedOutputModes(List<String> acceptedOutputModes) Sets the accepted output modes.build()Builds theMessageSendConfiguration.historyLength(@Nullable Integer historyLength) Sets the conversation history length.returnImmediately(@NonNull Boolean returnImmediately) Sets whether the operation should return immediately after creating the task.taskPushNotificationConfig(@Nullable TaskPushNotificationConfig taskPushNotificationConfig) Sets the push notification configuration.
-
Method Details
-
acceptedOutputModes
Sets the accepted output modes.- Parameters:
acceptedOutputModes- list of output modes the client can handle- Returns:
- this builder
-
taskPushNotificationConfig
public MessageSendConfiguration.Builder taskPushNotificationConfig(@Nullable TaskPushNotificationConfig taskPushNotificationConfig) Sets the push notification configuration. Task id should be empty when sending this configuration in a SendMessage request.- Parameters:
taskPushNotificationConfig- configuration for push notifications- Returns:
- this builder
-
historyLength
Sets the conversation history length.- Parameters:
historyLength- number of previous messages to include (must be non-negative)- Returns:
- this builder
- Throws:
IllegalArgumentException- if historyLength is negative
-
returnImmediately
Sets whether the operation should return immediately after creating the task.- Parameters:
returnImmediately- true to return immediately, false to wait for task completion- Returns:
- this builder
-
build
Builds theMessageSendConfiguration.- Returns:
- a new message send configuration instance
-