Package com.agentforge4j.starter.mcp
Record Class McpProperties.ServerProperties
java.lang.Object
java.lang.Record
com.agentforge4j.starter.mcp.McpProperties.ServerProperties
- Record Components:
id- unique server id (also the connection key)providerId- logical provider id (defaults to"mcp:<id>"when blank)transport-STDIOorSTREAMABLE_HTTP; defaults toSTDIOcommand- executable for stdio transportargs- command-line arguments for stdio transporturl- base URL for streamable HTTP transportenv- environment variables for stdio transportheaders- literal request headers for streamable HTTP transport, sent on every request (for exampleAuthorizationfor hosted servers);nullmeans noneenabled- whether the server is active;nullmeans enabledrequestTimeout- per-request timeout; defaults to 30s whennull
- Enclosing class:
- McpProperties
public static record McpProperties.ServerProperties(String id, String providerId, String transport, String command, List<String> args, String url, Map<String,String> env, Map<String,String> headers, Boolean enabled, Duration requestTimeout)
extends Record
One MCP server.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionargs()Returns the value of theargsrecord component.command()Returns the value of thecommandrecord component.enabled()Returns the value of theenabledrecord component.env()Returns the value of theenvrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.headers()Returns the value of theheadersrecord component.id()Returns the value of theidrecord component.Returns the value of theproviderIdrecord component.Returns the value of therequestTimeoutrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransportrecord component.url()Returns the value of theurlrecord component.
-
Constructor Details
-
ServerProperties
public ServerProperties(String id, String providerId, String transport, String command, List<String> args, String url, Map<String, String> env, Map<String, String> headers, Boolean enabled, Duration requestTimeout) Creates an instance of aServerPropertiesrecord class.- Parameters:
id- the value for theidrecord componentproviderId- the value for theproviderIdrecord componenttransport- the value for thetransportrecord componentcommand- the value for thecommandrecord componentargs- the value for theargsrecord componenturl- the value for theurlrecord componentenv- the value for theenvrecord componentheaders- the value for theheadersrecord componentenabled- the value for theenabledrecord componentrequestTimeout- the value for therequestTimeoutrecord component
-
-
Method Details
-
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
providerId
Returns the value of theproviderIdrecord component.- Returns:
- the value of the
providerIdrecord component
-
transport
Returns the value of thetransportrecord component.- Returns:
- the value of the
transportrecord component
-
command
Returns the value of thecommandrecord component.- Returns:
- the value of the
commandrecord component
-
args
Returns the value of theargsrecord component.- Returns:
- the value of the
argsrecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
env
Returns the value of theenvrecord component.- Returns:
- the value of the
envrecord component
-
headers
Returns the value of theheadersrecord component.- Returns:
- the value of the
headersrecord component
-
enabled
Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
requestTimeout
Returns the value of therequestTimeoutrecord component.- Returns:
- the value of the
requestTimeoutrecord component
-