Class A2aJsonRpcServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
com.xebialabs.xlrelease.a2a.server.A2aJsonRpcServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

public class A2aJsonRpcServlet extends jakarta.servlet.http.HttpServlet
Release's A2A server endpoint: JSON-RPC 2.0 over HTTP, implementing the Phase-0 slice of A2A 1.0 — SendMessage (execute a skill synchronously, answer with a completed or failed task) and GetTask (read a recent task back). Authentication is the surrounding security chain's; the feature toggle is A2aServerEnabledFilter's; read-only enforcement for mutating skills happens here, mirroring what the Agent Card advertises.

Responses are SDK spec types written by A2aServerJson, so the wire shapes are the spec's rather than this class's opinion of them. That matters most for SendMessage, whose result is a oneof: 1.0 wraps it as {"result":{"task":…}}, where 0.3 inlined the task. Error codes come from the SDK's typed errors (-32001 TaskNotFound, -32004 UnsupportedOperation, plus the standard -32600/-32601/-32602/-32603 family).

0.3 callers. A2A negotiates its version with the A2A-Version header and 1.0 renamed every method (message/send → SendMessage). A client that sends the old names is speaking 0.3, and answering it with a bare "method not found" sends an integrator hunting for a typo in a name that is correct for the version their client chose — so those names are recognised and answered with what to send instead. They are not served.

See Also:
  • Field Summary

    Fields inherited from class jakarta.servlet.http.HttpServlet

    LEGACY_DO_HEAD
  • Constructor Summary

    Constructors
    Constructor
    Description
    A2aJsonRpcServlet(A2aSkillRegistry skills, A2aTaskStore taskStore, A2aReleaseTaskMapper releaseTaskMapper, A2aPushNotificationRegistry pushRegistry, BooleanSupplier readOnly)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
     

    Methods inherited from class jakarta.servlet.http.HttpServlet

    doDelete, doGet, doHead, doOptions, doPatch, doPut, doTrace, getLastModified, init, isSensitiveHeader, service, service

    Methods inherited from class jakarta.servlet.GenericServlet

    destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • doPost

      protected void doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException
      Overrides:
      doPost in class jakarta.servlet.http.HttpServlet
      Throws:
      IOException