Class ServerDiscoverResult
java.lang.Object
org.apache.juneau.bean.mcp.v20260728.Result<T>
org.apache.juneau.bean.mcp.v20260728.CacheableResult<ServerDiscoverResult>
org.apache.juneau.bean.mcp.v20260728.ServerDiscoverResult
Result payload for "server/discover".
Extends CacheableResult so discovery participates in the same SEP-2549 cache-hint machinery as the
list/read results, and (transitively) Result so it inherits the required resultType
discriminator plus _meta. Server identity belongs on the inherited _meta per the schema; there
is no protocol version, session, or handshake state, and no top-level serverInfo member. Use the
inherited Result.getMeta() server identity instead.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddSupportedVersions(String... value) Appends to the supported protocol versions.addSupportedVersions(Collection<String> value) Appends to the supported protocol versions.Server capability advertisement.Optional free-form usage instructions for the client.Returns this result's server identity, if present.Protocol versions this server supports, in preference order.Sets the server capability advertisement.setInstructions(String value) Sets the usage instructions.setSupportedVersions(String... value) Sets the supported protocol versions.setSupportedVersions(List<String> value) Sets the supported protocol versions.Methods inherited from class org.apache.juneau.bean.mcp.v20260728.CacheableResult
getCacheScope, getTtlMs, setCacheScope, setTtlMsMethods inherited from class org.apache.juneau.bean.mcp.v20260728.Result
getMeta, getResultType, setMeta, setResultType
-
Constructor Details
-
ServerDiscoverResult
public ServerDiscoverResult()
-
-
Method Details
-
getSupportedVersions
Protocol versions this server supports, in preference order.- Returns:
- The supported-versions list, or
nullif not set.
-
setSupportedVersions
Sets the supported protocol versions.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-
setSupportedVersions
Sets the supported protocol versions.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-
addSupportedVersions
Appends to the supported protocol versions.- Parameters:
value- The values to append.- Returns:
- This object (for method chaining).
-
addSupportedVersions
Appends to the supported protocol versions.- Parameters:
value- The values to append.- Returns:
- This object (for method chaining).
-
getCapabilities
Server capability advertisement.- Returns:
- The capabilities, or
nullif not set.
-
setCapabilities
Sets the server capability advertisement.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-
getInstructions
Optional free-form usage instructions for the client.- Returns:
- The instructions, or
nullif not set.
-
setInstructions
Sets the usage instructions.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-
getServerInfo
Returns this result's server identity, if present.Null-safe shortcut for
getMeta() == null ? null : getMeta().getServerInfo(), so a caller does not have to null-check the intermediateResult.getMeta()just to reach the server'sImplementation.- Returns:
- The server identity, or
nullifResult.getMeta()is unset, or itsResultMeta.getServerInfo()is unset.
-