Class ToolExecutionRequestSerializer

java.lang.Object
org.bsc.langgraph4j.langchain4j.serializer.std.ToolExecutionRequestSerializer
All Implemented Interfaces:
Serializer<dev.langchain4j.agent.tool.ToolExecutionRequest>, NullableObjectSerializer<dev.langchain4j.agent.tool.ToolExecutionRequest>

public class ToolExecutionRequestSerializer extends Object implements NullableObjectSerializer<dev.langchain4j.agent.tool.ToolExecutionRequest>
The ToolExecutionRequestSerializer class implements the Serializer interface for the ToolExecutionRequest type. It provides methods to serialize and deserialize ToolExecutionRequest objects.
  • Constructor Details

    • ToolExecutionRequestSerializer

      public ToolExecutionRequestSerializer()
  • Method Details

    • write

      public void write(dev.langchain4j.agent.tool.ToolExecutionRequest object, ObjectOutput out) throws IOException
      Serializes the given ToolExecutionRequest object to the provided ObjectOutput.
      Specified by:
      write in interface Serializer<dev.langchain4j.agent.tool.ToolExecutionRequest>
      Parameters:
      object - the ToolExecutionRequest object to serialize
      out - the ObjectOutput to write the serialized data to
      Throws:
      IOException - if an I/O error occurs during serialization
    • read

      public dev.langchain4j.agent.tool.ToolExecutionRequest read(ObjectInput in) throws IOException, ClassNotFoundException
      Deserializes a ToolExecutionRequest object from the provided ObjectInput.
      Specified by:
      read in interface Serializer<dev.langchain4j.agent.tool.ToolExecutionRequest>
      Parameters:
      in - the ObjectInput to read the serialized data from
      Returns:
      the deserialized ToolExecutionRequest object
      Throws:
      IOException - if an I/O error occurs during deserialization
      ClassNotFoundException - if the class of a serialized object cannot be found