Package com.agentforge4j.starter.mcp
Record Class ToolProperties
java.lang.Object
java.lang.Record
com.agentforge4j.starter.mcp.ToolProperties
- Record Components:
timeout- hard per-invocation timeout; defaults to 30s whennullmaxRetries- maximum retry attempts; defaults to 0 whennullretryBackoff- delay between retries; defaults to zero whennullegress- outbound-egress tunables underagentforge4j.tools.egress.*; may benull
@ConfigurationProperties(prefix="agentforge4j.tools")
public record ToolProperties(Duration timeout, Integer maxRetries, Duration retryBackoff, ToolProperties.Egress egress)
extends Record
Binds
agentforge4j.tools.* configuration: tunables for tool invocation, including the authoritative timeout
enforced by the execution service and the outbound-egress policy.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOutbound-egress tunables. -
Constructor Summary
ConstructorsConstructorDescriptionToolProperties(Duration timeout, Integer maxRetries, Duration retryBackoff, ToolProperties.Egress egress) Creates an instance of aToolPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanegress()Returns the value of theegressrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themaxRetriesrecord component.Returns the value of theretryBackoffrecord component.timeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ToolProperties
public ToolProperties(Duration timeout, Integer maxRetries, Duration retryBackoff, ToolProperties.Egress egress) Creates an instance of aToolPropertiesrecord class.- Parameters:
timeout- the value for thetimeoutrecord componentmaxRetries- the value for themaxRetriesrecord componentretryBackoff- the value for theretryBackoffrecord componentegress- the value for theegressrecord component
-
-
Method Details
-
allowPrivateNetworks
public boolean allowPrivateNetworks()- Returns:
- whether private-network egress is allowed;
false(fail-closed) when unset
-
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). -
timeout
Returns the value of thetimeoutrecord component.- Returns:
- the value of the
timeoutrecord component
-
maxRetries
Returns the value of themaxRetriesrecord component.- Returns:
- the value of the
maxRetriesrecord component
-
retryBackoff
Returns the value of theretryBackoffrecord component.- Returns:
- the value of the
retryBackoffrecord component
-
egress
Returns the value of theegressrecord component.- Returns:
- the value of the
egressrecord component
-