Class A2aAgentGatewayImpl
java.lang.Object
com.xebialabs.xlrelease.a2a.gateway.A2aAgentGatewayImpl
- All Implemented Interfaces:
com.xebialabs.xlrelease.a2a.api.A2aAgentGateway
@Component
public class A2aAgentGatewayImpl
extends Object
implements com.xebialabs.xlrelease.a2a.api.A2aAgentGateway
The governed implementation of
A2aAgentGateway: every call passes the A2A feature
toggle and the agent-allowlist check — on the caller-supplied URL and on the service
endpoint the Agent Card names — before any byte leaves the host, and every outcome is logged
with the agent, method and remote task id (never with credentials or payloads).
Policy only: the wire layer is an A2aTransportExtension. When a transport bundle is
installed (e.g. one embedding the official a2a-java SDK as its own private dependencies) it is
used; otherwise the host's minimal built-in A2aProtocolClient is. Either way this class
is the only caller, so a transport can never be reached around the policy checks.
Bridged to plugin bundles through the host API catalog, so a plugin task extension gets this injected and cannot reach an agent any other way.
-
Constructor Summary
ConstructorsConstructorDescriptionA2aAgentGatewayImpl(com.xebialabs.xlrelease.osgi.spring.PluginExtensionRegistry extensionRegistry, A2aCallbacks callbacks) -
Method Summary
Modifier and TypeMethodDescriptioncom.xebialabs.xlrelease.a2a.api.views.A2aTaskViewcancelTask(String agentCardUrl, String taskId, String bearerToken) com.xebialabs.xlrelease.a2a.api.views.A2aTaskViewcom.xebialabs.xlrelease.a2a.api.views.A2aSendResultsendMessage(com.xebialabs.xlrelease.a2a.api.views.A2aSendRequest request)
-
Constructor Details
-
A2aAgentGatewayImpl
@Autowired public A2aAgentGatewayImpl(com.xebialabs.xlrelease.osgi.spring.PluginExtensionRegistry extensionRegistry, A2aCallbacks callbacks)
-
-
Method Details
-
sendMessage
public com.xebialabs.xlrelease.a2a.api.views.A2aSendResult sendMessage(com.xebialabs.xlrelease.a2a.api.views.A2aSendRequest request) - Specified by:
sendMessagein interfacecom.xebialabs.xlrelease.a2a.api.A2aAgentGateway
-
getTask
public com.xebialabs.xlrelease.a2a.api.views.A2aTaskView getTask(String agentCardUrl, String taskId, String bearerToken) - Specified by:
getTaskin interfacecom.xebialabs.xlrelease.a2a.api.A2aAgentGateway
-
cancelTask
public com.xebialabs.xlrelease.a2a.api.views.A2aTaskView cancelTask(String agentCardUrl, String taskId, String bearerToken) - Specified by:
cancelTaskin interfacecom.xebialabs.xlrelease.a2a.api.A2aAgentGateway
-