Class McpCompletionRef
java.lang.Object
org.apache.juneau.rest.server.mcp.McpCompletionRef
Revision-neutral identification of the declaration a
completion/complete request targets.
Supersedes the wire-level closed CompletionReference family (PromptReference /
ResourceTemplateReference). getTarget() is always an exact declaration: a
prompt name or a registered uriTemplate string, never a concrete/expanded URI.
Use prompt(String) or resource(String) to construct an instance; this keeps neutral
dispatch code free of free-form kind strings.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetKind()The kind of declaration this reference targets.The exact target declaration: a prompt name forMcpCompletionRef.Kind.PROMPT, or a registered URI template string forMcpCompletionRef.Kind.RESOURCE.static McpCompletionRefCreates a reference to a prompt argument completion target.static McpCompletionRefCreates a reference to a resource-template variable completion target.setKind(McpCompletionRef.Kind value) Sets the kind of declaration this reference targets.Sets the exact target declaration.
-
Constructor Details
-
McpCompletionRef
public McpCompletionRef()
-
-
Method Details
-
prompt
Creates a reference to a prompt argument completion target.- Parameters:
name- The exact prompt name. Can benull .- Returns:
- A new reference. Never
null .
-
resource
Creates a reference to a resource-template variable completion target.- Parameters:
uriTemplate- The exact registered URI template string. Can benull .- Returns:
- A new reference. Never
null .
-
getKind
The kind of declaration this reference targets.- Returns:
- The kind, or
null if not set.
-
setKind
Sets the kind of declaration this reference targets.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object.
-
getTarget
The exact target declaration: a prompt name forMcpCompletionRef.Kind.PROMPT, or a registered URI template string forMcpCompletionRef.Kind.RESOURCE.- Returns:
- The target, or
null if not set.
-
setTarget
Sets the exact target declaration.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object.
-