Package com.ultikits.ultitools.utils
Class AgentEndpoint
java.lang.Object
com.ultikits.ultitools.utils.AgentEndpoint
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static URIfromApiUrl(String apiUrl) Maps the API URL to the agent endpoint.
-
Field Details
-
AGENT_PATH
The agent socket's path below the API base.- See Also:
-
SCHEME_SEPARATOR
- See Also:
-
-
Constructor Details
-
AgentEndpoint
private AgentEndpoint()
-
-
Method Details
-
fromApiUrl
Maps the API URL to the agent endpoint.- Parameters:
apiUrl- the API base URL, for examplehttps://api.ultikits.com- Returns:
- the agent endpoint, for example
wss://api.ultikits.com/v1/agent - Throws:
IllegalArgumentException- whenapiUrlis blank, has another scheme, or is not a URL with a host; the caller reports it once and does not start the connection
-