Class A2aSendRequest
java.lang.Object
com.xebialabs.xlrelease.a2a.api.views.A2aSendRequest
A request to send one message to an external A2A agent through the governed gateway.
Deliberately protocol-shaped, not protocol-typed: plain Java values only, so callers depend on this class and never on A2A wire or SDK types. Immutable.
-
Constructor Summary
ConstructorsConstructorDescriptionA2aSendRequest(String agentCardUrl, String skillId, String text, String contextId, String taskId, Map<String, Object> metadata, String bearerToken) Binary-compatibility constructor for bundles built before push-notification support.A2aSendRequest(String agentCardUrl, String skillId, String text, String contextId, String taskId, Map<String, Object> metadata, String bearerToken, String callbackTaskId) -
Method Summary
Modifier and TypeMethodDescriptionThe waiting Release task to wake via callback, ornull.Nevernull; immutable.getText()static A2aSendRequestStarts new work at an agent: no context, no task, no metadata, no credentials.
-
Constructor Details
-
A2aSendRequest
public A2aSendRequest(String agentCardUrl, String skillId, String text, String contextId, String taskId, Map<String, Object> metadata, String bearerToken, String callbackTaskId) - Parameters:
agentCardUrl- the agent's base URL or its Agent Card URL. The gateway resolves the card at<base>/.well-known/agent-card.jsonunless the value already ends in.json. Must be on the configured agent allowlist.skillId- the advertised skill this message is aimed at; sent as message metadata so the remote agent can route. May benullfor single-skill agents.text- the instruction / payload, sent as a single text part. Required.contextId- A2A context to continue, ornullto let the remote agent open one.taskId- remote task to continue (e.g. answeringinput-required), ornullto start new work.metadata- extra message metadata (e.g. governance fields such as a change reference);nullis treated as empty.bearerToken- static bearer token for the remote agent, ornullfor anonymous access. Never logged.callbackTaskId- the id of the Release task waiting on this exchange, ornull. When set, the gateway attaches a push-notification callback so the remote agent can wake the waiting task instead of being polled.
-
A2aSendRequest
public A2aSendRequest(String agentCardUrl, String skillId, String text, String contextId, String taskId, Map<String, Object> metadata, String bearerToken) Binary-compatibility constructor for bundles built before push-notification support.
-
-
Method Details
-
of
Starts new work at an agent: no context, no task, no metadata, no credentials. -
getAgentCardUrl
-
getSkillId
-
getText
-
getContextId
-
getTaskId
-
getMetadata
Nevernull; immutable. -
getBearerToken
-
getCallbackTaskId
The waiting Release task to wake via callback, ornull.
-