Class AgentEndpoint

java.lang.Object
com.ultikits.ultitools.utils.AgentEndpoint

final class AgentEndpoint extends Object
Derives the UltiCloud agent WebSocket endpoint from the build-time API URL (as of 6.3.1).

https:// becomes wss://, http:// becomes ws://, a URL without a scheme is taken as wss://; a trailing / is dropped, any base path is kept, and /v1/agent is appended.

  • Field Details

  • Constructor Details

    • AgentEndpoint

      private AgentEndpoint()
  • Method Details

    • fromApiUrl

      static URI fromApiUrl(String apiUrl)
      Maps the API URL to the agent endpoint.
      Parameters:
      apiUrl - the API base URL, for example https://api.ultikits.com
      Returns:
      the agent endpoint, for example wss://api.ultikits.com/v1/agent
      Throws:
      IllegalArgumentException - when apiUrl is blank, has another scheme, or is not a URL with a host; the caller reports it once and does not start the connection