Record Class McpLogMessage
java.lang.Object
java.lang.Record
dev.langchain4j.mcp.client.logging.McpLogMessage
public record McpLogMessage(McpLogLevel level, String logger, com.fasterxml.jackson.databind.JsonNode data)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionMcpLogMessage
(McpLogLevel level, String logger, com.fasterxml.jackson.databind.JsonNode data) Creates an instance of aMcpLogMessage
record class. -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.JsonNode
data()
Returns the value of thedata
record component.final boolean
Indicates whether some other object is "equal to" this one.static McpLogMessage
fromJson
(com.fasterxml.jackson.databind.JsonNode json) Parses a McpLogMessage from the contents of the 'params' object inside a 'notifications/message' message.final int
hashCode()
Returns a hash code value for this object.level()
Returns the value of thelevel
record component.logger()
Returns the value of thelogger
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
McpLogMessage
public McpLogMessage(McpLogLevel level, String logger, com.fasterxml.jackson.databind.JsonNode data) Creates an instance of aMcpLogMessage
record class.- Parameters:
level
- the value for thelevel
record componentlogger
- the value for thelogger
record componentdata
- the value for thedata
record component
-
-
Method Details
-
fromJson
Parses a McpLogMessage from the contents of the 'params' object inside a 'notifications/message' message. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
level
Returns the value of thelevel
record component.- Returns:
- the value of the
level
record component
-
logger
Returns the value of thelogger
record component.- Returns:
- the value of the
logger
record component
-
data
public com.fasterxml.jackson.databind.JsonNode data()Returns the value of thedata
record component.- Returns:
- the value of the
data
record component
-