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 aMcpLogMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.JsonNodedata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.static McpLogMessagefromJson(com.fasterxml.jackson.databind.JsonNode json) Parses a McpLogMessage from the contents of the 'params' object inside a 'notifications/message' message.final inthashCode()Returns a hash code value for this object.level()Returns the value of thelevelrecord component.logger()Returns the value of theloggerrecord component.final StringtoString()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 aMcpLogMessagerecord class.- Parameters:
level- the value for thelevelrecord componentlogger- the value for theloggerrecord componentdata- the value for thedatarecord 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 thelevelrecord component.- Returns:
- the value of the
levelrecord component
-
logger
Returns the value of theloggerrecord component.- Returns:
- the value of the
loggerrecord component
-
data
public com.fasterxml.jackson.databind.JsonNode data()Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-