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 Summary
-
Method Summary
Modifier and TypeMethodDescriptiondev.langchain4j.data.message.ToolExecutionResultMessage
read
(ObjectInput in) Deserializes a ToolExecutionResultMessage object from the provided ObjectInput stream.void
write
(dev.langchain4j.data.message.ToolExecutionResultMessage object, ObjectOutput out) Serializes the given ToolExecutionResultMessage object to the provided ObjectOutput stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.bsc.langgraph4j.serializer.Serializer
cloneObject, mimeType, readObject, writeObject
-
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 interfaceSerializer<dev.langchain4j.data.message.ToolExecutionResultMessage>
- Parameters:
object
- the ToolExecutionResultMessage object to serializeout
- 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 interfaceSerializer<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 deserializationClassNotFoundException
- if the class of a serialized object cannot be found
-