Interface NuggetCliClient
- All Superinterfaces:
AutoCloseable
Transport-neutral client used by the J7M CLI nugget console.
A client instance is owned by one CLI invocation or one interactive shell session. Implementations must be bounded, deterministic, and safe to close more than once. The client invokes the accepted headless nugget discovery, admission, and read-only status contracts; it must not implement a separate administration model or treat discovery records as authorization evidence.
Implementations must not expose clear PIN material, endpoint credentials,
transport internals, raw remote exceptions, or hidden target identifiers
through returned DTOs, exception messages, diagnostics, or toString
output.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes resources owned by this client.connect(org.j7m.middleware.operations.api.NuggetDiscovery.Record record) Connects to one selected discovery record.org.j7m.middleware.operations.api.NuggetDiscovery.Resultdiscover(org.j7m.middleware.operations.api.NuggetDiscovery.Query query) Performs a bounded discovery refresh.org.j7m.middleware.operations.api.NuggetDiscovery.Resolutionresolve(org.j7m.middleware.operations.api.NuggetDiscovery.Selector selector) Resolves a selector against the available discovery view.static NuggetCliClientCreates an unavailable fallback client with the default safe reason.static NuggetCliClientunavailable(String reason) Creates an unavailable fallback client with a safe normalized reason.
-
Method Details
-
discover
org.j7m.middleware.operations.api.NuggetDiscovery.Result discover(org.j7m.middleware.operations.api.NuggetDiscovery.Query query) Performs a bounded discovery refresh.- Parameters:
query- discovery query- Returns:
- discovery result
-
resolve
org.j7m.middleware.operations.api.NuggetDiscovery.Resolution resolve(org.j7m.middleware.operations.api.NuggetDiscovery.Selector selector) Resolves a selector against the available discovery view.- Parameters:
selector- selector- Returns:
- resolution result
-
connect
Connects to one selected discovery record.- Parameters:
record- selected record- Returns:
- owned connection
-
close
-