Package com.axelor.ai.mcp
Record Class McpConnectionConfig
java.lang.Object
java.lang.Record
com.axelor.ai.mcp.McpConnectionConfig
public record McpConnectionConfig(Long id, String code, String url, AiMcpAuthType authType, String secrets, Integer timeoutSeconds, boolean enabled)
extends Record
Immutable, detached snapshot of the connection data an MCP call needs.
secrets is
decrypted, so toString() redacts it and fingerprint() only ever exposes a
one-way digest.-
Constructor Summary
ConstructorsConstructorDescriptionMcpConnectionConfig(Long id, String code, String url, AiMcpAuthType authType, String secrets, Integer timeoutSeconds, boolean enabled) Creates an instance of aMcpConnectionConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionauthType()Returns the value of theauthTyperecord component.code()Returns the value of thecoderecord component.booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.Changes to any connection-affecting field force a reconnect.static McpConnectionConfigfrom(AiMcpServer c) final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.key()Stable cache key.secrets()Returns the value of thesecretsrecord component.Returns the value of thetimeoutSecondsrecord component.toString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
McpConnectionConfig
public McpConnectionConfig(Long id, String code, String url, AiMcpAuthType authType, String secrets, Integer timeoutSeconds, boolean enabled) Creates an instance of aMcpConnectionConfigrecord class.- Parameters:
id- the value for theidrecord componentcode- the value for thecoderecord componenturl- the value for theurlrecord componentauthType- the value for theauthTyperecord componentsecrets- the value for thesecretsrecord componenttimeoutSeconds- the value for thetimeoutSecondsrecord componentenabled- the value for theenabledrecord component
-
-
Method Details
-
from
-
key
Stable cache key. Every caller builds this from a persisted server. -
fingerprint
Changes to any connection-affecting field force a reconnect. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
code
Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
authType
Returns the value of theauthTyperecord component.- Returns:
- the value of the
authTyperecord component
-
secrets
Returns the value of thesecretsrecord component.- Returns:
- the value of the
secretsrecord component
-
timeoutSeconds
Returns the value of thetimeoutSecondsrecord component.- Returns:
- the value of the
timeoutSecondsrecord component
-
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-