Record Class TaskPushNotificationConfig
java.lang.Object
java.lang.Record
org.a2aproject.sdk.spec.TaskPushNotificationConfig
- Record Components:
id- optional unique identifier (e.g. UUID) for this push notification configuration. When omitted while creating a configuration, the server assigns one.taskId- the unique identifier of the task to receive push notifications forurl- the HTTP/HTTPS endpoint URL to receive push notifications (required)token- optional bearer token for simple authenticationauthentication- optional complex authentication configurationtenant- optional tenant identifier, provided as a path parameter
public record TaskPushNotificationConfig(@Nullable String id, @Nullable String taskId, String url, @Nullable String token, @Nullable AuthenticationInfo authentication, @Nullable String tenant)
extends Record
Push notification configuration associated with a specific task.
This record defines the endpoint and authentication details for receiving task event notifications. When configured, the agent will POST task updates (status changes, artifact additions, completions) to the specified URL as they occur, enabling asynchronous workflows without polling.
Authentication can be provided via either:
- Simple bearer token in the
tokenfield - More complex authentication via
AuthenticationInfo
Used for managing task-specific push notification settings via the push notification
management methods (tasks/pushNotificationConfig/set, tasks/pushNotificationConfig/get, etc.).
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for constructingTaskPushNotificationConfiginstances. -
Constructor Summary
ConstructorsConstructorDescriptionTaskPushNotificationConfig(@Nullable String id, @Nullable String taskId, String url, @Nullable String token, @Nullable AuthenticationInfo authentication, @Nullable String tenant) Compact constructor for validation. -
Method Summary
Modifier and TypeMethodDescription@Nullable AuthenticationInfoReturns the value of theauthenticationrecord component.builder()Create a new Builderbuilder(TaskPushNotificationConfig config) Create a new Builder initialized with values from an existing TaskPushNotificationConfig.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Stringid()Returns the value of theidrecord component.@Nullable StringtaskId()Returns the value of thetaskIdrecord component.@Nullable Stringtenant()Returns the value of thetenantrecord component.@Nullable Stringtoken()Returns the value of thetokenrecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
TaskPushNotificationConfig
public TaskPushNotificationConfig(@Nullable String id, @Nullable String taskId, String url, @Nullable String token, @Nullable AuthenticationInfo authentication, @Nullable String tenant) Compact constructor for validation. Validates that required parameters are not null.- Parameters:
id- the optional configuration identifiertaskId- the task identifierurl- the notification endpoint URLtoken- optional bearer tokenauthentication- optional authentication infotenant- the tenant identifier
-
-
Method Details
-
builder
Create a new Builder- Returns:
- the builder
-
builder
Create a new Builder initialized with values from an existing TaskPushNotificationConfig.- Parameters:
config- the TaskPushNotificationConfig to copy values from- Returns:
- the builder
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
id
-
taskId
-
url
-
token
-
authentication
Returns the value of theauthenticationrecord component.- Returns:
- the value of the
authenticationrecord component
-
tenant
-