Class JsonRpcSerializer
java.lang.Object
com.mulesoft.connectors.a2a.internal.protocol.JsonRpcSerializer
- All Implemented Interfaces:
org.mule.runtime.api.lifecycle.Initialisable
public class JsonRpcSerializer
extends Object
implements org.mule.runtime.api.lifecycle.Initialisable
-
Field Summary
FieldsFields inherited from interface org.mule.runtime.api.lifecycle.Initialisable
PHASE_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetJsonResponseError(String json) getJsonResponseResult(String json) voidparseAgentCard(String json) parseRpcRequest(InputStream inputStream) toAgentCardJson(AgentCard agentCard) writeJsonErrorResponse(Object id, int code, String message) writeJsonErrorResponse(Object id, int code, String message, Object data) writeJsonRequest(String method, Object params) writeJsonResponse(Object id, InputStream result)
-
Field Details
-
PAYLOAD
- See Also:
-
-
Constructor Details
-
JsonRpcSerializer
public JsonRpcSerializer()
-
-
Method Details
-
writeJsonRequest
-
writeJsonResponse
-
writeJsonErrorResponse
-
writeJsonErrorResponse
-
toJson
-
toAgentCardJson
public String toAgentCardJson(AgentCard agentCard) throws AgentCardDiscoveryException.InvalidAgentCardException -
parseRpcRequest
-
getJsonResponseResult
-
getJsonResponseError
-
parseAgentCard
-
initialise
public void initialise()- Specified by:
initialisein interfaceorg.mule.runtime.api.lifecycle.Initialisable
-