java.lang.Object
com.mulesoft.connectors.a2a.internal.server.agent.sse.TaskEvent
All Implemented Interfaces:
Serializable

public class TaskEvent extends Object implements Serializable
Immutable representation of a single SSE event that can be stored in Object Store for cross-worker delivery and client reconnection scenarios. Contains the event type, data payload, and metadata for reliable event replay during resubscription.

Each TaskEvent includes:

  • eventId: unique identifier for the event
  • eventType: SSE event type (task, status-update, artifact-update)
  • eventData: the JSON payload to send to the client
See Also:
  • Constructor Details

    • TaskEvent

      public TaskEvent()
      Default constructor to create an event with generated ID
    • TaskEvent

      public TaskEvent(String eventType, String eventData)
      Creates a TaskEvent with the specified type and data.
      Parameters:
      eventType - the SSE event type (task, status-update, artifact-update)
      eventData - the JSON payload to send to the client
  • Method Details

    • getEventId

      public String getEventId()
    • getEventType

      public String getEventType()
    • getEventData

      public String getEventData()