java.lang.Object
org.mockserver.client.A2aMockBuilder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionstatic A2aMockBuildera2aMock()static A2aMockBuilderorg.mockserver.mock.Expectation[]applyTo(MockServerClient client) org.mockserver.mock.Expectation[]build()withAgentCardPath(String path) withAgentDescription(String description) withAgentName(String name) withAgentUrl(String url) withAgentVersion(String version) withDefaultTaskResponse(String response) withPushNotifications(String webhookUrl) Advertise and mock A2A push notifications.Advertise and mock the A2A streaming capability.withStreamingMethod(String method) Override the JSON-RPC method that triggers the streaming response.
-
Method Details
-
a2aMock
-
a2aMock
-
withAgentName
-
withAgentDescription
-
withAgentVersion
-
withAgentUrl
-
withAgentCardPath
-
withDefaultTaskResponse
-
withStreaming
Advertise and mock the A2A streaming capability. When enabled the agent card reportscapabilities.streaming: trueand a streaming JSON-RPC method (defaultmessage/stream, seewithStreamingMethod(String)) returns an SSE stream ofTaskStatusUpdateEventandTaskArtifactUpdateEventchunks, each wrapped in a JSON-RPC 2.0 response envelope. -
withStreamingMethod
Override the JSON-RPC method that triggers the streaming response. The A2A specification usesmessage/stream; the legacy method name istasks/sendSubscribe. ImplieswithStreaming(). -
withPushNotifications
Advertise and mock A2A push notifications. When configured the agent card reportscapabilities.pushNotifications: true, thetasks/pushNotificationConfig/setmethod echoes the registered config, and eachtasks/sendadditionally POSTs the completed task (the A2A push-notification payload) to the supplied webhook URL while still returning the JSON-RPC task response to the caller.- Parameters:
webhookUrl- absolute webhook URL (e.g.http://localhost:1234/a2a/callback)
-
withSkill
-
onTaskSend
-
applyTo
-
build
public org.mockserver.mock.Expectation[] build()
-