Record Class McpClientAutoConfiguration.CloseableMcpAsyncClients
java.lang.Object
java.lang.Record
org.springframework.ai.mcp.client.common.autoconfigure.McpClientAutoConfiguration.CloseableMcpAsyncClients
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
- McpClientAutoConfiguration
public static record McpClientAutoConfiguration.CloseableMcpAsyncClients(List<io.modelcontextprotocol.client.McpAsyncClient> clients)
extends Record
implements AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionCloseableMcpAsyncClients(List<io.modelcontextprotocol.client.McpAsyncClient> clients) Creates an instance of aCloseableMcpAsyncClientsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionList<io.modelcontextprotocol.client.McpAsyncClient>clients()Returns the value of theclientsrecord component.voidclose()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CloseableMcpAsyncClients
Creates an instance of aCloseableMcpAsyncClientsrecord class.- Parameters:
clients- the value for theclientsrecord component
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
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). -
clients
Returns the value of theclientsrecord component.- Returns:
- the value of the
clientsrecord component
-