Class ToolExecutionResultMessageSerializer

java.lang.Object
org.bsc.langgraph4j.langchain4j.serializer.std.ToolExecutionResultMessageSerializer
All Implemented Interfaces:
Serializer<dev.langchain4j.data.message.ToolExecutionResultMessage>

public class ToolExecutionResultMessageSerializer extends Object implements Serializer<dev.langchain4j.data.message.ToolExecutionResultMessage>
This class is responsible for serializing and deserializing instances of ToolExecutionResultMessage. It implements the Serializer interface to provide custom serialization logic.
  • Constructor Details

    • ToolExecutionResultMessageSerializer

      public ToolExecutionResultMessageSerializer()
  • Method Details

    • write

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

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