Class TaskRepositoryItem
java.lang.Object
com.mulesoft.connectors.a2a.internal.server.agent.repository.RepositoryItem
com.mulesoft.connectors.a2a.internal.server.agent.repository.TaskRepositoryItem
- All Implemented Interfaces:
Serializable
Repository item that stores task JSON and push notification configs. This replaces the original TaskHistoryItem to provide a
focused storage structure for task data.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTaskRepositoryItem(String contextId) TaskRepositoryItem(String taskJson, List<EffectivePushNotificationConfig> pushNotificationConfigs) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidintGets the streaming context for this task.getTask()static StringgetTaskKey(String taskId) voidsetContextId(String contextId) voidsetHistory(String history) voidsetHistoryLength(int historyLength) voidsetPushNotificationConfigs(List<EffectivePushNotificationConfig> pushNotificationConfigs) voidsetStreamingContext(StreamingContext streamingContext) Sets the streaming context for this task.voidvoidsetTaskState(String taskState)
-
Constructor Details
-
TaskRepositoryItem
public TaskRepositoryItem() -
TaskRepositoryItem
-
TaskRepositoryItem
public TaskRepositoryItem(String taskJson, List<EffectivePushNotificationConfig> pushNotificationConfigs)
-
-
Method Details
-
getPushNotificationConfigs
-
setPushNotificationConfigs
public void setPushNotificationConfigs(List<EffectivePushNotificationConfig> pushNotificationConfigs) -
addPushNotificationConfig
-
clearPushNotificationConfigs
public void clearPushNotificationConfigs() -
getContextId
-
setContextId
-
getTaskState
-
setTaskState
-
getTask
-
setTask
-
getHistory
-
setHistory
-
getHistoryLength
public int getHistoryLength() -
setHistoryLength
public void setHistoryLength(int historyLength) -
getTaskKey
-
getStreamingContext
Gets the streaming context for this task.- Returns:
- Optional containing the streaming context, empty if no streaming context is set
-
setStreamingContext
Sets the streaming context for this task.- Parameters:
streamingContext- the streaming context to set
-