Interface NuggetCliClient

All Superinterfaces:
AutoCloseable

public interface NuggetCliClient extends 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 Type
    Method
    Description
    void
    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.Result
    discover(org.j7m.middleware.operations.api.NuggetDiscovery.Query query)
    Performs a bounded discovery refresh.
    org.j7m.middleware.operations.api.NuggetDiscovery.Resolution
    resolve(org.j7m.middleware.operations.api.NuggetDiscovery.Selector selector)
    Resolves a selector against the available discovery view.
    Creates an unavailable fallback client with the default safe 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

      NuggetCliConnection connect(org.j7m.middleware.operations.api.NuggetDiscovery.Record record)
      Connects to one selected discovery record.
      Parameters:
      record - selected record
      Returns:
      owned connection
    • close

      void close()
      Closes resources owned by this client.
      Specified by:
      close in interface AutoCloseable
    • unavailable

      static NuggetCliClient unavailable()
      Creates an unavailable fallback client with the default safe reason.
      Returns:
      unavailable client
    • unavailable

      static NuggetCliClient unavailable(String reason)
      Creates an unavailable fallback client with a safe normalized reason.
      Parameters:
      reason - safe reason text
      Returns:
      unavailable client