Package org.a2aproject.sdk.spec
Record Class TaskPushNotificationConfig
java.lang.Object
java.lang.Record
org.a2aproject.sdk.spec.TaskPushNotificationConfig
- Record Components:
id- unique identifier (e.g. UUID) for this push notification configurationtaskId- 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(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.).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for constructingTaskPushNotificationConfiginstances. -
Constructor Summary
ConstructorsConstructorDescriptionTaskPushNotificationConfig(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.id()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(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 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
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
taskId
Returns the value of thetaskIdrecord component.- Returns:
- the value of the
taskIdrecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
token
Returns the value of thetokenrecord component.- Returns:
- the value of the
tokenrecord component
-
authentication
Returns the value of theauthenticationrecord component.- Returns:
- the value of the
authenticationrecord component
-
tenant
Returns the value of thetenantrecord component.- Returns:
- the value of the
tenantrecord component
-