Interface NuggetCliClientProvider
Providers are discovered through ServiceLoader by the
production CLI entry points. A provider owns any resources allocated during
createClient() until the returned NuggetCliClient is closed
by the CLI invocation or shell session. Implementations must be deterministic,
bounded during initialization, and must not depend on concrete transport
implementation classes in the CLI module.
Provider implementations are responsible for reporting trusted connection
security through NuggetCliConnection.security() after a connection is
established. Discovery records, endpoint strings, or object references are not
sufficient evidence that PIN submission is safe.
Implementations must normalize transport failures through the
transport-neutral client contract and must not log, cache, or expose PIN
material, endpoint credentials, private keys, or raw transport exception
details. Methods may be called by the CLI session thread; implementations that
perform background work must define their own bounded execution and shutdown
policy and release resources from NuggetCliClient.close().
-
Method Summary
Modifier and TypeMethodDescriptionCreates one client instance owned by one CLI invocation or shell session.Returns the stable provider identifier used for deterministic selection and diagnostics.
-
Method Details
-
providerId
String providerId()Returns the stable provider identifier used for deterministic selection and diagnostics.- Returns:
- a bounded non-secret provider identifier
-
createClient
NuggetCliClient createClient()Creates one client instance owned by one CLI invocation or shell session.- Returns:
- a new transport-neutral client
- Throws:
RuntimeException- if the provider cannot initialize a client
-